cosmetic stuff that was lost in the mix
[tests.git] / system / config_default.py
index e1a3a75..337132a 100644 (file)
@@ -136,12 +136,31 @@ def initscripts(options,index):
     initscripts= [ { 'initscript_fields' : 
                      { 'enabled' : True,
                        'name':'script1',
-                       'script' : '#! /bin/sh\n (echo Starting test initscript: Stage 1; date) > /tmp/script1.stamp \n ',
+                       'script' : """#! /bin/sh
+(echo Starting test initscript: script1; date) >> /tmp/script1.stamp
+# expected to be 'start'
+command=$1; shift
+# get slice name
+slicename=$1; shift
+echo "This is the stdout of the sliver $slicename initscript $command (exp. start) pid=$$" 
+echo "This is the stderr of the sliver $slicename initscript $command (exp. start) pid=$$" 1>&2
+""",
                        }},
                    { 'initscript_fields' : 
                      { 'enabled' : True,
                        'name':'script2',
-                       'script' : '#! /bin/sh\n (echo Starting test initscript: Stage 2; date) > /tmp/script2.stamp \n ',
+                       'script' : """#! /bin/sh
+(echo Starting loop-forever test initscript: script2; date) >> /tmp/script2.stamp
+# expected to be 'start'
+command=$1; shift
+# get slice name
+slicename=$1; shift
+while true; do
+echo "This is the stdout of the loop-for-ever sliver initscript $slicename $command (exp. start) $$" 
+echo "This is the stderr of the loop-for-ever sliver initscript $slicename $command (exp. start) $$" 1>&2
+sleep 10
+done
+""",
                        }},
                    ]
     return initscripts
@@ -194,9 +213,9 @@ def leases (options, index):
     counter=0
     slices=all_slicenames(options,index)
     slice_sequence = slices[:1] + slices + [None,]
-    for iterator in range(100):
+    for iterator in range(12):
         for slice in slice_sequence:
-            leases += { 'slice' : slice, 't_from':counter,'t_until':counter+reservation_granularity}
+            leases.append ( {'slice' : slice, 't_from':counter,'t_until':counter+reservation_granularity} )
             counter += reservation_granularity
     return leases