Skip to content

Commit

Permalink
Add --print-stacktrace-exception argument to pants invocations in ci.sh
Browse files Browse the repository at this point in the history
When the build fails in ci, the stacktrace is suppressed by default. This change tacks on the --print-exception-stacktrace to each invocation of pants. (except for during the building of the distribution - it doesn't work then.)

Testing Done:
CI is running at https://travis-ci.org/pantsbuild/pants/builds/33585119

Bugs closed: 524

Reviewed at https://rbcommons.com/s/twitter/r/942/
  • Loading branch information
ericzundel committed Aug 26, 2014
1 parent 746eae2 commit 68e2035
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions build-support/bin/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,20 @@ for constraint in ${INTERPRETER_CONSTRAINTS[@]}; do
)
done

PANTS_ARGS=(
"--print-exception-stacktrace"
"${INTERPRETER_ARGS[@]}"
)


if [[ "${skip_bootstrap:-false}" == "false" ]]; then
banner "Bootstrapping pants"
(
./build-support/python/clean.sh && \
PANTS_DEV=1 PANTS_VERBOSE=1 PEX_VERBOSE=1 PYTHON_VERBOSE=1 \
./pants goal ${INTERPRETER_ARGS[@]} binary src/python/pants/bin:pants && \
./pants goal ${PANTS_ARGS[@]} binary src/python/pants/bin:pants && \
mv dist/pants.pex ./pants.pex && \
./pants.pex goal goals
./pants.pex goal goals ${PANTS_ARGS[@]}
) || die "Failed to bootstrap pants."
fi

Expand All @@ -98,10 +104,10 @@ if [ ! -z "${R}" ]; then
fi

# Sanity checks
./pants.pex goal clean-all || die "Failed to clean-all."
./pants.pex goal goals || die "Failed to list goals."
./pants.pex goal list :: || die "Failed to list all targets."
./pants.pex goal targets || die "Failed to show target help."
./pants.pex goal clean-all ${PANTS_ARGS[@]} || die "Failed to clean-all."
./pants.pex goal goals ${PANTS_ARGS[@]} || die "Failed to list goals."
./pants.pex goal list :: ${PANTS_ARGS[@]} || die "Failed to list all targets."
./pants.pex goal targets ${PANTS_ARGS[@]} || die "Failed to show target help."

if [[ "${skip_distribution:-false}" == "false" ]]; then
# TODO(John Sirois): Take this further and dogfood a bootstrap from the sdists generated by
Expand All @@ -127,7 +133,7 @@ if [[ "${skip_python:-false}" == "false" ]]; then
(
# TODO(Eric Ayers): Substitute tests/python:: when all tests are working that way
PANTS_PYTHON_TEST_FAILSOFT=1 ./pants.pex goal test tests/python/pants_test:all \
${INTERPRETER_ARGS[@]}
${PANTS_ARGS[@]}
) || die "Core python test failure"
fi

Expand All @@ -151,14 +157,14 @@ if [[ "${skip_testprojects:-false}" == "false" ]]; then

banner "Running tests in testprojects/ "
(
./pants.pex goal test testprojects:: $daemons $android_test_opts $exclude_opts
./pants.pex goal test testprojects:: $daemons $android_test_opts $exclude_opts ${PANTS_ARGS[@]}
) || die "test failure in testprojects/"
fi

if [[ "${skip_examples:-false}" == "false" ]]; then
banner "Running example tests"
(
./pants.pex goal test examples:: $daemons $android_test_opts
./pants.pex goal test examples:: $daemons $android_test_opts ${PANTS_ARGS[@]}
) || die "Examples test failure"
fi

Expand All @@ -167,7 +173,7 @@ if [[ "${skip_integration:-false}" == "false" ]]; then
banner "Running Pants Integration tests"
(
PANTS_PYTHON_TEST_FAILSOFT=1 ./pants.pex goal test tests/python/pants_test:integration \
${INTERPRETER_ARGS[@]}
${PANTS_ARGS[@]}
) || die "Pants Integration test failure"
fi

Expand Down

0 comments on commit 68e2035

Please sign in to comment.