Thread (9 messages) 9 messages, 8 authors, 2016-06-15
STALE3686d

[PATCH 1/2] perf: load test-lib-functions from the correct directory

From: Thomas Rast <hidden>
Date: 2016-06-15 22:53:15
Subsystem: the rest · Maintainer: Linus Torvalds

Loading it in the subshells still referred to $TEST_DIRECTORY/..,
which was only correct in preliminary versions of perf-lib.sh

Signed-off-by: Thomas Rast <redacted>
---

This and the next one fix two small bugs in the perf test suite.  They
don't affect anyone so far, which is why they went unnoticed.

 t/perf/p0000-perf-lib-sanity.sh |    5 +++++
 t/perf/perf-lib.sh              |    2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/t/perf/p0000-perf-lib-sanity.sh b/t/perf/p0000-perf-lib-sanity.sh
index 2ca4aac..f8dd536 100755
--- a/t/perf/p0000-perf-lib-sanity.sh
+++ b/t/perf/p0000-perf-lib-sanity.sh
@@ -38,4 +38,9 @@ test_expect_success 'test_export works with weird vars' '
 	test "$bar" = "weird # variable"
 '
 
+test_perf 'test-lib-functions correctly loaded in subshells' '
+	: >a &&
+	test_path_is_file a
+'
+
 test_done
diff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh
index 2a5e1f3..bcc0131 100644
--- a/t/perf/perf-lib.sh
+++ b/t/perf/perf-lib.sh
@@ -119,7 +119,7 @@ test_run_perf_ () {
 	test_export_="test_cleanup"
 	export test_cleanup test_export_
 	/usr/bin/time -f "%E %U %S" -o test_time.$i "$SHELL" -c '
-. '"$TEST_DIRECTORY"/../test-lib-functions.sh'
+. '"$TEST_DIRECTORY"/test-lib-functions.sh'
 test_export () {
 	[ $# != 0 ] || return 0
 	test_export_="$test_export_\\|$1"
-- 
1.7.9.3.556.g7eb2d
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help