Forgotten file

This commit is contained in:
Anton Vakhrushev 2019-09-27 17:31:52 +03:00
parent 55cbf18a27
commit 2df6b2f3ee

19
spec-with-coverage Executable file
View File

@ -0,0 +1,19 @@
#!/usr/bin/env bash
set -eux
TEST_FILE=./spec_cov_entry.cr
TEST_BIN=./spec_cov_bin
mkdir -p ./tmp
echo "require \"./spec/**\"" > "${TEST_FILE}"
./crystal build "${TEST_FILE}" --static --debug -o "${TEST_BIN}"
docker run -it --security-opt seccomp=unconfined \
-u "$(id -u):$(id -g)" \
-v "$PWD:/app" \
-w "/app" \
kcov/kcov \
kcov --clean --include-path=/app/src /app/coverage "${TEST_BIN}"