Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Propagate file renaming to windows
[simgrid.git] / tools / tesh2 / tests / suite-usage.tesh
1 #! ./tesh
2
3 # This suite show how to use the suite concept. A suite is specified
4 # by the metacommand suite have a description and contains some units.
5
6 # declare and define the variable dir
7 ! testdir=temp_testdir
8
9 # delete the temp_testdir if it already exists
10 $ rm -rf $testdir
11
12 # create the tempory test directory
13 $ mkdir $testdir
14
15 # enter in the tempory test directory
16 $ cd $testdir
17
18 $ cd ..
19
20 $ rm -rf $testdir
21
22 # this is the first suite
23 ! suite first suite
24 ! include set-timeout.tesh display how to use the timeout metacommand
25 ! include set-signal.tesh display how to use the signal metacommand
26 # this unit has no description (the file name of the unit will be used)
27 ! include background.tesh
28
29 # this is the second suite
30 ! suite second suite
31 ! include cd.tesh
32 ! include basic.tesh
33 ! include bg-basic.tesh like basic but used backgrounded commands
34
35 # a simple inclusion
36 ! include catch-return.tesh             
37
38 # declare and define some variables
39 ! description=the description of the unit
40 ! arg=hello tesh
41 ! rv=0
42 ! t=5
43 ! bin=./var-sample
44 ! expect return $rv
45 ! timeout $t
46 > $arg
47 $ $bin "$arg"
48