forked from lijiext/lammps
add option to test main program to override the value of the INPUT_FOLDER variable
This commit is contained in:
parent
917b7dd4fa
commit
8bc2c4748c
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue