Browse code

Merge "Add RUN_EXERCISES to exercise.sh."

Jenkins authored on 2013/03/15 23:38:20
Showing 1 changed files
... ...
@@ -17,9 +17,19 @@ source $TOP_DIR/stackrc
17 17
 # to refrain from exercising euca.sh use SKIP_EXERCISES=euca
18 18
 SKIP_EXERCISES=${SKIP_EXERCISES:-""}
19 19
 
20
-# Locate the scripts we should run
21
-EXERCISE_DIR=$(dirname "$0")/exercises
22
-basenames=$(for b in `ls $EXERCISE_DIR/*.sh`; do basename $b .sh; done)
20
+# comma separated list of script basenames to run
21
+# to run only euca.sh use RUN_EXERCISES=euca
22
+basenames=${RUN_EXERCISES:-""}
23
+
24
+EXERCISE_DIR=$TOP_DIR/exercises
25
+
26
+if [ -z "${basenames}" ] ; then
27
+    # Locate the scripts we should run
28
+    basenames=$(for b in `ls $EXERCISE_DIR/*.sh`; do basename $b .sh; done)
29
+else
30
+    # If RUN_EXERCISES was specified, ignore SKIP_EXERCISES.
31
+    SKIP_EXERCISES=
32
+fi
23 33
 
24 34
 # Track the state of each script
25 35
 passes=""