Unverified Commit 8bc2c474 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

add option to test main program to override the value of the INPUT_FOLDER variable

parent 917b7dd4
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ void usage(std::ostream &out, const char *name)
    out << "usage: " << name << " <testfile.yaml> [OPTIONS]\n\n"
        << "Available options:\n"
        << "  -g <newfile.yaml>   regenerate yaml file under a new name\n"
        << "  -d <folder>         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;