Modified: trunk/Tools/ChangeLog (190411 => 190412)
--- trunk/Tools/ChangeLog 2015-10-01 17:10:30 UTC (rev 190411)
+++ trunk/Tools/ChangeLog 2015-10-01 17:16:40 UTC (rev 190412)
@@ -1,3 +1,15 @@
+2015-10-01 Alexey Proskuryakov <a...@apple.com>
+
+ [Mac] Make run-api-tests work with System Integrity Protection
+ https://bugs.webkit.org/show_bug.cgi?id=149711
+ rdar://problem/22928202
+
+ Reviewed by Dan Bernstein.
+
+ * Scripts/run-api-tests:
+ (runTest):
+ (archCommandLineArgumentsForRestrictedEnvironmentVariables):
+
2015-10-01 Daniel Bates <daba...@apple.com>
Attempt to fix the Windows build after <https://trac.webkit.org/changeset/190387>
Modified: trunk/Tools/Scripts/run-api-tests (190411 => 190412)
--- trunk/Tools/Scripts/run-api-tests 2015-10-01 17:10:30 UTC (rev 190411)
+++ trunk/Tools/Scripts/run-api-tests 2015-10-01 17:16:40 UTC (rev 190412)
@@ -40,6 +40,7 @@
sub runTest($$);
sub runTestsBySuite(\@);
sub prepareEnvironmentForRunningTestTool();
+sub archCommandLineArgumentsForRestrictedEnvironmentVariables();
sub testToolPaths();
# Defined in VCSUtils.
@@ -196,7 +197,7 @@
if (isIOSWebKit()) {
$pid = open3($childIn, $childOut, $childErr, qw(xcrun -sdk iphonesimulator sim --environment=merge), @commonArguments) or die "Failed to run test: $test.";
} elsif (isAppleMacWebKit() && architecture()) {
- $pid = open3($childIn, $childOut, $childErr, "arch", "-" . architecture(), @commonArguments) or die "Failed to run test: $test.";
+ $pid = open3($childIn, $childOut, $childErr, "arch", "-" . architecture(), archCommandLineArgumentsForRestrictedEnvironmentVariables(), @commonArguments) or die "Failed to run test: $test.";
} else {
$pid = open3($childIn, $childOut, $childErr, @commonArguments) or die "Failed to run test: $test.";
}
@@ -347,6 +348,17 @@
setupMacWebKitEnvironment(productDir());
}
+sub archCommandLineArgumentsForRestrictedEnvironmentVariables()
+{
+ my @arguments = ();
+ foreach my $key (keys(%ENV)) {
+ if ($key =~ /^DYLD_/) {
+ push @arguments, "-e", "$key=$ENV{$key}";
+ }
+ }
+ return @arguments;
+}
+
sub testToolPaths()
{
my $path = File::Spec->catfile(productDir(), "TestWebKitAPI");