t/fiotestlib: use config variable to skip test at runtime
authorVincent Fu <vincent.fu@samsung.com>
Mon, 31 Jul 2023 17:02:55 +0000 (17:02 +0000)
committerVincent Fu <vincent.fu@samsung.com>
Mon, 14 Aug 2023 14:43:45 +0000 (10:43 -0400)
Check a test config variable to skip a test at runtime. This will be
used to skip a test when the test runner determines that it should not
be run.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
t/fiotestlib.py

index 1f35de0ae81d0b83d20698f5df8702ccb5619657..a96338a384eea3c749d7f792332e1340a4a994cb 100755 (executable)
@@ -382,9 +382,10 @@ def run_fio_tests(test_list, test_env, args):
 
     for config in test_list:
         if (args.skip and config['test_id'] in args.skip) or \
-           (args.run_only and config['test_id'] not in args.run_only):
+           (args.run_only and config['test_id'] not in args.run_only) or \
+           ('force_skip' in config and config['force_skip']):
             skipped = skipped + 1
-            print(f"Test {config['test_id']} SKIPPED (User request)")
+            print(f"Test {config['test_id']} SKIPPED (User request or override)")
             continue
 
         if issubclass(config['test_class'], FioJobFileTest):