Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Convert to C++, and call get_pid() directly.
[simgrid.git] / tools / tesh / catch-timeout-output.tesh
1 #!/usr/bin/env tesh
2
3 # Checks that the output of a timeout process can be printed.
4
5 ! expect return 2
6 < ! timeout 1
7 < $ sh -c 'echo "I crashed" && sleep 6'
8 > Test suite from stdin
9 > [(stdin):2] sh -c 'echo "I crashed" && sleep 6'
10 > Test suite `(stdin)': NOK (<(stdin):2> timeout after 1 sec)
11 > Output of <(stdin):2> mismatch:
12 > --- expected
13 > +++ obtained
14 > @@ -0,0 +1 @@
15 > +I crashed
16 > Test suite `(stdin)': NOK (<(stdin):2> output mismatch)
17 $ ${bindir:=.}/tesh
18
19