Modifying the test script (is now a python script)
[sfa.git] / testbeds / iotlab / tests / bash_testsuite
index a36072b..01cec74 100755 (executable)
@@ -1,52 +1,67 @@
-#!/bin/bash
-if (( ! $# == 2 ))
-then
-    echo " Usage : bash_test takes 2 arguments : one jobid and one of the following:"
-    echo " LDAP/ OAR / driver "
-    echo  $#
-    exit
-fi
+#!/usr/bin/env python
 
-sfi.py list iotlab
-echo " =================    SFI.PY RESOURCES            ============="
-sfi.py resources
+import os
 
-echo " ================= SFI.PY RESOURCES -R SLAB        ============="
-sfi.py resources -r iotlab
 
-echo " =================    SFI.PY RESOURCES -L ALL      ============="
-sfi.py resources -l all
+print " =================    SFI.PY LIST IOTLAB        ============="
+os.system('sfi.py list iotlab')
 
-echo " ================= SFI.PY RESOURCES -R SLAB -L ALL ============="
-sfi.py resources -r iotlab -l all
 
-echo " ================= SFI.PY RESOURCES -L ALL > avakian_adv.rspec ============="
-sfi.py resources -l all > /root/tests_rspecs/iotlab_devlille_OUTPUT.rspec
+print " =================    SFI.PY RESOURCES          ============="
+input("Press Enter to continue...")
+os.system('sfi.py resources')
 
-echo " ================= SFI.PY RESOURCES avakian_adv.rspec ============="
-sfi.py resources iotlab.avakian_slice
+print " ================= SFI.PY RESOURCES -R IOTLAB        ============="
+input("Press Enter to continue...")
+os.system('sfi.py resources -r iotlab')
 
+print " =================    SFI.PY RESOURCES -L ALL      ============="
+input("Press Enter to continue...")
+os.system('sfi.py resources -l all')
 
-echo " =================    SFI.PY SHOW SLICE   ============="
-sfi.py show iotlab.avakian_slice
+print " ================= SFI.PY RESOURCES -R IOTLAB -L ALL ============="
+input("Press Enter to continue...")
+os.system('sfi.py resources -r iotlab -l all')
 
-echo " =================    SFI.PY SHOW USER   ============="
-sfi.py show iotlab.avakian
+print " ================= SFI.PY RESOURCES -L ALL > avakian_adv.rspec ==========="
+os.system('sfi.py resources -l all > /root/tests_rspecs/iotlab_devlille_OUTPUT.rspec')
 
-echo " =================    SFI.PY SHOW NODE   ============="
-sfi.py show iotlab.node6.devlille.senslab.info
+print " ================= SFI.PY RESOURCES -L LEASES  ============="
+input("Press Enter to continue...")
+os.system('sfi.py resources -l leases')
 
-echo " =================    SFI.PY SLICES       ============="
-sfi.py slices
+print " =================SFI.PY RESOURCES -L LEASES -R IOTLAB ============== "
+os.system('sfi.py resources -r iotlab -l leases')
 
-echo " =================    SFI.PY STATUS SLICE   ============="
-sfi.py status iotlab.avakian_slice
+print " ================= SFI.PY RESOURCES avakian_adv.rspec ============="
+input("Press Enter to continue...")
+os.system('sfi.py resources iotlab.avakian_slice')
 
-echo " =================    SFI.PY CREATE SLICE   ============="
-sfi.py create iotlab.avakian_slice /root/tests_rspecs/iotlab_devlille.rspec
 
-# echo " =================    SFI.PY DELETE SLICE   ============="
-# sfi.py delete iotlab.avakian_slice
+print " =================    SFI.PY SHOW SLICE   ============="
+os.system('sfi.py show iotlab.avakian_slice')
+
+print " =================    SFI.PY SHOW USER   ============="
+input("Press Enter to continue...")
+os.system('sfi.py show iotlab.avakian')
+
+print " =================    SFI.PY SHOW NODE   ============="
+os.system('sfi.py show iotlab.node6.devlille.senslab.info')
+
+print " =================    SFI.PY SLICES       ============="
+input("Press Enter to continue...")
+os.system('sfi.py slices')
+
+print " =================    SFI.PY STATUS SLICE   ============="
+os.system('sfi.py status iotlab.avakian_slice')
+
+print " =================    SFI.PY CREATE SLICE   ============="
+input("Press Enter to continue...")
+os.system('sfi.py create iotlab.avakian_slice /root/tests_rspecs/iotlab_devlille.rspec')
+
+
+print " =================    SFI.PY DELETE SLICE   ============="
+input("Press Enter to continue...")
+os.system('sfi.py delete iotlab.avakian_slice')
+print "\r\n"
 
-echo "\r\n"
-echo " PYTHON TEST ", $1, $2