Add helper shortcut to 'renderdoccmd test' to run functional tests

* This invokes run_tests.py with any arguments but specifies the renderdoc
  module and python module paths automatically. Only works if built within the
  project repo itself as otherwise it won't locate the test script
This commit is contained in:
baldurk
2019-02-14 15:45:22 +00:00
parent 634040d4b5
commit 34a97482dd
12 changed files with 267 additions and 45 deletions
+11 -1
View File
@@ -799,7 +799,13 @@ struct TestCommand : public Command
TestCommand(const GlobalEnvironment &env) : Command(env) {}
virtual void AddOptions(cmdline::parser &parser)
{
parser.set_footer("<unit> [... parameters to test framework ...]");
parser.set_footer(
#if PYTHON_MINOR_VERSION > 0
"<unit|functional>"
#else
"<unit>"
#endif
" [... parameters to test framework ...]");
parser.add("help", '\0', "print this message");
parser.stop_at_rest(true);
}
@@ -826,6 +832,10 @@ struct TestCommand : public Command
if(mode == "unit")
return RENDERDOC_RunUnitTests("renderdoccmd test unit", convertArgs(rest));
#if PYTHON_MINOR_VERSION > 0
else if(mode == "functional")
return RENDERDOC_RunFunctionalTests(PYTHON_MINOR_VERSION, convertArgs(rest));
#endif
std::cerr << "Unsupported test frame work '" << mode << "'" << std::endl << std::endl;
std::cerr << parser.usage() << std::endl;