diff --git a/exercise.sh b/exercise.sh index 5b3c56e288..3516738549 100755 --- a/exercise.sh +++ b/exercise.sh @@ -17,9 +17,19 @@ source $TOP_DIR/stackrc # to refrain from exercising euca.sh use SKIP_EXERCISES=euca SKIP_EXERCISES=${SKIP_EXERCISES:-""} -# Locate the scripts we should run -EXERCISE_DIR=$(dirname "$0")/exercises -basenames=$(for b in `ls $EXERCISE_DIR/*.sh`; do basename $b .sh; done) +# comma separated list of script basenames to run +# to run only euca.sh use RUN_EXERCISES=euca +basenames=${RUN_EXERCISES:-""} + +EXERCISE_DIR=$TOP_DIR/exercises + +if [ -z "${basenames}" ] ; then + # Locate the scripts we should run + basenames=$(for b in `ls $EXERCISE_DIR/*.sh`; do basename $b .sh; done) +else + # If RUN_EXERCISES was specified, ignore SKIP_EXERCISES. + SKIP_EXERCISES= +fi # Track the state of each script passes=""