From febdc09178bf101f3fe99452c7d7a68fb39b6f6b Mon Sep 17 00:00:00 2001 From: Klemens David Morgenstern Date: Wed, 27 Mar 2019 04:32:33 +0800 Subject: [PATCH 1/4] added syntax errors --- mini_tester.rb | 1 + test_unit.rb | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mini_tester.rb b/mini_tester.rb index cf2c7c8..f1731ff 100644 --- a/mini_tester.rb +++ b/mini_tester.rb @@ -3,6 +3,7 @@ Minitest::Reporters.use! Minitest::Reporters::JUnitReporter.new +some syntax error class MiniTester < Minitest::Test def test_1 diff --git a/test_unit.rb b/test_unit.rb index ee8edaf..c2cb5b0 100644 --- a/test_unit.rb +++ b/test_unit.rb @@ -16,9 +16,9 @@ def teardown end # Fake test - def test_fail - assert_equal(4, 4); + def test_fail-->_--as assert_equal(4, 4); + assert_equal(4, 4);-->_--as #fail('Not implemented') end From 30ef518c7a8f4e9de9ba441fd46a904693f03c3b Mon Sep 17 00:00:00 2001 From: Klemens David Morgenstern Date: Wed, 27 Mar 2019 04:40:36 +0800 Subject: [PATCH 2/4] enabled pipefail --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 39ccaa9..56cb08b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,7 @@ env: - TEST_CMD="ruby mini_tester.rb" OPT="--framework minitest" FRAMEWORK=MiniTester - TEST_CMD="ruby test_unit_all.rb --runner=xml > test_unit.xml" FRAMEWORK=TestUnit script: + - set -o pipefail - echo $TEST_CMD | bash | tee $FRAMEWORK.log after_failure: From cc9aa912e9ca760313aa4bf0034a073c21910711 Mon Sep 17 00:00:00 2001 From: Klemens David Morgenstern Date: Wed, 27 Mar 2019 04:45:04 +0800 Subject: [PATCH 3/4] using stderr now --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 56cb08b..ff7bdbd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,8 @@ env: - TEST_CMD="ruby test_unit_all.rb --runner=xml > test_unit.xml" FRAMEWORK=TestUnit script: - set -o pipefail - - echo $TEST_CMD | bash | tee $FRAMEWORK.log + - echo $TEST_CMD | bash 2> $FRAMEWORK.log + - cat $FRAMEWORK.log after_failure: - curl -s https://raw.githubusercontent.com/report-ci/scripts/master/annotate.py | python - --tool ruby --input $FRAMEWORK.log --name "$FRAMEWORK Log" From 95e72b7fab2017101fe02e04d088371424890617 Mon Sep 17 00:00:00 2001 From: Klemens David Morgenstern Date: Wed, 27 Mar 2019 14:18:51 +0800 Subject: [PATCH 4/4] added &2 to tee --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ff7bdbd..4778e45 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ env: - TEST_CMD="ruby test_unit_all.rb --runner=xml > test_unit.xml" FRAMEWORK=TestUnit script: - set -o pipefail - - echo $TEST_CMD | bash 2> $FRAMEWORK.log + - echo $TEST_CMD | bash 2> >(tee $FRAMEWORK.log >&2) - cat $FRAMEWORK.log after_failure: