From 830f28c40fb30d505cf78eccf9033dbab0f96cba Mon Sep 17 00:00:00 2001 From: Chris Parsons Date: Fri, 3 May 2019 17:46:07 -0400 Subject: [PATCH] Use TEST_SRCDIR for shell tests Fixes https://github.com/bazelbuild/bazel-skylib/issues/143 --- tests/analysis_test_test.sh | 1 + tests/unittest_test.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/analysis_test_test.sh b/tests/analysis_test_test.sh index 476fd41..5dc52b8 100755 --- a/tests/analysis_test_test.sh +++ b/tests/analysis_test_test.sh @@ -150,4 +150,5 @@ function test_transitive_target_fails() { expect_log "This rule should never work" } +cd "$TEST_TMPDIR" run_suite "analysis_test test suite" diff --git a/tests/unittest_test.sh b/tests/unittest_test.sh index e4c8008..5b9d43f 100755 --- a/tests/unittest_test.sh +++ b/tests/unittest_test.sh @@ -131,4 +131,5 @@ function test_fail_unexpected_passing_test() { expect_log "Expected failure of target_under_test, but found success" } +cd "$TEST_TMPDIR" run_suite "unittest test suite"