Browse Source

Closes #591: Run the compiled file inside the container

Marcela Bonell 10 years ago
parent
commit
eeb9ebb57b
1 changed files with 1 additions and 3 deletions
  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'