From 8bc2c4748c3135627739ac229e1e2c9f14fd59eb Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 20 May 2020 15:23:32 -0400 Subject: [PATCH] add option to test main program to override the value of the INPUT_FOLDER variable --- unittest/force-styles/test_main.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/unittest/force-styles/test_main.cpp b/unittest/force-styles/test_main.cpp index 93ad141ce3..b7028e7d5e 100644 --- a/unittest/force-styles/test_main.cpp +++ b/unittest/force-styles/test_main.cpp @@ -39,6 +39,7 @@ void usage(std::ostream &out, const char *name) out << "usage: " << name << " [OPTIONS]\n\n" << "Available options:\n" << " -g regenerate yaml file under a new name\n" + << " -d set folder where to find input files\n" << " -u update the original yaml file\n" << " -v run tests with verbose output\n" << " -s run tests with error statistics output\n" @@ -89,6 +90,14 @@ int main(int argc, char **argv) } else if (strcmp(argv[iarg],"-u") == 0) { generate_yaml_file(argv[1], test_config); return 0; + } else if (strcmp(argv[iarg],"-d") == 0) { + if (iarg+1 < argc) { + INPUT_FOLDER = argv[iarg+1]; + iarg += 2; + } else { + usage(std::cerr,argv[0]); + return 1; + } } else if (strcmp(argv[iarg],"-s") == 0) { print_stats = true; ++iarg;