From: cherierm Date: Wed, 25 Jun 2008 07:53:01 +0000 (+0000) Subject: The path of tesh is added in the environment variable PATH so, do not use the relativ... X-Git-Tag: v3.3~297 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/ee964dcd8dbf778a1e2adad6c32ddd6914d85449 The path of tesh is added in the environment variable PATH so, do not use the relative path of tesh but simply tesh. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5803 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/tools/tesh2/examples/IO-orders.tesh b/tools/tesh2/examples/IO-orders.tesh index 3cc8033bfd..20386a2775 100644 --- a/tools/tesh2/examples/IO-orders.tesh +++ b/tools/tesh2/examples/IO-orders.tesh @@ -8,7 +8,7 @@ p Order: in, out, cmd > Test unit from stdin > [stdin:3] cat > Test unit from stdin OK -$ ./tesh --log="log.thresh:info tesh.fmt:%m%n" +$ tesh --log="log.thresh:info tesh.fmt:%m%n" p Order: out, in, cmd < > TOTO @@ -17,7 +17,7 @@ p Order: out, in, cmd > Test unit from stdin > [stdin:3] cat > Test unit from stdin OK -$ ./tesh --log="log.thresh:info tesh.fmt:%m%n" +$ tesh --log="log.thresh:info tesh.fmt:%m%n" p Order: out, cmd, in < > TOTO @@ -26,7 +26,7 @@ p Order: out, cmd, in > Test unit from stdin > [stdin:2] cat > Test unit from stdin OK -$ ./tesh --log="log.thresh:info tesh.fmt:%m%n" +$ tesh --log="log.thresh:info tesh.fmt:%m%n" p Order: in, cmd, out < < TOTO @@ -35,5 +35,5 @@ p Order: in, cmd, out > Test unit from stdin > [stdin:2] cat > Test unit from stdin OK -$ ./tesh --log="log.thresh:info tesh.fmt:%m%n" +$ tesh --log="log.thresh:info tesh.fmt:%m%n" diff --git a/tools/tesh2/examples/catch-return.tesh b/tools/tesh2/examples/catch-return.tesh index 6411ec9005..1f8812f747 100644 --- a/tools/tesh2/examples/catch-return.tesh +++ b/tools/tesh2/examples/catch-return.tesh @@ -1 +1 @@ -#! ./tesh # This suite builds and uses a program returning 1. # tesh must detect this condition and report the issue. $ rm -rf temp_testdir $ mkdir temp_testdir $ cd temp_testdir < #include < int main(void) { < exit(1); < } $ cat > return1.c $ gcc -o return1 return1.c ! expect return $EEXITCODENOTMATCH < $ ./return1 $ ../tesh --log="log.thresh:info tesh.fmt:%m%n" > Test unit from stdin > [stdin:1] ./return1 > [stdin:1] ./return1 : NOK (returned code `1' instead `0') > Output of so far: > || > Test unit `stdin': NOK ( exit code mismatch) $ cd .. $ rm -rf temp_testdir \ No newline at end of file +#! ./tesh # This suite builds and uses a program returning 1. # tesh must detect this condition and report the issue. $ rm -rf temp_testdir $ mkdir temp_testdir $ cd temp_testdir < #include < int main(void) { < exit(1); < } $ cat > return1.c $ gcc -o return1 return1.c ! expect return $EEXITCODENOTMATCH < $ ./return1 $ tesh --log="log.thresh:info tesh.fmt:%m%n" > Test unit from stdin > [stdin:1] ./return1 > [stdin:1] ./return1 : NOK (returned code `1' instead `0') > Output of so far: > || > Test unit `stdin': NOK ( exit code mismatch) $ cd .. $ rm -rf temp_testdir \ No newline at end of file diff --git a/tools/tesh2/examples/catch-signal.tesh b/tools/tesh2/examples/catch-signal.tesh index c2e425d8bc..1740613257 100644 --- a/tools/tesh2/examples/catch-signal.tesh +++ b/tools/tesh2/examples/catch-signal.tesh @@ -17,7 +17,7 @@ $ gcc -o segfault segfault.c ! expect return $EUNXPSIG < $ ./segfault -$ ../tesh --log="log.thresh:info tesh.fmt:%m%n" +$ tesh --log="log.thresh:info tesh.fmt:%m%n" > Test unit from stdin > [stdin:1] ./segfault > [stdin:1] `./segfault' : NOK (unexpected signal `SIGSEGV' caught) diff --git a/tools/tesh2/examples/catch-timeout.tesh b/tools/tesh2/examples/catch-timeout.tesh index 90453774bc..1f2e8f9515 100644 --- a/tools/tesh2/examples/catch-timeout.tesh +++ b/tools/tesh2/examples/catch-timeout.tesh @@ -12,4 +12,4 @@ > [stdin:2] Kill the process `sleep 6' > [stdin:2] No output before timeout > Test unit `stdin': NOK ( command timed out) -$ ./tesh --log="log.thresh:info tesh.fmt:%m%n" +$ tesh --log="log.thresh:info tesh.fmt:%m%n" diff --git a/tools/tesh2/examples/catch-wrong-output.tesh b/tools/tesh2/examples/catch-wrong-output.tesh index 75999b630d..b4179ac004 100644 --- a/tools/tesh2/examples/catch-wrong-output.tesh +++ b/tools/tesh2/examples/catch-wrong-output.tesh @@ -6,7 +6,7 @@ p This tests whether TESH detects wrong outputs < > TOTO < < TUTU < $ cat -$ ./tesh --log="log.thresh:info tesh.fmt:%m%n" +$ tesh --log="log.thresh:info tesh.fmt:%m%n" > Test unit from stdin > [stdin:3] cat > [stdin:3] `cat' : NOK (outputs mismatch): diff --git a/tools/tesh2/examples/cd.tesh b/tools/tesh2/examples/cd.tesh index e268620310..7f8cde7d6c 100644 --- a/tools/tesh2/examples/cd.tesh +++ b/tools/tesh2/examples/cd.tesh @@ -16,7 +16,7 @@ $ ls > [stdin:1] cd toto > [stdin:1] Chdir to toto failed: no such file or directory > Test unit `stdin': NOK ( no such file or directory) -$ ../tesh --log="log.thresh:info tesh.fmt:%m%n" +$ tesh --log="log.thresh:info tesh.fmt:%m%n" # The next command checks that there is a testdir_temp in the upper directory, # ie that mkdir and cd both worked. diff --git a/tools/tesh2/examples/jobs.tesh b/tools/tesh2/examples/jobs.tesh index 4198bb3499..0a2a91654f 100644 --- a/tools/tesh2/examples/jobs.tesh +++ b/tools/tesh2/examples/jobs.tesh @@ -20,7 +20,7 @@ $ gcc -o job job.c # Ignore output of the command because we can't known the order of the execution of the Tesh files. ! output ignore -$ ./tesh --log="log.thresh:info tesh.fmt:%m%n" --silent --jobs --directory=examples jobs1.tesh jobs2.tesh jobs3.tesh jobs4.tesh jobs5.tesh jobs6.tesh jobs7.tesh jobs8.tesh jobs9.tesh +$ tesh --log="log.thresh:info tesh.fmt:%m%n" --silent --jobs --directory=${teshexample_dir:=.} jobs1.tesh jobs2.tesh jobs3.tesh jobs4.tesh jobs5.tesh jobs6.tesh jobs7.tesh jobs8.tesh jobs9.tesh $ rm -f job diff --git a/tools/tesh2/examples/keep-going-unit.tesh b/tools/tesh2/examples/keep-going-unit.tesh index 342893a2d5..b2b00cb3de 100644 --- a/tools/tesh2/examples/keep-going-unit.tesh +++ b/tools/tesh2/examples/keep-going-unit.tesh @@ -39,7 +39,7 @@ $ gcc -o job job.c < ! expect return 0 < > Hello Tesh < $ ./job -$ ./tesh --log="log.thresh:info tesh.fmt:%m%n" +$ tesh --log="log.thresh:info tesh.fmt:%m%n" > Test unit from stdin > [stdin:3] ./job > [stdin:3] ./job : NOK (returned code `0' instead `1') @@ -71,7 +71,7 @@ $ ./tesh --log="log.thresh:info tesh.fmt:%m%n" < ! expect return 0 < > Hello Tesh < $ ./job -$ ./tesh --log="log.thresh:info tesh.fmt:%m%n" --keep-going-unit +$ tesh --log="log.thresh:info tesh.fmt:%m%n" --keep-going-unit > Test unit from stdin > [stdin:3] ./job > [stdin:3] ./job : NOK (returned code `0' instead `1') diff --git a/tools/tesh2/examples/keep-going.tesh b/tools/tesh2/examples/keep-going.tesh index 7cd792988d..4118f3bbb0 100644 --- a/tools/tesh2/examples/keep-going.tesh +++ b/tools/tesh2/examples/keep-going.tesh @@ -63,7 +63,7 @@ $ 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 +$ 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') @@ -117,7 +117,7 @@ $ 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 +$ 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') diff --git a/tools/tesh2/examples/set-ignore-output.tesh b/tools/tesh2/examples/set-ignore-output.tesh index 818cf3859c..ea4db9dc78 100644 --- a/tools/tesh2/examples/set-ignore-output.tesh +++ b/tools/tesh2/examples/set-ignore-output.tesh @@ -6,7 +6,7 @@ p This tests whether TESH accepts to ignore command output < > TOTO < < TUTU < $ cat -$ ./tesh --log="log.thresh:info tesh.fmt:%m%n" +$ tesh --log="log.thresh:info tesh.fmt:%m%n" > Test unit from stdin > [stdin:4] cat > (ignoring the output of as requested) diff --git a/tools/tesh2/examples/var.tesh b/tools/tesh2/examples/var.tesh index 52696436a3..ecc263985c 100644 --- a/tools/tesh2/examples/var.tesh +++ b/tools/tesh2/examples/var.tesh @@ -23,7 +23,7 @@ D Usage of tesh variables ! expect return $ESYNTAX < ! include-file= < ! include $include-file -$ ./tesh --log="log.thresh:info tesh.fmt:%m%n" +$ tesh --log="log.thresh:info tesh.fmt:%m%n" > Test unit from stdin > [stdin:1] Undefined variable `(include-file)' > Test unit `stdin': NOK ( syntax error) @@ -100,7 +100,7 @@ p On this platform ENOENT is: $ENOENT ! expect return $ESYNTAX < ! ENOENT=300 < $ echo $ENOENT -$ ./tesh --log="log.thresh:info tesh.fmt:%m%n" +$ tesh --log="log.thresh:info tesh.fmt:%m%n" > Test unit from stdin > [stdin:1] A system variable named `(ENOENT)' already exists > Test unit `stdin': NOK ( syntax error)