Add RUN_EXERCISES to exercise.sh.
The exercise.sh accepted a SKIP_EXERCISES var for limiting which exercises run. Sometimes I only want to run one of this. This new variable make that much easier than having to list every other exercise as one that should be skipped. Change-Id: I21d3cc6ead677d25f7697c6cc1fd690cbbbfbdd7
This commit is contained in:
parent
8738759663
commit
a845ddedfc
16
exercise.sh
16
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=""
|
||||
|
Loading…
Reference in New Issue
Block a user