Browse Source

Convert erlang-hello-world to use run-in-container.sh

Tianon Gravi 10 years ago
parent
commit
894f72f184

+ 0 - 0
test/tests/erlang-hello-world/hello-world.erl → test/tests/erlang-hello-world/container.erl


+ 0 - 8
test/tests/erlang-hello-world/run.sh

@@ -1,8 +0,0 @@
-#!/bin/bash
-set -e
-
-image="$1"
-dirTest="$(dirname "$(readlink -f "$BASH_SOURCE")")"
-dirContainer='/usr/src/erlang'
-
-docker run --rm -v "$dirTest":"$dirContainer":ro -w "$dirContainer" "$image" escript hello-world.erl

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

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

+ 7 - 0
test/tests/run-erlang-in-container.sh

@@ -0,0 +1,7 @@
+#!/bin/bash
+set -e
+
+testDir="$(readlink -f "$(dirname "$BASH_SOURCE")")"
+runDir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
+
+source "$runDir/run-in-container.sh" "$testDir" "$1" escript ./container.erl