浏览代码

Closes #591: Run the compiled file inside the container

Marcela Bonell 10 年之前
父节点
当前提交
eeb9ebb57b
共有 1 个文件被更改,包括 1 次插入3 次删除
  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'