1 2 static char help[] = "Tests options file parsing.\n\n"; 3 4 #include <petscsys.h> 5 #include <petscviewer.h> 6 7 int main(int argc, char **argv) 8 { 9 /* this is listed first so that it gets into the database before the errors are created */ 10 PetscCall(PetscOptionsSetValue(NULL, "-error_output_stdout", NULL)); 11 PetscFunctionBeginUser; 12 PetscCall(PetscInitialize(&argc, &argv, "ex54options", help)); 13 PetscCall(PetscFinalize()); 14 return 0; 15 } 16 17 /*TEST 18 19 test: 20 suffix: 0 21 localrunfiles: ex54options 22 args: -options_left 0 -options_view 23 24 testset: 25 TODO: occassionally randomly produces errors in CI, very difficult to debug, the wasted time out-weighs keeping this test in the CI 26 args: -options_left 0 -options_view 27 test: 28 suffix: 1 29 localrunfiles: ex54options ex54options_1a_wrong ex54options_1b_wrong ex54options_1c_wrong ex54options_1d_wrong ex54options_1e_wrong ex54options_1f_wrong ex54options_1g_wrong 30 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} 31 # Some machines use the fullpath in the program name, so filter with " ex54options" and not "ex54options" 32 filter: Error: grep -E " ex54options" 33 test: 34 suffix: 1_options_file-ex54options_1h 35 localrunfiles: ex54options ex54options_1h 36 args: -options_file ex54options_1h 37 38 TEST*/ 39