From 84b8dc13e7c8f527d463ea3e65da796d8e786fc6 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Tue, 26 Jul 2016 11:47:31 +0200 Subject: [PATCH] tesh: only make an absolute path out of test file if not already one --- tools/tesh/tesh.pl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/tesh/tesh.pl b/tools/tesh/tesh.pl index 34f17ff8af..fe1d60dbf0 100755 --- a/tools/tesh/tesh.pl +++ b/tools/tesh/tesh.pl @@ -326,9 +326,13 @@ if ($diff_tool) { } if ( $tesh_file =~ m/(.*)\.tesh/ ) { - my $dir = qx,pwd,; - chomp($dir); - print "Test suite '$dir/$tesh_file'\n"; + my $fullname = $tesh_file; + if (not ($fullname =~ m|^/|)) { # not absolute path + my $dir = qx,pwd,; + chomp($dir); + $fullname = "$dir/$fullname" + } + print "Test suite '$tesh_file'\n"; } else { $tesh_name = "(stdin)"; print "Test suite from stdin\n"; -- 2.20.1