t/run-fio-tests: automatically skip t/jobs/t0005 on Windows
authorVincent Fu <vincent.fu@wdc.com>
Thu, 12 Dec 2019 22:31:14 +0000 (15:31 -0700)
committerVincent Fu <vincent.fu@wdc.com>
Mon, 6 Jan 2020 16:49:24 +0000 (11:49 -0500)
t0005 uses direct IO with a sync ioengine which is not supported under
Windows. Automatically skip this test when run-fio-tests is run under
Windows.

With this change we no longer need to skip test 5 in the appveyor setup.

Signed-off-by: Vincent Fu <vincent.fu@wdc.com>
.appveyor.yml
t/run-fio-tests.py

index 4fb0a90d87bf1955f8d6a8f1bdacee27d10a51b8..bf0978ad264d9302a36e34d1664705cea0abdd00 100644 (file)
@@ -25,7 +25,7 @@ after_build:
 
 test_script:
   - 'bash.exe -lc "cd \"${APPVEYOR_BUILD_FOLDER}\" && file.exe fio.exe && make.exe test'
-  - 'bash.exe -lc "cd \"${APPVEYOR_BUILD_FOLDER}\" && python.exe t/run-fio-tests.py --skip 5 --debug'
+  - 'bash.exe -lc "cd \"${APPVEYOR_BUILD_FOLDER}\" && python.exe t/run-fio-tests.py --debug'
 
 artifacts:
   - path: os\windows\*.msi
index a0a1e8fa5076a0ac74222ea58cc560eb1349ec77..3d236e376688105b5a7e3eca69a0f615c57f5a1b 100755 (executable)
@@ -428,11 +428,13 @@ class Requirements(object):
     _root = False
     _zoned_nullb = False
     _not_macos = False
+    _not_windows = False
     _unittests = False
     _cpucount4 = False
 
     def __init__(self, fio_root):
         Requirements._not_macos = platform.system() != "Darwin"
+        Requirements._not_windows = platform.system() != "Windows"
         Requirements._linux = platform.system() == "Linux"
 
         if Requirements._linux:
@@ -470,6 +472,7 @@ class Requirements(object):
                     Requirements.root,
                     Requirements.zoned_nullb,
                     Requirements.not_macos,
+                    Requirements.not_windows,
                     Requirements.unittests,
                     Requirements.cpucount4]
         for req in req_list:
@@ -494,6 +497,9 @@ class Requirements(object):
     def not_macos():
         return Requirements._not_macos, "platform other than macOS required"
 
+    def not_windows():
+        return Requirements._not_windows, "platform other than Windows required"
+
     def unittests():
         return Requirements._unittests, "Unittests support required"
 
@@ -561,7 +567,7 @@ TEST_LIST = [
             'pre_job':          None,
             'pre_success':      None,
             'output_format':    'json',
-            'requirements':     [],
+            'requirements':     [Requirements.not_windows],
         },
         {
             'test_id':          6,