浏览代码

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 [ \