Changeset 219965 in webkit
- Timestamp:
- Jul 26, 2017, 3:15:21 PM (8 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r219963 r219965 1 2017-07-26 Mark Lam <mark.lam@apple.com> 2 3 Make run-javascriptcore-test run testair, testb3, and testmasm. 4 https://bugs.webkit.org/show_bug.cgi?id=174837 5 <rdar://problem/33522927> 6 7 Reviewed by Saam Barati and Filip Pizlo. 8 9 1. Refactors code for running testapi so that we can use it to run other tests. 10 2. Added running of testmasm, testair, testb3. 11 12 Note: the existing testapi invocation code does not support remote invocation of 13 the tests (e.g. on a ARM device). Hence, the new additions of testmasm, testair, 14 and testb3 also do not support remote invocation. If we wish to add remote 15 invocation support, we should do that in a separate patch. 16 17 * Scripts/run-javascriptcore-tests: 18 (testPath): 19 (runTest): 20 (testapiPath): Deleted. 21 1 22 2017-07-26 Aakash Jain <aakash_jain@apple.com> 2 23 -
trunk/Tools/Scripts/run-javascriptcore-tests
r217605 r219965 1 1 #!/usr/bin/perl -w 2 2 3 # Copyright (C) 2005, 2013-201 6Apple Inc. All rights reserved.3 # Copyright (C) 2005, 2013-2017 Apple Inc. All rights reserved. 4 4 # Copyright (C) 2007 Eric Seidel <eric@webkit.org> 5 5 # … … 57 57 my $buildJSC = 1; 58 58 59 my $runTestMasm = 1; 60 my $runTestAir = 1; 61 my $runTestB3 = 1; 59 62 my $runTestAPI = 1; 60 63 … … 75 78 my $jsonFileName; 76 79 80 if ($ENV{RUN_JAVASCRIPTCORE_TESTS_TESTMASM}) { 81 if ($ENV{RUN_JAVASCRIPTCORE_TESTS_TESTMASM} eq "true") { 82 $runTestMasm = 1; 83 } elsif ($ENV{RUN_JAVASCRIPTCORE_TESTS_TESTMASM} eq "false") { 84 $runTestMasm = 0; 85 } else { 86 print "Don't recognize value for RUN_JAVASCRIPTCORE_TESTS_TESTMASM environment variable: '" 87 . $ENV{RUN_JAVASCRIPTCORE_TESTS_TESTMASM} . "'. Should be set to 'true' or 'false'.\n"; 88 } 89 } 90 91 if ($ENV{RUN_JAVASCRIPTCORE_TESTS_TESTAIR}) { 92 if ($ENV{RUN_JAVASCRIPTCORE_TESTS_TESTAIR} eq "true") { 93 $runTestAir = 1; 94 } elsif ($ENV{RUN_JAVASCRIPTCORE_TESTS_TESTAIR} eq "false") { 95 $runTestAir = 0; 96 } else { 97 print "Don't recognize value for RUN_JAVASCRIPTCORE_TESTS_TESTAIR environment variable: '" 98 . $ENV{RUN_JAVASCRIPTCORE_TESTS_TESTAIR} . "'. Should be set to 'true' or 'false'.\n"; 99 } 100 } 101 102 if ($ENV{RUN_JAVASCRIPTCORE_TESTS_TESTB3}) { 103 if ($ENV{RUN_JAVASCRIPTCORE_TESTS_TESTB3} eq "true") { 104 $runTestB3 = 1; 105 } elsif ($ENV{RUN_JAVASCRIPTCORE_TESTS_TESTB3} eq "false") { 106 $runTestB3 = 0; 107 } else { 108 print "Don't recognize value for RUN_JAVASCRIPTCORE_TESTS_TESTB3 environment variable: '" 109 . $ENV{RUN_JAVASCRIPTCORE_TESTS_TESTB3} . "'. Should be set to 'true' or 'false'.\n"; 110 } 111 } 112 77 113 if ($ENV{RUN_JAVASCRIPTCORE_TESTS_TESTAPI}) { 78 114 if ($ENV{RUN_JAVASCRIPTCORE_TESTS_TESTAPI} eq "true") { … … 103 139 my $programName = basename($0); 104 140 my $buildJSCDefault = $buildJSC ? "will check" : "will not check"; 141 my $testmasmDefault = $runTestMasm ? "will run" : "will not run"; 142 my $testairDefault = $runTestAir ? "will run" : "will not run"; 143 my $testb3Default = $runTestB3 ? "will run" : "will not run"; 105 144 my $testapiDefault = $runTestAPI ? "will run" : "will not run"; 106 145 my $jscStressDefault = $runJSCStress ? "will run" : " will not run"; … … 116 155 --[no-]ftl-jit Turn the FTL JIT on or off 117 156 --[no-]build Check (or don't check) to see if the jsc build is up-to-date (default: $buildJSCDefault) 157 --[no-]testmasm Run (or don't run) testmasm (default: $testmasmDefault) 158 --[no-]testair Run (or don't run) testair (default: $testairDefault) 159 --[no-]testb3 Run (or don't run) testb3 (default: $testb3Default) 118 160 --[no-]testapi Run (or don't run) testapi (default: $testapiDefault) 119 161 --[no-]jsc-stress Run (or don't run) the JSC stress tests (default: $jscStressDefault) … … 146 188 147 189 Environment Variables: 190 - set RUN_JAVASCRIPTCORE_TESTS_TESTMASM to "true" or "false" (no quotes) to determine if we run the testmasm tests. 191 - set RUN_JAVASCRIPTCORE_TESTS_TESTAIR to "true" or "false" (no quotes) to determine if we run the testair tests. 192 - set RUN_JAVASCRIPTCORE_TESTS_TESTB3 to "true" or "false" (no quotes) to determine if we run the testb3 tests. 148 193 - set RUN_JAVASCRIPTCORE_TESTS_TESTAPI to "true" or "false" (no quotes) to determine if we run the testapi tests. 149 194 - set RUN_JAVASCRIPTCORE_TESTS_BUILD to "true" or "false" (no quotes) to set the should-we-build-before-running-tests setting. … … 155 200 'extra-tests=s' => \@extraTests, 156 201 'build!' => \$buildJSC, 202 'testmasm!' => \$runTestMasm, 203 'testair!' => \$runTestAir, 204 'testb3!' => \$runTestB3, 157 205 'testapi!' => \$runTestAPI, 158 206 'jsc-stress!' => \$runJSCStress, … … 217 265 setPathForRunningWebKitApp(\%ENV) if isCygwin(); 218 266 219 sub testapiPath($) 220 { 221 my ($productDir) = @_; 222 my $jscName = "testapi"; 223 $jscName .= "_debug" if configuration() eq "Debug_All"; 224 return File::Spec->catfile($productDir, $jscName); 225 } 226 227 #run api tests 228 if ($runTestAPI) { 267 sub testPath { 268 my ($productDir, $testName) = @_; 269 $testName .= "_debug" if configuration() eq "Debug_All"; 270 return File::Spec->catfile($productDir, $testName); 271 } 272 273 sub runTest { 274 my ($testName, $jsonTestStatusName) = @_; 275 229 276 chdirWebKit(); 230 277 chdir($productDir) or die "Failed to switch directory to '$productDir'\n"; 231 my @command = (test apiPath($productDir));278 my @command = (testPath($productDir, $testName)); 232 279 unshift @command, ("xcrun", "-sdk", xcodeSDK(), "sim") if willUseIOSSimulatorSDK(); 233 280 unshift @command, wrapperPrefixIfNeeded() if shouldUseJhbuild(); … … 243 290 # Use an "indirect object" so that system() won't get confused if the path 244 291 # contains spaces (see perldoc -f exec). 245 my $test apiResult = system { $command[0] } @command;246 my $exitStatus = exitStatus($test apiResult);247 print " testAPI completed with rc=$testapiResult ($exitStatus)\n";292 my $testResult = system { $command[0] } @command; 293 my $exitStatus = exitStatus($testResult); 294 print "$testName completed with rc=$testResult ($exitStatus)\n\n"; 248 295 249 296 if (defined($jsonFileName)) { 250 my $ apiStatus = ($exitStatus == 0)? JSON::PP::true: JSON::PP::false;251 $jsonData{ 'allApiTestsPassed'} = $apiStatus;252 } 253 254 if ($test apiResult && $failFast) {297 my $testStatus = ($exitStatus == 0)? JSON::PP::true: JSON::PP::false; 298 $jsonData{$jsonTestStatusName} = $testStatus; 299 } 300 301 if ($testResult && $failFast) { 255 302 writeJsonDataIfApplicable(); 256 exit exitStatus($testapiResult); 257 } 258 } 303 exit exitStatus($testResult); 304 } 305 } 306 307 if ($runTestMasm) { runTest("testmasm", "allMasmTestsPassed") } 308 if ($runTestAir) { runTest("testair", "allAirTestsPassed") } 309 if ($runTestB3) { runTest("testb3", "allB3TestsPassed") } 310 if ($runTestAPI) { runTest("testapi", "allApiTestsPassed") } 311 259 312 260 313 # Find JavaScriptCore directory
Note:
See TracChangeset
for help on using the changeset viewer.