xref: /petsc/src/sys/tests/ex54.c (revision df576f882f59b99b3e2e192ecc21fc4ddc680f53)
127d3936fSVaclav Hapla 
227d3936fSVaclav Hapla static char help[] = "Tests options file parsing.\n\n";
327d3936fSVaclav Hapla 
427d3936fSVaclav Hapla #include <petscsys.h>
527d3936fSVaclav Hapla #include <petscviewer.h>
627d3936fSVaclav Hapla 
727d3936fSVaclav Hapla int main(int argc,char **argv)
827d3936fSVaclav Hapla {
9*df576f88SBarry Smith   /* this is listed first so that it gets into the database before the errors are created */
10*df576f88SBarry Smith   PetscCall(PetscOptionsSetValue(NULL,"-error_output_stdout",NULL));
11b8abcfdeSJacob Faibussowitsch   PetscCall(PetscInitialize(&argc,&argv,"ex54options",help));
12b8abcfdeSJacob Faibussowitsch   PetscCall(PetscFinalize());
13b8abcfdeSJacob Faibussowitsch   return 0;
1427d3936fSVaclav Hapla }
1527d3936fSVaclav Hapla 
1627d3936fSVaclav Hapla /*TEST
1727d3936fSVaclav Hapla 
1827d3936fSVaclav Hapla    test:
1927d3936fSVaclav Hapla       suffix: 0
2027d3936fSVaclav Hapla       localrunfiles: ex54options
2127d3936fSVaclav Hapla       args: -options_left 0 -options_view
22362febeeSStefano Zampini       filter: egrep -v "(malloc|nox|display|saws_port|vecscatter|check_pointer_intensity|cuda_initialize|error_output_stdout|use_gpu_aware_mpi|checkstack)" | egrep "^-"
2327d3936fSVaclav Hapla    testset:
2427d3936fSVaclav Hapla       args: -options_left 0 -options_view
2527d3936fSVaclav Hapla       test:
2627d3936fSVaclav Hapla         suffix: 1
2727d3936fSVaclav Hapla         localrunfiles: ex54options ex54options_1a_wrong ex54options_1b_wrong ex54options_1c_wrong ex54options_1d_wrong ex54options_1e_wrong ex54options_1f_wrong ex54options_1g_wrong
2827d3936fSVaclav Hapla         args: -options_file {{ex54options_1a_wrong ex54options_1b_wrong ex54options_1c_wrong ex54options_1d_wrong ex54options_1e_wrong ex54options_1f_wrong ex54options_1g_wrong}separate output}
2923eca7e2SStefano Zampini         # Some machines use the fullpath in the program name, so filter with " ex54options" and not "ex54options"
30362febeeSStefano Zampini         filter: Error: egrep -v "(malloc|nox|display|saws_port|vecscatter|check_pointer_intensity|cuda_initialize|error_output_stdout|use_gpu_aware_mpi|checkstack)" | egrep " ex54options"
3127d3936fSVaclav Hapla       test:
3227d3936fSVaclav Hapla         suffix: 1_options_file-ex54options_1h
3327d3936fSVaclav Hapla         localrunfiles: ex54options ex54options_1h
3427d3936fSVaclav Hapla         args: -options_file ex54options_1h
35362febeeSStefano Zampini         filter: egrep -v "(malloc|nox|display|saws_port|vecscatter|check_pointer_intensity|cuda_initialize|error_output_stdout|use_gpu_aware_mpi|checkstack)" | egrep "^-"
3627d3936fSVaclav Hapla 
3727d3936fSVaclav Hapla TEST*/
38