Modified: trunk/Tools/Scripts/run-_javascript_core-tests (272055 => 272056)
--- trunk/Tools/Scripts/run-_javascript_core-tests 2021-01-29 10:36:36 UTC (rev 272055)
+++ trunk/Tools/Scripts/run-_javascript_core-tests 2021-01-29 10:46:36 UTC (rev 272056)
@@ -107,6 +107,7 @@
my $model = 0;
my $archs = undef;
my $ldd = undef;
+my $artifact_exec_wrapper = undef;
my $version;
my $versionName;
my $sdk;
@@ -236,6 +237,7 @@
--help Show this help message
--architecture Attempt to override the native architecture of a machine.
--ldd Use alternate ldd
+ --artifact-exec-wrapper Wrapper for executing a build artifact
--root= Path to pre-built root containing jsc
--[no-]ftl-jit Turn the FTL JIT on or off
--[no-]build Check (or don't check) to see if the jsc build is up-to-date (default: $buildJSCDefault)
@@ -334,6 +336,7 @@
'model=s' => \$model,
'architecture=s' => \$archs,
'ldd=s' => \$ldd,
+ 'artifact-exec-wrapper=s' => \$artifact_exec_wrapper,
'version=s' => \$version,
'version-name=s' => \$versionName,
'sdk=s' => \$sdk,
@@ -594,6 +597,11 @@
chdirWebKit();
chdir($productDir) or die "Failed to switch directory to '$productDir'\n";
my @command = (testPath($productDir, $testName));
+ if (defined($artifact_exec_wrapper)) {
+ # This needs to go first, as one use case is to override the
+ # ELF interpreter.
+ unshift @command, $artifact_exec_wrapper;
+ }
unshift @command, ("xcrun", "-sdk", xcodeSDK(), "sim") if willUseIOSSimulatorSDK();
unshift @command, ("/usr/bin/arch", "-$archs") if $archs ne nativeArchitecture($nativeTarget, $nativePort);
unshift @command, wrapperPrefixIfNeeded() if isGtk() or isWPE();
@@ -768,6 +776,10 @@
push(@jscStressDriverCmd, "--ldd");
push(@jscStressDriverCmd, $ldd);
}
+ if (defined($artifact_exec_wrapper)) {
+ push(@jscStressDriverCmd, "--artifact-exec-wrapper");
+ push(@jscStressDriverCmd, $artifact_exec_wrapper);
+ }
push(@jscStressDriverCmd, @testList);
if (isWindows() && !isCygwin()) {
Modified: trunk/Tools/Scripts/run-jsc-stress-tests (272055 => 272056)
--- trunk/Tools/Scripts/run-jsc-stress-tests 2021-01-29 10:36:36 UTC (rev 272055)
+++ trunk/Tools/Scripts/run-jsc-stress-tests 2021-01-29 10:46:36 UTC (rev 272056)
@@ -133,6 +133,7 @@
$forceCollectContinuously = false
$reportExecutionTime = false
$ldd = nil
+$artifact_exec_wrapper = nil
def usage
puts "run-jsc-stress-tests -j <shell path> <collections path> [<collections path> ...]"
@@ -153,6 +154,7 @@
puts "--force-architecture Override the architecture to run tests with."
puts " e.g. x86, x86_64, arm."
puts "--ldd Use alternate ldd"
+ puts "--artifact-exec-wrapper Wrapper for executing a build artifact"
puts "--os Specify os instead of determining from _javascript_Core build."
puts " e.g. darwin, linux & windows."
puts "--shell-runner Uses the shell-based test runner instead of the default make-based runner."
@@ -195,6 +197,7 @@
['--arch', GetoptLong::REQUIRED_ARGUMENT],
['--force-architecture', GetoptLong::REQUIRED_ARGUMENT],
['--ldd', GetoptLong::REQUIRED_ARGUMENT],
+ ['--artifact-exec-wrapper', GetoptLong::REQUIRED_ARGUMENT],
['--os', GetoptLong::REQUIRED_ARGUMENT],
['--shell-runner', GetoptLong::NO_ARGUMENT],
['--make-runner', GetoptLong::NO_ARGUMENT],
@@ -270,6 +273,8 @@
$forceArchitecture = arg
when '--ldd'
$ldd = arg
+ when '--artifact-exec-wrapper'
+ $artifact_exec_wrapper = arg
when '--os'
$hostOS = arg
when '--model'
@@ -582,11 +587,14 @@
end
def vmCommand
+ cmd = [pathToVM.to_s]
+ if not $artifact_exec_wrapper.nil?
+ cmd.unshift($artifact_exec_wrapper)
+ end
if ($forceArchitecture)
- ["/usr/bin/arch", "-" + $forceArchitecture, pathToVM.to_s]
- else
- [pathToVM.to_s]
+ cmd = ["/usr/bin/arch", "-" + $forceArchitecture] + cmd
end
+ return cmd
end
def pathToHelpers
@@ -758,7 +766,7 @@
end
options = BASE_OPTIONS + $testSpecificRequiredOptions + FTL_OPTIONS + optionalTestSpecificOptions
- addRunCommand("bytecode-cache", ["sh", (pathToHelpers + "bytecode-cache-test-helper.sh").to_s, pathToVM.to_s, $benchmark.to_s, fileTemplate.to_s] + options, silentOutputHandler, simpleErrorHandler, *additionalEnv)
+ addRunCommand("bytecode-cache", ["sh", (pathToHelpers + "bytecode-cache-test-helper.sh").to_s, fileTemplate.to_s, *vmCommand, $benchmark.to_s] + options, silentOutputHandler, simpleErrorHandler, *additionalEnv)
end
def runBytecodeCache(*optionalTestSpecificOptions)
@@ -1003,7 +1011,7 @@
profilerOutput = uniqueFilename(".json")
if $canRunDisplayProfilerOutput
- addRunCommand("profiler", ["ruby", (pathToHelpers + "profiler-test-helper").to_s, (SCRIPTS_PATH + "display-profiler-output").to_s, profilerOutput.to_s, pathToVM.to_s, "--useConcurrentJIT=false", "-p", profilerOutput.to_s, $benchmark.to_s], silentOutputHandler, simpleErrorHandler)
+ addRunCommand("profiler", ["ruby", (pathToHelpers + "profiler-test-helper").to_s, (SCRIPTS_PATH + "display-profiler-output").to_s, profilerOutput.to_s, *vmCommand, "--useConcurrentJIT=false", "-p", profilerOutput.to_s, $benchmark.to_s], silentOutputHandler, simpleErrorHandler)
else
puts "Running simple version of #{$collectionName}/#{$benchmark} because some required Ruby features are unavailable."
run("profiler-simple", "--useConcurrentJIT=false", "-p", profilerOutput.to_s)
@@ -1216,7 +1224,7 @@
wasmFiles.each {
| file |
basename = file.basename.to_s
- addRunCommand("(" + basename + ")-" + kind, [pathToVM.to_s] + $testSpecificRequiredOptions + options + [$benchmark.to_s, "--", basename], silentOutputHandler, simpleErrorHandler)
+ addRunCommand("(" + basename + ")-" + kind, vmCommand + $testSpecificRequiredOptions + options + [$benchmark.to_s, "--", basename], silentOutputHandler, simpleErrorHandler)
}
end