Browse Source

Merge pull request #2161 from infosiftr/golang-gcc-4

Update "golang-hello-world" test to no-op on "gcc:4*" images (where Go is not supported)
yosifkit 9 years ago
parent
commit
9af646334e

+ 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" "$@"