Skip to content

Commit

Permalink
Allow to skip cover compilation for small tests
Browse files Browse the repository at this point in the history
  • Loading branch information
arcusfelis committed Nov 3, 2021
1 parent fc29465 commit e91af83
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
1 change: 0 additions & 1 deletion rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@

{dialyzer, [{plt_extra_apps, [jid, cowboy, lasse, p1_utils, ranch, gen_fsm_compat, epgsql]}]}.

{cover_enabled, true}.
{cover_print_enabled, true}.
{cover_export_enabled, true}.
{coveralls_coverdata, "/tmp/*.coverdata"}.
Expand Down
18 changes: 11 additions & 7 deletions tools/test-runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,16 @@ TEST_HOSTS_DEFAULT="${TEST_HOSTS_ARRAY[@]}"

./tools/configure with-all

# Pass extra arguments from tools/test_runner/selected-tests-to-test-spec.sh
# to rebar3 in Makefile
if [[ -f "auto_small_tests.spec" ]]; then
REBAR_CT_EXTRA_ARGS=" --spec \"$(pwd)/auto_small_tests.spec\" $REBAR_CT_EXTRA_ARGS"
fi

if [ "$COVER_ENABLED" = true ]; then
REBAR_CT_EXTRA_ARGS=" -c "
fi

# Allow user to pass PRESET and DB as an env variable
# (or use default value)
# "${parameter-word}" means:
Expand All @@ -612,13 +622,7 @@ export TEST_HOSTS="${TEST_HOSTS-$TEST_HOSTS_DEFAULT}"
export BUILD_TESTS="$BUILD_TESTS"
export BUILD_MIM="$BUILD_MIM"
export TLS_DIST="$TLS_DIST"
# Pass extra arguments from tools/test_runner/selected-tests-to-test-spec.sh
# to rebar3 in Makefile
if [[ -f "auto_small_tests.spec" ]]; then
export REBAR_CT_EXTRA_ARGS=" --spec \"$(pwd)/auto_small_tests.spec\" "
else
export REBAR_CT_EXTRA_ARGS=""
fi
export REBAR_CT_EXTRA_ARGS="$REBAR_CT_EXTRA_ARGS"
export SRC_TESTSPEC="$SRC_TESTSPEC"
export TESTSPEC="auto_big_tests.spec"
export START_NODES="$START_NODES"
Expand Down

0 comments on commit e91af83

Please sign in to comment.