X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c1fa53426d4f4db5c1fe697d915d30247fd5d09a..b69c3463223ed1207861d7a9b0ec0a06064696ca:/tools/tesh2/examples/keep-going.tesh diff --git a/tools/tesh2/examples/keep-going.tesh b/tools/tesh2/examples/keep-going.tesh deleted file mode 100644 index 4118f3bbb0..0000000000 --- a/tools/tesh2/examples/keep-going.tesh +++ /dev/null @@ -1,142 +0,0 @@ -#! ./tesh - -D this Tesh unit tests the option of the command line `--keep-going' - -< #include -< #include -< -< int -< main(int argc, char* argv[]) -< { -< printf("Hello Tesh\n"); -< -< return EXIT_SUCCESS; -< } -< -$ cat > job.c - -$ gcc -o job job.c - - -< ! expect return 1 -< > Hello Tesh -< $ ./job -< -< ! expect return 0 -< > Hello Tesh -< $ ./job -< -< ! expect return 0 -< > Hello Tesh -< $ ./job -< -< ! expect return 0 -< > Hello Tesh -< $ ./job -< -< ! expect return 0 -< > Hello Tesh -< $ ./job -$ cat > file1.tesh - -< ! expect return 0 -< > Hello Tesh -< $ ./job -< -< ! expect return 0 -< > Hello Tesh -< $ ./job -< -< ! expect return 0 -< > Hello Tesh -< $ ./job -< -< ! expect return 0 -< > Hello Tesh -< $ ./job -< -< ! expect return 0 -< > Hello Tesh -< $ ./job -$ cat > file2.tesh - -! expect return $EEXITCODENOTMATCH - -# in this case the option `keep-going' is not specified so Tesh detects the error and interrupt all the folowing units. -$ tesh --log="log.thresh:info tesh.fmt:%m%n" file1.tesh file2.tesh -> Test unit from file1.tesh -> [file1.tesh:3] ./job -> [file1.tesh:3] ./job : NOK (returned code `0' instead `1') -> Output of so far: -> ||Hello Tesh -> || -> Test unit `file1.tesh': NOK ( exit code mismatch) - -< ! expect return 1 -< > Hello Tesh -< $ ./job -< -< ! expect return 0 -< > Hello Tesh -< $ ./job -< -< ! expect return 0 -< > Hello Tesh -< $ ./job -< -< ! expect return 0 -< > Hello Tesh -< $ ./job -< -< ! expect return 0 -< > Hello Tesh -< $ ./job -$ cat > file1.tesh - -< ! expect return 0 -< > Hello Tesh -< $ ./job -< -< ! expect return 0 -< > Hello Tesh -< $ ./job -< -< ! expect return 0 -< > Hello Tesh -< $ ./job -< -< ! expect return 0 -< > Hello Tesh -< $ ./job -< -< ! expect return 0 -< > Hello Tesh -< $ ./job -$ cat > file2.tesh - -! expect return $EEXITCODENOTMATCH - -# in this case the option `keep-going' is specified so, Tesh execute all the other units. -$ tesh --log="log.thresh:info tesh.fmt:%m%n" file1.tesh file2.tesh --keep-going -> Test unit from file1.tesh -> [file1.tesh:3] ./job -> [file1.tesh:3] ./job : NOK (returned code `0' instead `1') -> Output of so far: -> ||Hello Tesh -> || -> Test unit `file1.tesh': NOK ( exit code mismatch) -> Test unit from file2.tesh -> [file2.tesh:3] ./job -> [file2.tesh:7] ./job -> [file2.tesh:11] ./job -> [file2.tesh:15] ./job -> [file2.tesh:19] ./job -> Test unit from file2.tesh OK - -$ rm -f file1.tesh - -$ rm -f file2.tesh - -$ rm -f job - -$ rm -f job.c \ No newline at end of file