Browse Source

Add a couple minor tweaks to test/run.sh

Tianon Gravi 11 years ago
parent
commit
4d846bd9e4
1 changed files with 3 additions and 7 deletions
  1. 3 7
      test/run.sh

+ 3 - 7
test/run.sh

@@ -66,11 +66,11 @@ for dockerImage in "$@"; do
 	tests=( "${globalTests[@]}" ${imageTests[$testRepo]} ${imageTests[$testRepo:$variant]} )
 	
 	failures=0
-	currentTest=1
+	currentTest=0
 	totalTest="${#tests[@]}"
 	for t in "${tests[@]}"; do
-		echo -ne "\t'$t' [$currentTest/$totalTest]..."
 		(( currentTest+=1 ))
+		echo -ne "\t'$t' [$currentTest/$totalTest]..."
 		
 		if [ ! -z "${globalExcludeTests[${testRepo}_$t]}" -o ! -z "${globalExcludeTests[${testRepo}:${variant}_$t]}" ]; then
 			echo 'skipping'
@@ -79,11 +79,7 @@ for dockerImage in "$@"; do
 		
 		# run test against dockerImage here
 		# find the script for the test
-		scriptDir=( "$dir/tests/$t" )
-		if [ "${#scriptDir[@]}" -gt 1 ]; then
-			echo >&2 "error: $t matches multiple files: ${scriptDir[*]}"
-			continue
-		fi
+		scriptDir="$dir/tests/$t"
 		if [ -d "$scriptDir" ]; then
 			script="$scriptDir/run.sh"
 			if [ -x "$script" -a ! -d "$script" ]; then