Don't log stderr per-exercise, because stdout is barfy anyway.
Move the state of skip/pass/fail to the end of the exercise run.
| ... | ... |
@@ -6,19 +6,41 @@ |
| 6 | 6 |
# to refrain from exercising euca.sh use SKIP_EXERCISES=euca |
| 7 | 7 |
SKIP_EXERCISES=${SKIP_EXERCISES:-""}
|
| 8 | 8 |
|
| 9 |
+# Locate the scripts we should run |
|
| 9 | 10 |
EXERCISE_DIR=$(dirname "$0")/exercises |
| 10 | 11 |
basenames=$(for b in `ls $EXERCISE_DIR/*.sh` ; do basename $b .sh ; done) |
| 11 | 12 |
|
| 13 |
+# Track the state of each script |
|
| 14 |
+passes="" |
|
| 15 |
+failures="" |
|
| 16 |
+skips="" |
|
| 17 |
+ |
|
| 18 |
+# Loop over each possible script (by basename) |
|
| 12 | 19 |
for script in $basenames ; do |
| 13 | 20 |
if [[ "$SKIP_EXERCISES" =~ $script ]] ; then |
| 14 |
- echo SKIPPING $script |
|
| 21 |
+ skips="$skips $script" |
|
| 15 | 22 |
else |
| 23 |
+ echo ========================= |
|
| 16 | 24 |
echo Running $script |
| 17 |
- $EXERCISE_DIR/$script.sh 2> $script.log |
|
| 25 |
+ echo ========================= |
|
| 26 |
+ $EXERCISE_DIR/$script.sh |
|
| 18 | 27 |
if [[ $? -ne 0 ]] ; then |
| 19 |
- echo FAILED. See $script.log |
|
| 28 |
+ failures="$failures $script" |
|
| 20 | 29 |
else |
| 21 |
- rm $script.log |
|
| 30 |
+ passes="$passes $script" |
|
| 22 | 31 |
fi |
| 23 | 32 |
fi |
| 24 | 33 |
done |
| 34 |
+ |
|
| 35 |
+# output status of exercise run |
|
| 36 |
+echo ========================= |
|
| 37 |
+echo ========================= |
|
| 38 |
+for script in $skips ; do |
|
| 39 |
+ echo SKIP $script |
|
| 40 |
+done |
|
| 41 |
+for script in $passes ; do |
|
| 42 |
+ echo PASS $script |
|
| 43 |
+done |
|
| 44 |
+for script in $failures ; do |
|
| 45 |
+ echo FAILED $script |
|
| 46 |
+done |
| ... | ... |
@@ -25,7 +25,7 @@ popd |
| 25 | 25 |
IMAGE=`euca-describe-images | grep machine | cut -f2` |
| 26 | 26 |
|
| 27 | 27 |
# launch it |
| 28 |
-INSTANCE=`euca-run-instance $IMAGE | grep INSTANCE | cut -f2` |
|
| 28 |
+INSTANCE=`euca-run-instances $IMAGE | grep INSTANCE | cut -f2` |
|
| 29 | 29 |
|
| 30 | 30 |
# assure it has booted within a reasonable time |
| 31 | 31 |
if ! timeout $BOOT_TIMEOUT sh -c "while euca-describe-instances $INSTANCE | grep -q running; do sleep 1; done"; then |