Parcourir la source

Closes #591: Run the compiled file inside the container

Marcela Bonell il y a 10 ans
Parent
commit
eeb9ebb57b
1 fichiers modifiés avec 1 ajouts et 3 suppressions
  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'