Commit c491e0fb by Corentin Wallez

Fix command line being ignored in non-gtest dEQP tests

BUG=angleproject:1051 Change-Id: If10abaea31ad29af9f8d438403f67b9dfbfd7e45 Reviewed-on: https://chromium-review.googlesource.com/283167Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tested-by: 's avatarCorentin Wallez <cwallez@chromium.org>
parent f5cb6aa5
...@@ -83,7 +83,7 @@ const char *FindDataDir() ...@@ -83,7 +83,7 @@ const char *FindDataDir()
return nullptr; return nullptr;
} }
bool InitPlatform() bool InitPlatform(int argc, const char *argv[])
{ {
try try
{ {
...@@ -107,9 +107,7 @@ bool InitPlatform() ...@@ -107,9 +107,7 @@ bool InitPlatform()
return false; return false;
} }
// TODO(jmadill): filter arguments g_cmdLine = new tcu::CommandLine(argc, argv);
const char *emptyString = "";
g_cmdLine = new tcu::CommandLine(1, &emptyString);
g_archive = new tcu::DirArchive(deqpDataDir); g_archive = new tcu::DirArchive(deqpDataDir);
g_log = new tcu::TestLog(g_cmdLine->getLogFileName(), g_cmdLine->getLogFlags()); g_log = new tcu::TestLog(g_cmdLine->getLogFileName(), g_cmdLine->getLogFlags());
g_testCtx = new tcu::TestContext(*g_platform, *g_archive, *g_log, *g_cmdLine, DE_NULL); g_testCtx = new tcu::TestContext(*g_platform, *g_archive, *g_log, *g_cmdLine, DE_NULL);
...@@ -130,7 +128,10 @@ bool InitPlatform() ...@@ -130,7 +128,10 @@ bool InitPlatform()
// Exported to the tester app. // Exported to the tester app.
ANGLE_LIBTESTER_EXPORT int deqp_libtester_main(int argc, const char *argv[]) ANGLE_LIBTESTER_EXPORT int deqp_libtester_main(int argc, const char *argv[])
{ {
InitPlatform(); if (!InitPlatform(argc, argv))
{
tcu::die("Could not initialize the dEQP platform");
}
try try
{ {
...@@ -166,7 +167,8 @@ ANGLE_LIBTESTER_EXPORT void deqp_libtester_shutdown_platform() ...@@ -166,7 +167,8 @@ ANGLE_LIBTESTER_EXPORT void deqp_libtester_shutdown_platform()
ANGLE_LIBTESTER_EXPORT bool deqp_libtester_run(const char *caseName) ANGLE_LIBTESTER_EXPORT bool deqp_libtester_run(const char *caseName)
{ {
if (g_platform == nullptr && !InitPlatform()) const char *emptyString = "";
if (g_platform == nullptr && !InitPlatform(1, &emptyString))
{ {
tcu::die("Failed to initialize platform."); tcu::die("Failed to initialize platform.");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment