Add an option to terminate after first failure, update READMEs
authorSÅ‚awomir Cygan <slawomir.cygan@intel.com>
Fri, 5 Mar 2021 16:02:06 +0000 (17:02 +0100)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 25 Mar 2021 07:47:44 +0000 (07:47 +0000)
New command line argument: --deqp-terminate-on-fail=enable

Moreover update the READMEs:
 - update the command line documentation in OpenGL CTS Readme
 - add a chapter on Vulkan CTS command line
 - Move --deqp-runner-type= from chapter describing allowed CTS command line

Components: Framework

VK-GL-CTS Issue 2844

Change-Id: I4c6b339838a50fc2ddc0d493ac905f502179792d

external/openglcts/README.md
external/vulkancts/README.md
framework/common/tcuCommandLine.cpp
framework/common/tcuCommandLine.hpp
framework/common/tcuTestSessionExecutor.cpp

index 81665fa..21bfb4d 100644 (file)
@@ -559,6 +559,9 @@ Full list of parameters for the `glcts` binary:
   --deqp-caselist-file=<value>
     Read case list (in trie format) from given file
 
+  --deqp-caselist-resource=<value>
+    Read case list (in trie format) from given file located application's assets
+
   --deqp-stdin-caselist
     Read case list (in trie format) from stdin
 
@@ -648,21 +651,46 @@ Full list of parameters for the `glcts` binary:
     default: 'enable'
 
   --deqp-log-shader-sources=[enable|disable]
-    Enable or disable logging of shaders
+    Enable or disable logging of shader sources
     default: 'enable'
 
   --deqp-test-oom=[enable|disable]
     Run tests that exhaust memory on purpose
-    default: 'disable'
+    default: 'enable'
 
   --deqp-archive-dir=<value>
     Path to test resource files
-    default: current working directory
+    default: '.'
+
+  --deqp-log-flush=[enable|disable]
+    Enable or disable log file fflush
+    default: 'enable'
+
+
+  --deqp-renderdoc=[enable|disable]
+    Enable RenderDoc frame markers
+    default: 'disable'
 
-  --deqp-case-fraction=<value>,<value>
+  --deqp-fraction=<value>
     Run a fraction of the test cases (e.g. N,M means run group%M==N)
     default: ''
 
+  --deqp-fraction-mandatory-caselist-file=<value>
+    Case list file that must be run for each fraction
+    default: ''
+
+  --deqp-waiver-file=<value>
+    Read waived tests from given file
+    default: ''
+
+  --deqp-runner-type=[any|none|amber]
+    Filter test cases based on runner
+    default: 'any'
+
+  --deqp-terminate-on-fail=[enable|disable]
+    Terminate the run on first failure
+    default: 'disable'
+
   --deqp-egl-config-id=<value>
     Legacy name for --deqp-gl-config-id
     default: '-1'
index 09e076c..e870aab 100644 (file)
@@ -173,12 +173,6 @@ the following command line option may be used:
 
        --deqp-waiver-file=<path>
 
-Some CTS tests use third-party runners. By default all tests are executed
-regardless of runner type (`any`). To exclude all tests using any of the
-external runners (`none`) or to only include tests using a certain runner:
-
-       --deqp-runner-type=(any|none|amber)
-
 No other command line options are allowed.
 
 ### Win32
@@ -496,3 +490,165 @@ RenderDoc UI:
 This causes the framework to interface with the debugger and mark each dEQP
 test case as a separate 'frame', just for the purpose of capturing. The frames
 are added using RenderDoc 'In-Application API', instead of swapchain operations.
+
+
+Third Party Runners
+-------------------
+
+Some CTS tests use third-party runners. By default all tests are executed
+regardless of runner type (`any`). To exclude all tests using any of the
+external runners (`none`) or to only include tests using a certain runner:
+
+       --deqp-runner-type=(any|none|amber)
+
+
+Command Line
+------------
+Full list of parameters for the `deqp-vk` module:
+
+OpenGL and OpenCL parameters not affecting Vulkan API were suppressed.
+
+  -h, --help
+    Show this help
+
+  -n, --deqp-case=<value>
+    Test case(s) to run, supports wildcards (e.g. dEQP-GLES2.info.*)
+
+  --deqp-caselist=<value>
+    Case list to run in trie format (e.g. {dEQP-GLES2{info{version,renderer}}})
+
+  --deqp-caselist-file=<value>
+    Read case list (in trie format) from given file
+
+  --deqp-caselist-resource=<value>
+    Read case list (in trie format) from given file located application's assets
+
+  --deqp-stdin-caselist
+    Read case list (in trie format) from stdin
+
+  --deqp-log-filename=<value>
+    Write test results to given file
+    default: 'TestResults.qpa'
+
+  --deqp-runmode=[execute|xml-caselist|txt-caselist|stdout-caselist]
+    Execute tests, or write list of test cases into a file
+    default: 'execute'
+
+  --deqp-caselist-export-file=<value>
+    Set the target file name pattern for caselist export
+    default: '${packageName}-cases.${typeExtension}'
+
+  --deqp-watchdog=[enable|disable]
+    Enable test watchdog
+    default: 'disable'
+
+  --deqp-crashhandler=[enable|disable]
+    Enable crash handling
+    default: 'disable'
+
+  --deqp-base-seed=<value>
+    Base seed for test cases that use randomization
+    default: '0'
+
+  --deqp-test-iteration-count=<value>
+    Iteration count for cases that support variable number of iterations
+    default: '0'
+
+  --deqp-visibility=[windowed|fullscreen|hidden]
+    Default test window visibility
+    default: 'windowed'
+
+  --deqp-surface-width=<value>
+    Use given surface width if possible
+    default: '-1'
+
+  --deqp-surface-height=<value>
+    Use given surface height if possible
+    default: '-1'
+
+  --deqp-surface-type=[window|pixmap|pbuffer|fbo]
+    Use given surface type
+    default: 'window'
+
+  --deqp-screen-rotation=[unspecified|0|90|180|270]
+    Screen rotation for platforms that support it
+    default: '0'
+
+  --deqp-vk-device-id=<value>
+    Vulkan device ID (IDs start from 1)
+    default: '1'
+
+  --deqp-vk-device-group-id=<value>
+    Vulkan device Group ID (IDs start from 1)
+    default: '1'
+
+  --deqp-log-images=[enable|disable]
+    Enable or disable logging of result images
+    default: 'enable'
+
+  --deqp-log-shader-sources=[enable|disable]
+    Enable or disable logging of shader sources
+    default: 'enable'
+
+  --deqp-test-oom=[enable|disable]
+    Run tests that exhaust memory on purpose
+    default: 'enable'
+
+  --deqp-archive-dir=<value>
+    Path to test resource files
+    default: '.'
+
+  --deqp-log-flush=[enable|disable]
+    Enable or disable log file fflush
+    default: 'enable'
+
+  --deqp-validation=[enable|disable]
+    Enable or disable test case validation
+    default: 'disable'
+
+  --deqp-print-validation-errors
+    Print validation errors to standard error
+
+  --deqp-optimization-recipe=<value>
+    Shader optimization recipe (0=disabled, 1=performance, 2=size)
+    default: '0'
+
+  --deqp-optimize-spirv=[enable|disable]
+    Apply optimization to spir-v shaders as well
+    default: 'disable'
+
+  --deqp-shadercache=[enable|disable]
+    Enable or disable shader cache
+    default: 'enable'
+
+  --deqp-shadercache-filename=<value>
+    Write shader cache to given file
+    default: 'shadercache.bin'
+
+  --deqp-shadercache-truncate=[enable|disable]
+    Truncate shader cache before running tests
+    default: 'enable'
+
+  --deqp-renderdoc=[enable|disable]
+    Enable RenderDoc frame markers
+    default: 'disable'
+
+  --deqp-fraction=<value>
+    Run a fraction of the test cases (e.g. N,M means run group%M==N)
+    default: ''
+
+  --deqp-fraction-mandatory-caselist-file=<value>
+    Case list file that must be run for each fraction
+    default: ''
+
+  --deqp-waiver-file=<value>
+    Read waived tests from given file
+    default: ''
+
+  --deqp-runner-type=[any|none|amber]
+    Filter test cases based on runner
+    default: 'any'
+
+  --deqp-terminate-on-fail=[enable|disable]
+    Terminate the run on first failure
+    default: 'disable'
\ No newline at end of file
index bdc938d..ccd2c40 100644 (file)
@@ -102,6 +102,7 @@ DE_DECLARE_COMMAND_LINE_OPT(CaseFraction,                           std::vector<int>);
 DE_DECLARE_COMMAND_LINE_OPT(CaseFractionMandatoryTests,        std::string);
 DE_DECLARE_COMMAND_LINE_OPT(WaiverFile,                                        std::string);
 DE_DECLARE_COMMAND_LINE_OPT(RunnerType,                                        tcu::TestRunnerType);
+DE_DECLARE_COMMAND_LINE_OPT(TerminateOnFail,                   bool);
 
 static void parseIntList (const char* src, std::vector<int>* dst)
 {
@@ -208,7 +209,8 @@ void registerOptions (de::cmdline::Parser& parser)
                << Option<CaseFraction>                                 (DE_NULL,       "deqp-fraction",                                                        "Run a fraction of the test cases (e.g. N,M means run group%M==N)",     parseIntList,   "")
                << Option<CaseFractionMandatoryTests>   (DE_NULL,       "deqp-fraction-mandatory-caselist-file",        "Case list file that must be run for each fraction",                                    "")
                << Option<WaiverFile>                                   (DE_NULL,       "deqp-waiver-file",                                                     "Read waived tests from given file",                                                                    "")
-               << Option<RunnerType>                                   (DE_NULL,       "deqp-runner-type",                                                     "Filter test cases based on runner",                            s_runnerTypes,          "any");
+               << Option<RunnerType>                                   (DE_NULL,       "deqp-runner-type",                                                     "Filter test cases based on runner",                            s_runnerTypes,          "any")
+               << Option<TerminateOnFail>                              (DE_NULL,       "deqp-terminate-on-fail",                                       "Terminate the run on first failure",                           s_enableNames,          "disable");
 }
 
 void registerLegacyOptions (de::cmdline::Parser& parser)
@@ -871,6 +873,7 @@ const std::vector<int>&     CommandLine::getCaseFraction                            (void) const    { return m_
 const char*                            CommandLine::getCaseFractionMandatoryTests      (void) const    { return m_cmdLine.getOption<opt::CaseFractionMandatoryTests>().c_str();        }
 const char*                            CommandLine::getArchiveDir                                      (void) const    { return m_cmdLine.getOption<opt::ArchiveDir>().c_str();                                        }
 tcu::TestRunnerType            CommandLine::getRunnerType                                      (void) const    { return m_cmdLine.getOption<opt::RunnerType>();                                                        }
+bool                                   CommandLine::isTerminateOnFailEnabled           (void) const    { return m_cmdLine.getOption<opt::TerminateOnFail>();                                           }
 
 const char* CommandLine::getGLContextType (void) const
 {
index 2a7c48e..20335e5 100644 (file)
@@ -266,6 +266,9 @@ public:
        //! Get runner type (--deqp-runner-type)
        tcu::TestRunnerType                             getRunnerType                           (void) const;
 
+       //! Should the run be terminated on first failure (--deqp-terminate-on-fail)
+       bool                                                    isTerminateOnFailEnabled        (void) const;
+
        /*--------------------------------------------------------------------*//*!
         * \brief Creates case list filter
         * \param archive Resources
index c7524f8..09ffd55 100644 (file)
@@ -280,7 +280,9 @@ void TestSessionExecutor::leaveTestCase (TestCase* testCase)
                }
 
                // terminateAfter, Resource error or any error in deinit means that execution should end
-               if (terminateAfter || testResult == QP_TEST_RESULT_RESOURCE_ERROR)
+               if (terminateAfter || testResult == QP_TEST_RESULT_RESOURCE_ERROR ||
+                       (m_status.numFailed > 0 && m_testCtx.getCommandLine().isTerminateOnFailEnabled()))
+
                        m_abortSession = true;
        }