Skip to content

Commit

Permalink
Redirecting test error output
Browse files Browse the repository at this point in the history
  • Loading branch information
Igal Tabachnik committed Jun 20, 2019
1 parent 032ff50 commit 29d8663
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions test_rules_scala.sh
Original file line number Diff line number Diff line change
Expand Up @@ -545,19 +545,20 @@ scala_specs2_all_tests_show_in_the_xml(){
}

scala_specs2_only_failed_test_shows_in_the_xml(){
set +e
bazel test \
--nocache_test_results \
--test_output=streamed \
'--test_filter=scalarules.test.junit.specs2.SuiteWithOneFailingTest#specs2 tests should::fail$' \
test_expect_failure/scala_junit_test:specs2_failing_test
--nocache_test_results \
--test_output=streamed \
'--test_filter=scalarules.test.junit.specs2.SuiteWithOneFailingTest#specs2 tests should::fail$' \
test_expect_failure/scala_junit_test:specs2_failing_test
echo "got results"
matches=$(grep -c -e "testcase name='specs2 tests should::fail'" -e "testcase name='specs2 tests should::succeed'" ./bazel-testlogs/test_expect_failure/scala_junit_test/specs2_failing_test/test.xml)
if [ $matches -eq 1 ]; then
return 0
else
echo "Expecting only one result, found more than one. Please check './bazel-testlogs/test_expect_failure/scala_junit_test/specs2_failing_test/test.xml'"
return 1
return 1
fi
test -e
}

scala_specs2_junit_test_test_filter_exact_match(){
Expand Down

0 comments on commit 29d8663

Please sign in to comment.