Эх сурвалжийг харах

Merge pull request #5485 from infosiftr/test-aliases

Fix image aliases for tests
yosifkit 6 жил өмнө
parent
commit
eec51c0f91
1 өөрчлөгдсөн 11 нэмэгдсэн , 5 устгасан
  1. 11 5
      test/run.sh

+ 11 - 5
test/run.sh

@@ -130,11 +130,17 @@ for dockerImage in "$@"; do
 		testRepo="${testRepo##*/}"
 	fi
 	
-	if [ -n "${testAlias[$repo:$variant]}" ]; then
-		testRepo="${testAlias[$repo:$variant]}"
-	elif [ -n "${testAlias[$repo]}" ]; then
-		testRepo="${testAlias[$repo]}"
-	fi
+	for possibleAlias in \
+		"${testAlias[$repo:$variant]}" \
+		"${testAlias[$repo]}" \
+		"${testAlias[$testRepo:$variant]}" \
+		"${testAlias[$testRepo]}" \
+	; do
+		if [ -n "$possibleAlias" ]; then
+			testRepo="$possibleAlias"
+			break
+		fi
+	done
 	
 	explicitVariant=
 	if [ \