From 67215655bf6ce349b2b88ae4f5945a706f8ce959 Mon Sep 17 00:00:00 2001 From: c-parsons Date: Mon, 6 May 2019 15:03:55 -0400 Subject: [PATCH] Use TEST_SRCDIR for shell tests (#145) 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"