Skip to content

Commit ea9c8a6

Browse files
committed
Revert "Run integration tests as another script execution to avoid exceeding the output buffer."
This reverts commit 0da9fba. Addressed to #631 The issue with truncated logs will be solved by another way.
1 parent 248dc8c commit ea9c8a6

File tree

2 files changed

+28
-38
lines changed

2 files changed

+28
-38
lines changed

.travis.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,11 @@ before_script:
2727
fi
2828

2929
script:
30-
# run all check analysis and unit tests only on travis profile
30+
- set -o errexit # exit immediately when commands return a non-zero status
3131
- if [ "$SPRING_PROFILES_ACTIVE" = 'travis' ]; then
32-
./src/main/scripts/ci/check-build-and-verify.sh || FAIL_BUILD=yes;
33-
fi
34-
# run integration tests and danger on all profiles
35-
- ./src/main/scripts/ci/check-build-and-verify.sh --only-integration-tests || FAIL_BUILD=yes;
36-
# fail a build when one of the scripts have failed
37-
- if [ -n "${FAIL_BUILD}" ]; then
38-
exit 1;
32+
./src/main/scripts/ci/check-build-and-verify.sh;
33+
else
34+
./src/main/scripts/ci/check-build-and-verify.sh --only-integration-tests;
3935
fi
4036

4137
after_success:

src/main/scripts/ci/check-build-and-verify.sh

Lines changed: 24 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -188,20 +188,18 @@ if [ "$RUN_ONLY_INTEGRATION_TESTS" = 'no' ]; then
188188
print_status "$FINDBUGS_STATUS" 'Run FindBugs'
189189
fi
190190

191-
if [ "$RUN_ONLY_INTEGRATION_TESTS" = 'yes' ]; then
192-
mvn --batch-mode verify -Denforcer.skip=true -DskipUnitTests=true \
193-
>verify-raw.log 2>&1 || VERIFY_STATUS=fail
194-
# Workaround for #538
195-
"$(dirname "$0")/filter-out-htmlunit-messages.pl" <verify-raw.log >verify.log
196-
197-
print_status "$VERIFY_STATUS" 'Run integration tests'
198-
199-
# run danger after integration tests when the results of all checks and tests are available
200-
if [ "$DANGER_STATUS" != 'skip' ]; then
201-
danger >danger.log 2>&1 || DANGER_STATUS=fail
202-
fi
203-
print_status "$DANGER_STATUS" 'Run danger'
191+
mvn --batch-mode verify -Denforcer.skip=true -DskipUnitTests=true \
192+
>verify-raw.log 2>&1 || VERIFY_STATUS=fail
193+
# Workaround for #538
194+
"$(dirname "$0")/filter-out-htmlunit-messages.pl" <verify-raw.log >verify.log
195+
196+
print_status "$VERIFY_STATUS" 'Run integration tests'
197+
198+
199+
if [ "$DANGER_STATUS" != 'skip' ]; then
200+
danger >danger.log 2>&1 || DANGER_STATUS=fail
204201
fi
202+
print_status "$DANGER_STATUS" 'Run danger'
205203

206204
if [ "$RUN_ONLY_INTEGRATION_TESTS" = 'no' ]; then
207205
[ "$CS_STATUS" = 'skip' ] || print_log cs.log 'Run CheckStyle'
@@ -218,25 +216,21 @@ if [ "$RUN_ONLY_INTEGRATION_TESTS" = 'no' ]; then
218216
[ "$FINDBUGS_STATUS" = 'skip' ] || print_log findbugs.log 'Run FindBugs'
219217
fi
220218

221-
if [ "$RUN_ONLY_INTEGRATION_TESTS" = 'yes' ]; then
222-
print_log verify.log 'Run integration tests'
223-
224-
if [ "$DANGER_STATUS" != 'skip' ]; then
225-
print_log danger.log 'Run danger'
226-
fi
227-
228-
# In order to be able debug robot framework test flakes we need to have a report.
229-
# Just encode it to a gzipped binary form and dump to console.
230-
if fgrep -qs 'status="FAIL"' target/robotframework-reports/output.xml; then
231-
echo "===== REPORT START ====="
232-
cat target/robotframework-reports/output.xml | gzip -c | base64
233-
echo "===== REPORT END ====="
234-
fi
219+
print_log verify.log 'Run integration tests'
220+
221+
if [ "$DANGER_STATUS" != 'skip' ]; then
222+
print_log danger.log 'Run danger'
223+
fi
224+
225+
# In order to be able debug robot framework test flakes we need to have a report.
226+
# Just encode it to a gzipped binary form and dump to console.
227+
if fgrep -qs 'status="FAIL"' target/robotframework-reports/output.xml; then
228+
echo "===== REPORT START ====="
229+
cat target/robotframework-reports/output.xml | gzip -c | base64
230+
echo "===== REPORT END ====="
235231
fi
236232

237-
# We don't remove the logs to make them available to danger that may be executed later as a separate
238-
# script invocation
239-
#rm -f cs.log pmd.log codenarc.log license.log pom.log bootlint.log rflint.log jasmine.log validator.log enforcer.log test.log findbugs.log verify-raw.log verify.log danger.log
233+
rm -f cs.log pmd.log codenarc.log license.log pom.log bootlint.log rflint.log jasmine.log validator.log enforcer.log test.log findbugs.log verify-raw.log verify.log danger.log
240234

241235
if echo "$CS_STATUS$PMD_STATUS$CODENARC_STATUS$LICENSE_STATUS$POM_STATUS$BOOTLINT_STATUS$RFLINT_STATUS$JASMINE_STATUS$HTML_STATUS$ENFORCER_STATUS$TEST_STATUS$FINDBUGS_STATUS$VERIFY_STATUS$DANGER_STATUS" | fgrep -qs 'fail'; then
242236
exit 1

0 commit comments

Comments
 (0)