From 2df6b2f3eedddc9d48a54d242443ab03d045961e Mon Sep 17 00:00:00 2001 From: Anton Vakhrushev Date: Fri, 27 Sep 2019 17:31:52 +0300 Subject: [PATCH] Forgotten file --- spec-with-coverage | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 spec-with-coverage diff --git a/spec-with-coverage b/spec-with-coverage new file mode 100755 index 0000000..2c6d350 --- /dev/null +++ b/spec-with-coverage @@ -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}"