소스 검색

Merge pull request #5485 from infosiftr/test-aliases

Fix image aliases for tests
yosifkit 6 년 전
부모
커밋
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 [ \