summaryrefslogtreecommitdiffstats
path: root/WebKitTools/Scripts/test-webkitperl
diff options
context:
space:
mode:
Diffstat (limited to 'WebKitTools/Scripts/test-webkitperl')
-rwxr-xr-xWebKitTools/Scripts/test-webkitperl16
1 files changed, 13 insertions, 3 deletions
diff --git a/WebKitTools/Scripts/test-webkitperl b/WebKitTools/Scripts/test-webkitperl
index 2e31593..4e63b8a 100755
--- a/WebKitTools/Scripts/test-webkitperl
+++ b/WebKitTools/Scripts/test-webkitperl
@@ -39,10 +39,20 @@ use Test::Harness;
use lib $FindBin::Bin; # so this script can be run from any directory.
use VCSUtils;
-# Use an absolute path so this script can be run from any directory.
-my $scriptsDir = $FindBin::Bin;
+# Change the working directory so that we can pass shorter, relative
+# paths to runtests(), rather than longer, absolute paths.
+#
+# We change to the source root so the paths can be relative to the
+# source root. These paths display on the screen, and their meaning
+# will be clearer to the user if relative to the root, rather than to
+# the Scripts directory, say.
+#
+# Source root is two levels up from the Scripts directory.
+my $sourceRootDir = File::Spec->catfile($FindBin::Bin, "../..");
+chdir($sourceRootDir);
-my $pattern = File::Spec->catfile($scriptsDir, "webkitperl/*_unittest/*.pl");
+# Relative to root
+my $pattern = "WebKitTools/Scripts/webkitperl/*_unittest/*.pl";
my @files = <${pattern}>; # lists files alphabetically