Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
test files
authorcherierm <cherierm@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 7 Apr 2008 13:37:05 +0000 (13:37 +0000)
committercherierm <cherierm@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 7 Apr 2008 13:37:05 +0000 (13:37 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5328 48e7efb5-ca39-0410-a469-dd3cf9ba447f

tools/tesh2/tests/suite-usage.tesh [new file with mode: 0644]

diff --git a/tools/tesh2/tests/suite-usage.tesh b/tools/tesh2/tests/suite-usage.tesh
new file mode 100644 (file)
index 0000000..08ffe81
--- /dev/null
@@ -0,0 +1,48 @@
+#! ./tesh
+
+# This suite show how to use the suite concept. A suite is specified
+# by the metacommand suite have a description and contains some units.
+
+# declare and define the variable dir
+! testdir=temp_testdir
+
+# delete the temp_testdir if it already exists
+$ rm -rf $testdir
+
+# create the tempory test directory
+$ mkdir $testdir
+
+# enter in the tempory test directory
+$ cd $testdir
+
+$ cd ..
+
+$ rm -rf $testdir
+
+# this is the first suite
+! suite first suite
+! include set-timeout.tesh display how to use the timeout metacommand
+! include set-signal.tesh display how to use the signal metacommand
+# this unit has no description (the file name of the unit will be used)
+! include background.tesh
+
+# this is the second suite
+! suite second suite
+! include cd.tesh
+! include basic.tesh
+! include bg-basic.tesh like basic but used backgrounded commands
+
+# a simple inclusion
+! include catch-return.tesh            
+
+# declare and define some variables
+! description=the description of the unit
+! arg=hello tesh
+! rv=0
+! t=5
+! bin=./var-sample
+! expect return $rv
+! timeout $t
+> $arg
+$ $bin "$arg"
+