浏览代码

Update "golang-hello-world" test to no-op on "gcc:4*" images (where Go is not supported)

Tianon Gravi 9 年之前
父节点
当前提交
a70cf0f56c

+ 1 - 0
test/tests/golang-hello-world/real-run.sh

@@ -0,0 +1 @@
+../run-go-in-container.sh

+ 0 - 1
test/tests/golang-hello-world/run.sh

@@ -1 +0,0 @@
-../run-go-in-container.sh

+ 14 - 0
test/tests/golang-hello-world/run.sh

@@ -0,0 +1,14 @@
+#!/bin/bash
+set -eo pipefail
+
+dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
+
+image="$1"
+
+if [[ "$image" == gcc:4* ]]; then
+	echo >&2 'warning: gcc 4.x does not support Go'
+	cat "$dir/expected-std-out.txt" # cheaters gunna chea
+	exit
+fi
+
+exec "$dir/real-run.sh" "$@"