From: cherierm Date: Wed, 7 May 2008 12:02:59 +0000 (+0000) Subject: some changes for Windows (shell) compatibility and comment the sync call to test... X-Git-Tag: v3.3~519 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/842b8b761b8c0efdade0e9f688b22ac8ae89d965 some changes for Windows (shell) compatibility and comment the sync call to test (not implemented on Windows) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5408 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/tools/tesh2/examples/IO-bigsize.tesh b/tools/tesh2/examples/IO-bigsize.tesh index 591c671984..c92366242a 100644 --- a/tools/tesh2/examples/IO-bigsize.tesh +++ b/tools/tesh2/examples/IO-bigsize.tesh @@ -2013,7 +2013,7 @@ p And now, a read/write test < 997 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA < 998 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA < 999 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -$ Cat +$ cat > 000 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA > 001 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA > 002 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA diff --git a/tools/tesh2/examples/IO-orders.tesh b/tools/tesh2/examples/IO-orders.tesh index a0a6b34ce3..ec5aad5637 100644 --- a/tools/tesh2/examples/IO-orders.tesh +++ b/tools/tesh2/examples/IO-orders.tesh @@ -4,36 +4,36 @@ p This tests that TESH accepts any order for the input/output p Order: in, out, cmd < < TOTO < > TOTO -< $ Cat -$ ./tesh --log="log.thresh:info tesh.fmt:%m%n" +< $ cat +$ ../tesh --log="log.thresh:info tesh.fmt:%m%n" p Order: out, in, cmd < > TOTO < < TOTO -< $ Cat -$ ./tesh --log="log.thresh:info tesh.fmt:%m%n" +< $ cat +$ ../tesh --log="log.thresh:info tesh.fmt:%m%n" p Order: out, cmd, in < > TOTO -< $ Cat +< $ cat < < TOTO -$ ./tesh --log="log.thresh:info tesh.fmt:%m%n" +$ ../tesh --log="log.thresh:info tesh.fmt:%m%n" p Order: in, cmd, out < < TOTO -< $ Cat +< $ cat < > TOTO -$ ./tesh --log="log.thresh:info tesh.fmt:%m%n" +$ ../tesh --log="log.thresh:info tesh.fmt:%m%n" p Order: cmd, out, in -< $ Cat +< $ cat < > TOTO < < TOTO -$ ./tesh --log="log.thresh:info tesh.fmt:%m%n" +$ ../tesh --log="log.thresh:info tesh.fmt:%m%n" p Order: cmd, in, out -< $ Cat +< $ cat < < TOTO < > TOTO -$ ./tesh --log="log.thresh:info tesh.fmt:%m%n" +$ ../tesh --log="log.thresh:info tesh.fmt:%m%n" diff --git a/tools/tesh2/examples/README.tesh b/tools/tesh2/examples/README.tesh index 9ec918360e..f76a09beda 100644 --- a/tools/tesh2/examples/README.tesh +++ b/tools/tesh2/examples/README.tesh @@ -32,12 +32,12 @@ are separated by blank lines). It is possible to place these lines either after the command or before. The difference between the two following chunks is mainly cosmetic in your testsuites, TESH don't care. (cf IO-orders.tesh) - $ Cat + $ cat < TOTO > TOTO > TOTO - $ Cat + $ cat < TOTO Nevertheless, it is possible to have several commands in the same block, but @@ -47,10 +47,10 @@ errors such as the following: $ cd toto > TOTO - $ Cat > file + $ cat > file TOTO will be passed to the cd command, where the user clearly want to pass it -to Cat. +to cat. RETURN CODE ----------- diff --git a/tools/tesh2/examples/background.tesh b/tools/tesh2/examples/background.tesh index e13b648e3d..988eba8469 100644 --- a/tools/tesh2/examples/background.tesh +++ b/tools/tesh2/examples/background.tesh @@ -34,7 +34,7 @@ $ cd temp_testdir < } < return 0; < } -$ Cat > delayed_cat.c +$ cat > delayed_cat.c $ gcc -Wall -o delayed_cat delayed_cat.c @@ -42,7 +42,7 @@ $ gcc -Wall -o delayed_cat delayed_cat.c > TOTO < TOTO -$ Cat > tmp_fich +$ cat > tmp_fich $ sleep 2 $ cd .. diff --git a/tools/tesh2/examples/basic.tesh b/tools/tesh2/examples/basic.tesh index 6b7cd00b61..366c97a4d8 100644 --- a/tools/tesh2/examples/basic.tesh +++ b/tools/tesh2/examples/basic.tesh @@ -4,9 +4,9 @@ p This is a basic test < TOTO \ TUTU -$ Cat > tmp_fich +$ cat > tmp_fich -$ Cat tmp_fich +$ cat tmp_fich > TOTO TUTU $ rm tmp_fich @@ -17,9 +17,9 @@ p And now, some multilines examples < b < c < d -$ Cat > tmp_fich +$ cat > tmp_fich -$ Cat tmp_fich +$ cat tmp_fich > a > b > c diff --git a/tools/tesh2/examples/bg-basic.tesh b/tools/tesh2/examples/bg-basic.tesh index 2f78ae8529..e6d72dc3b0 100644 --- a/tools/tesh2/examples/bg-basic.tesh +++ b/tools/tesh2/examples/bg-basic.tesh @@ -4,7 +4,7 @@ p This is a basic test < TOTO \ TUTU -& Cat +& cat > TOTO TUTU p And now, some multilines examples @@ -13,7 +13,7 @@ p And now, some multilines examples < b < c < d -& Cat +& cat > a > b > c diff --git a/tools/tesh2/examples/bg-set-signal.tesh b/tools/tesh2/examples/bg-set-signal.tesh index 8754728b36..f6e4be8255 100644 --- a/tools/tesh2/examples/bg-set-signal.tesh +++ b/tools/tesh2/examples/bg-set-signal.tesh @@ -11,7 +11,7 @@ $ cd temp_testdir < char *A=NULL; < *A = 1; < } -$ Cat > segfault.c +$ cat > segfault.c $ gcc -o segfault segfault.c ! expect signal SIGSEGV diff --git a/tools/tesh2/examples/catch-return.tesh b/tools/tesh2/examples/catch-return.tesh index f42bdb6b0e..d254e754b2 100644 --- a/tools/tesh2/examples/catch-return.tesh +++ b/tools/tesh2/examples/catch-return.tesh @@ -10,7 +10,7 @@ $ cd temp_testdir < int main(void) { < exit(1); < } -$ Cat > return1.c +$ cat > return1.c $ gcc -o return1 return1.c diff --git a/tools/tesh2/examples/catch-signal.tesh b/tools/tesh2/examples/catch-signal.tesh index 874155d56f..5155d0473f 100644 --- a/tools/tesh2/examples/catch-signal.tesh +++ b/tools/tesh2/examples/catch-signal.tesh @@ -11,7 +11,7 @@ $ cd temp_testdir < char *A=NULL; < *A = 1; < } -$ Cat > segfault.c +$ cat > segfault.c $ gcc -o segfault segfault.c @@ -19,5 +19,6 @@ $ gcc -o segfault segfault.c < $ ./segfault $ ../tesh --log="log.thresh:info tesh.fmt:%m%n" + $ cd .. $ rm -rf temp_testdir diff --git a/tools/tesh2/examples/catch-wrong-output.tesh b/tools/tesh2/examples/catch-wrong-output.tesh index 877642045b..1356a1e7e3 100644 --- a/tools/tesh2/examples/catch-wrong-output.tesh +++ b/tools/tesh2/examples/catch-wrong-output.tesh @@ -2,11 +2,15 @@ p This tests whether TESH detects wrong outputs -! expect return $EOUTPUTNOTMATCH +! expect return 2 < > TOTO < < TUTU < $ cat $ ./tesh --log="log.thresh:info tesh.fmt:%m%n" - - +> Test suite from stdin +> [stdin:3] cat +> Output of mismatch: +> - TOTO +> + TUTU +> Test suite `(stdin)': NOK ( output mismatch) diff --git a/tools/tesh2/examples/cd.tesh b/tools/tesh2/examples/cd.tesh index 500b6d18af..1e175f1eee 100644 --- a/tools/tesh2/examples/cd.tesh +++ b/tools/tesh2/examples/cd.tesh @@ -12,6 +12,7 @@ $ ls # Check that tesh detects properly cd to non-existing directories ! expect return $ENOENT < $ cd toto + $ ../tesh --log="log.thresh:info tesh.fmt:%m%n" # The next command checks that there is a testdir_temp in the upper directory, diff --git a/tools/tesh2/examples/set-ignore-output.tesh b/tools/tesh2/examples/set-ignore-output.tesh index f091545c6a..f77b51cc78 100644 --- a/tools/tesh2/examples/set-ignore-output.tesh +++ b/tools/tesh2/examples/set-ignore-output.tesh @@ -5,6 +5,6 @@ p This tests whether TESH accepts to ignore command output < ! output ignore < > TOTO < < TUTU -< $ Cat -$ ./tesh --log="log.thresh:info tesh.fmt:%m%n" +< $ cat +$ ../tesh --log="log.thresh:info tesh.fmt:%m%n" diff --git a/tools/tesh2/examples/set-return.tesh b/tools/tesh2/examples/set-return.tesh index 204aded5fc..a560075683 100644 --- a/tools/tesh2/examples/set-return.tesh +++ b/tools/tesh2/examples/set-return.tesh @@ -10,7 +10,7 @@ $ cd temp_testdir < int main(void) { < exit(1); < } -$ Cat > return1.c +$ cat > return1.c $ gcc -o return1 return1.c diff --git a/tools/tesh2/examples/set-signal.tesh b/tools/tesh2/examples/set-signal.tesh index ac872db569..5e40c38c94 100644 --- a/tools/tesh2/examples/set-signal.tesh +++ b/tools/tesh2/examples/set-signal.tesh @@ -11,7 +11,7 @@ $ cd temp_testdir < char *A=NULL; < *A = 1; < } -$ Cat > segfault.c +$ cat > segfault.c $ gcc -o segfault segfault.c ! expect signal SIGSEGV