From: Thomas Spurden Date: Mon, 7 Oct 2019 13:59:01 +0000 (+0100) Subject: Add --deqp-archive-dir command line option X-Git-Tag: upstream/1.3.5~1697 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9865c336bb3685a8e255fbf1309892c7271fbe31;p=platform%2Fupstream%2FVK-GL-CTS.git Add --deqp-archive-dir command line option Allows running in a different working directory from the archive directory. Components: Framework VK-GL-CTS Issue: 2105 Change-Id: I803d735e7ca304069c881db90c195474f62c98f5 --- diff --git a/external/openglcts/README.md b/external/openglcts/README.md index b5fb689..b71b926 100644 --- a/external/openglcts/README.md +++ b/external/openglcts/README.md @@ -642,6 +642,10 @@ Full list of parameters for the `glcts` binary: Run tests that exhaust memory on purpose default: 'disable' + --deqp-archive-dir= + Path to test resource files + default: current working directory + --deqp-case-fraction=, Run a fraction of the test cases (e.g. N,M means run group%M==N) default: '' diff --git a/external/vulkancts/README.md b/external/vulkancts/README.md index c86c9e8..66f1021 100644 --- a/external/vulkancts/README.md +++ b/external/vulkancts/README.md @@ -140,6 +140,11 @@ platform requires a different path, it can be specified with: --deqp-log-filename= +By default, the CTS will expect to find its test resource files in the current +working directory. This can be overridden with: + + --deqp-archive-dir= + By default, the shader cache will be written into the path "shadercache.bin". If the platform requires a different path, it can be specified with: diff --git a/framework/common/tcuCommandLine.cpp b/framework/common/tcuCommandLine.cpp index bdb76ff..de9c337 100644 --- a/framework/common/tcuCommandLine.cpp +++ b/framework/common/tcuCommandLine.cpp @@ -86,6 +86,7 @@ DE_DECLARE_COMMAND_LINE_OPT(EGLPixmapType, std::string); DE_DECLARE_COMMAND_LINE_OPT(LogImages, bool); DE_DECLARE_COMMAND_LINE_OPT(LogShaderSources, bool); DE_DECLARE_COMMAND_LINE_OPT(TestOOM, bool); +DE_DECLARE_COMMAND_LINE_OPT(ArchiveDir, std::string); DE_DECLARE_COMMAND_LINE_OPT(VKDeviceID, int); DE_DECLARE_COMMAND_LINE_OPT(VKDeviceGroupID, int); DE_DECLARE_COMMAND_LINE_OPT(LogFlush, bool); @@ -185,6 +186,7 @@ void registerOptions (de::cmdline::Parser& parser) << Option (DE_NULL, "deqp-log-images", "Enable or disable logging of result images", s_enableNames, "enable") << Option (DE_NULL, "deqp-log-shader-sources", "Enable or disable logging of shader sources", s_enableNames, "enable") << Option (DE_NULL, "deqp-test-oom", "Run tests that exhaust memory on purpose", s_enableNames, TEST_OOM_DEFAULT) + << Option (DE_NULL, "deqp-archive-dir", "Path to test resource files", ".") << Option (DE_NULL, "deqp-log-flush", "Enable or disable log file fflush", s_enableNames, "enable") << Option (DE_NULL, "deqp-validation", "Enable or disable test case validation", s_enableNames, "disable") << Option (DE_NULL, "deqp-optimization-recipe", "Shader optimization recipe (0=disabled, 1=performance, 2=size)", "0") @@ -824,6 +826,7 @@ bool CommandLine::isSpirvOptimizationEnabled (void) const { return m_cmdLin bool CommandLine::isRenderDocEnabled (void) const { return m_cmdLine.getOption(); } const std::vector& CommandLine::getCaseFraction (void) const { return m_cmdLine.getOption(); } const char* CommandLine::getCaseFractionMandatoryTests (void) const { return m_cmdLine.getOption().c_str(); } +const char* CommandLine::getArchiveDir (void) const { return m_cmdLine.getOption().c_str(); } const char* CommandLine::getGLContextType (void) const { diff --git a/framework/common/tcuCommandLine.hpp b/framework/common/tcuCommandLine.hpp index a7cb3ab..88527f2 100644 --- a/framework/common/tcuCommandLine.hpp +++ b/framework/common/tcuCommandLine.hpp @@ -240,6 +240,9 @@ public: //! Get must-list filename const char* getCaseFractionMandatoryTests(void) const; + //! Get archive directory path + const char* getArchiveDir (void) const; + /*--------------------------------------------------------------------*//*! * \brief Creates case list filter * \param archive Resources diff --git a/framework/platform/tcuMain.cpp b/framework/platform/tcuMain.cpp index f3e0fb4..57d62e8 100644 --- a/framework/platform/tcuMain.cpp +++ b/framework/platform/tcuMain.cpp @@ -47,7 +47,7 @@ int main (int argc, char** argv) try { tcu::CommandLine cmdLine (argc, argv); - tcu::DirArchive archive ("."); + tcu::DirArchive archive (cmdLine.getArchiveDir()); tcu::TestLog log (cmdLine.getLogFileName(), argc-1, argv+1, cmdLine.getLogFlags()); de::UniquePtr platform (createPlatform()); de::UniquePtr app (new tcu::App(*platform, archive, log, cmdLine));