Do not duplicate string for testuite_name when tesh file is read
from stdin, and pass testsuite_name to handle_suite.
Also update tesh tesh files for s/stdin/(stdin)/.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8841
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
< > TOTO
< $ cat
> Test suite from stdin
-> [stdin:3] cat
+> [(stdin):3] cat
> Test suite from stdin OK
$ ./tesh --log='log.thresh:info tesh.fmt:%m%n'
< < TOTO
< $ cat
> Test suite from stdin
-> [stdin:3] cat
+> [(stdin):3] cat
> Test suite from stdin OK
$ ./tesh --log='log.thresh:info tesh.fmt:%m%n'
< $ cat
< < TOTO
> Test suite from stdin
-> [stdin:2] cat
+> [(stdin):2] cat
> Test suite from stdin OK
$ ./tesh --log='log.thresh:info tesh.fmt:%m%n'
< $ cat
< > TOTO
> Test suite from stdin
-> [stdin:2] cat
+> [(stdin):2] cat
> Test suite from stdin OK
$ ./tesh --log='log.thresh:info tesh.fmt:%m%n'
< > TOTO
< < TOTO
> Test suite from stdin
-> [stdin:1] cat
+> [(stdin):1] cat
> Test suite from stdin OK
$ ./tesh --log='log.thresh:info tesh.fmt:%m%n'
< < TOTO
< > TOTO
> Test suite from stdin
-> [stdin:1] cat
+> [(stdin):1] cat
> Test suite from stdin OK
$ ./tesh --log='log.thresh:info tesh.fmt:%m%n'
< $ ./return1
$ ../tesh --log='log.thresh:info tesh.fmt:%m%n'
> Test suite from stdin
-> [stdin:1] ./return1
-> Test suite `(stdin)': NOK (<stdin:1> returned code 1)
-> Output of <stdin:1> so far:
+> [(stdin):1] ./return1
+> Test suite `(stdin)': NOK (<(stdin):1> returned code 1)
+> Output of <(stdin):1> so far:
> ||
$ cd ..
< $ ./segfault
$ ../tesh --log='log.thresh:info tesh.fmt:%m%n'
> Test suite from stdin
-> [stdin:1] ./segfault
-> Test suite `(stdin)': NOK (<stdin:1> got signal SIGSEGV)
-> Output of <stdin:1> so far:
+> [(stdin):1] ./segfault
+> Test suite `(stdin)': NOK (<(stdin):1> got signal SIGSEGV)
+> Output of <(stdin):1> so far:
> ||
$ cd ..
< ! timeout 1
< $ sleep 6
> Test suite from stdin
-> [stdin:2] sleep 6
-> <stdin:2> timeouted. Kill the process.
-> <stdin:2> No output before timeout
-> Test suite `(stdin)': NOK (<stdin:2> timeout after 1 sec)
+> [(stdin):2] sleep 6
+> <(stdin):2> timeouted. Kill the process.
+> <(stdin):2> No output before timeout
+> Test suite `(stdin)': NOK (<(stdin):2> timeout after 1 sec)
$ ./tesh --log='log.thresh:info tesh.fmt:%m%n'
< $ cat
$ ./tesh --log='log.thresh:info tesh.fmt:%m%n'
> Test suite from stdin
-> [stdin:3] cat
-> Output of <stdin:3> mismatch:
+> [(stdin):3] cat
+> Output of <(stdin):3> mismatch:
> - TOTO
> + TUTU
-> Test suite `(stdin)': NOK (<stdin:3> output mismatch)
+> Test suite `(stdin)': NOK (<(stdin):3> output mismatch)
< $ cat
$ ./tesh --log='log.thresh:info tesh.fmt:%m%n'
> Test suite from stdin
-> [stdin:4] cat
-> (ignoring the output of <stdin:4> as requested)
+> [(stdin):4] cat
+> (ignoring the output of <(stdin):4> as requested)
> Test suite from stdin OK
/*** Options ***/
int timeout_value = 5; /* child timeout value */
-char *testsuite_name;
+const char *testsuite_name;
static void handle_line(const char *filepos, char *line)
{
/* Search end */
/* Find the description file */
if (argc == 1) {
INFO0("Test suite from stdin");
- testsuite_name = xbt_strdup("(stdin)");
- handle_suite("stdin", stdin);
+ testsuite_name = "(stdin)";
+ handle_suite(testsuite_name, stdin);
INFO0("Test suite from stdin OK");
} else {
int timeout_value; /* child timeout value */
rctx_t rctx;
-char *testsuite_name;
+const char *testsuite_name;
/* Environment related definitions */