Explorar o código

Closes #591: Run the compiled file inside the container

Marcela Bonell %!s(int64=10) %!d(string=hai) anos
pai
achega
eeb9ebb57b
Modificáronse 1 ficheiros con 1 adicións e 3 borrados
  1. 1 3
      test/tests/gcc-c-hello-world/run.sh

+ 1 - 3
test/tests/gcc-c-hello-world/run.sh

@@ -5,6 +5,4 @@ image="$1"
 dirTest="$(dirname "$(readlink -f "$BASH_SOURCE")")"
 dirContainer='/usr/src/c'
 
-docker run --rm -v "$dirTest":"$dirContainer":rw -w "$dirContainer" "$image" gcc -o hello-world  hello-world.c
-"$dirTest"/hello-world
-rm -rf "$dirTest"/hello-world
+docker run --rm -v "$dirTest":"$dirContainer":ro -w "$dirContainer" "$image" sh -c 'gcc -o /hello-world hello-world.c && /hello-world'