Title: [231908] trunk/Tools
- Revision
- 231908
- Author
- commit-qu...@webkit.org
- Date
- 2018-05-17 10:07:46 -0700 (Thu, 17 May 2018)
Log Message
test262/Runner.pm: look for jsc in path if cannot call webkit-build-directory
https://bugs.webkit.org/show_bug.cgi?id=185650
Patch by Valerie R Young <vale...@bocoup.com> on 2018-05-17
Reviewed by Michael Saboff.
First, use jsc from CLI arg, then try to use webkit-build-directory,
if that doesn't work, look for jsc in the $PATH
* Scripts/test262/Runner.pm:
(processCLI):
(getBuildPath):
(runTest):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (231907 => 231908)
--- trunk/Tools/ChangeLog 2018-05-17 16:37:46 UTC (rev 231907)
+++ trunk/Tools/ChangeLog 2018-05-17 17:07:46 UTC (rev 231908)
@@ -1,3 +1,18 @@
+2018-05-17 Valerie R Young <vale...@bocoup.com>
+
+ test262/Runner.pm: look for jsc in path if cannot call webkit-build-directory
+ https://bugs.webkit.org/show_bug.cgi?id=185650
+
+ Reviewed by Michael Saboff.
+
+ First, use jsc from CLI arg, then try to use webkit-build-directory,
+ if that doesn't work, look for jsc in the $PATH
+
+ * Scripts/test262/Runner.pm:
+ (processCLI):
+ (getBuildPath):
+ (runTest):
+
2018-05-16 Leo Balter <leonardo.bal...@gmail.com>
Test262-Runner: Adds a --timeout option
Modified: trunk/Tools/Scripts/test262/Runner.pm (231907 => 231908)
--- trunk/Tools/Scripts/test262/Runner.pm 2018-05-17 16:37:46 UTC (rev 231907)
+++ trunk/Tools/Scripts/test262/Runner.pm 2018-05-17 17:07:46 UTC (rev 231908)
@@ -49,6 +49,12 @@
$podIsAvailable = 1;
}
+my $webkitdirIsAvailable;
+if (eval {require webkitdirs; 1;}) {
+ webkitdirs->import(qw(executableProductDir setConfiguration));
+ $webkitdirIsAvailable = 1;
+}
+
my $Bin;
BEGIN {
$ENV{DBIC_OVERWRITE_HELPER_METHODS_OK} = 1;
@@ -233,10 +239,10 @@
print "\n-------------------------Settings------------------------\n"
. "Test262 Dir: $test262Dir\n"
. "JSC: $JSC\n"
- . "DYLD_FRAMEWORK_PATH: $DYLD_FRAMEWORK_PATH\n"
. "Child Processes: $max_process\n";
print "Test timeout: $timeout\n" if $timeout;
+ print "DYLD_FRAMEWORK_PATH: $DYLD_FRAMEWORK_PATH\n" if $DYLD_FRAMEWORK_PATH;
print "Features to include: " . join(', ', @features) . "\n" if @features;
print "Paths: " . join(', ', @cliTestDirs) . "\n" if @cliTestDirs;
print "Config file: $configFile\n" if $config;
@@ -460,35 +466,33 @@
}
sub getBuildPath {
- my $release = shift;
+ my ($release) = @_;
- # Try to find JSC for user, if not supplied
- my $cmd = abs_path("$Bin/../webkit-build-directory");
- if (! -e $cmd) {
- die 'Error: cannot find webkit-build-directory, specify with JSC with --jsc <path>.';
- }
+ my $jsc;
- if ($release) {
- $cmd .= ' --release';
- } else {
- $cmd .= ' --debug';
+ if ($webkitdirIsAvailable) {
+ my $config = $release ? 'Release' : 'Debug';
+ setConfiguration($config);
+ my $jscDir = executableProductDir();
+
+ $jsc = $jscDir . '/jsc';
+ $jsc = $jscDir . '/_javascript_Core.framework/Resources/jsc' if (! -e $jsc);
+ $jsc = $jscDir . '/bin/jsc' if (! -e $jsc);
+
+ # Sets the Env DYLD_FRAMEWORK_PATH
+ $DYLD_FRAMEWORK_PATH = dirname($jsc) if (-e $jsc);
}
- $cmd .= ' --executablePath';
- my $jscDir = qx($cmd);
- chomp $jscDir;
- my $jsc;
- $jsc = $jscDir . '/jsc';
+ if (! $jsc || ! -e $jsc) {
+ # If we cannot find jsc using webkitdirs, look in path
+ $jsc = qx(which jsc);
+ chomp $jsc;
- $jsc = $jscDir . '/_javascript_Core.framework/Resources/jsc' if (! -e $jsc);
- $jsc = $jscDir . '/bin/jsc' if (! -e $jsc);
- if (! -e $jsc) {
- die 'Error: cannot find jsc, specify with --jsc <path>.';
+ if (! $jsc ) {
+ die("Cannot find jsc, specify with --jsc <path>.\n\n");
+ }
}
- # Sets the Env DYLD_FRAMEWORK_PATH
- $DYLD_FRAMEWORK_PATH = dirname($jsc);
-
return $jsc;
}
@@ -628,9 +632,9 @@
my $defaultHarness = '';
$defaultHarness = $deffile if $scenario ne 'raw';
- my $prefix = qq(DYLD_FRAMEWORK_PATH=$DYLD_FRAMEWORK_PATH);
+ my $prefix = $DYLD_FRAMEWORK_PATH ? qq(DYLD_FRAMEWORK_PATH=$DYLD_FRAMEWORK_PATH) : "";
+ my $execTimeStart = time();
- my $execTimeStart = time();
my $result = qx($prefix $JSC $args $defaultHarness $includesfile '$prefixFile$filename');
my $execTime = time() - $execTimeStart;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes