Skip to content

Commit

Permalink
ci: rake-test/run.sh accepts compile flags passed as COMPILE_FLAGS
Browse files Browse the repository at this point in the history
  • Loading branch information
flavorjones committed Mar 11, 2021
1 parent 2ed1062 commit f5575c3
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions concourse/tasks/rake-test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,19 @@ RUBY_VERSION=$(cut -d" " -f2 <<< "${VERSION_INFO}")

pushd nokogiri

test_task="test"

bundle install --local || bundle install

if [[ "${TEST_WITH_SYSTEM_LIBRARIES:-}" == "t" ]] ; then
# TODO remove this option, prefer COMPILE_FLAGS instead
export NOKOGIRI_USE_SYSTEM_LIBRARIES=t
fi

compile_task_args=""
if [[ "${COMPILE_FLAGS:-}" != "" ]] ; then
compile_task_args="-- ${COMPILE_FLAGS}"
fi

test_task="test"
if [[ "${TEST_WITH_VALGRIND:-}" == "t" ]] ; then
test_task="test:valgrind" # override
# export TESTOPTS="-v" # see more verbose output to help narrow down warnings
Expand All @@ -33,7 +38,8 @@ pushd nokogiri

code-climate-setup

bundle exec rake compile ${test_task}
bundle exec rake compile ${compile_task_args}
bundle exec rake ${test_task}

code-climate-shipit

Expand Down

0 comments on commit f5575c3

Please sign in to comment.