Title: [202366] trunk/Tools
Revision
202366
Author
sbar...@apple.com
Date
2016-06-22 22:46:10 -0700 (Wed, 22 Jun 2016)

Log Message

run-_javascript_core-tests should have some environment variables for commonly used settings
https://bugs.webkit.org/show_bug.cgi?id=159047

Reviewed by Keith Miller.

This patch adds three environment variables that run-_javascript_core-tests
consults:
- RUN_JAVASCRIPTCORE_TESTS_TESTAPI can be set to 'true' or 'false'. It
  determines if we should run the api tests or not.
- RUN_JAVASCRIPTCORE_TESTS_BUILD can be set to 'true' or 'false'. It
  determines if we will perform a build or not before running the tests.
  to set the default should-build setting.
- RUN_JAVASCRIPTCORE_TESTS_EXTRA_TESTS can be set to a directory or to
  a yaml file. If set, we will run the extra tests it refers to.

All the values in these environment variables will be overridden if an
option is explicitly passed in. For example, the following will run
the api tests:
`RUN_JAVASCRIPTCORE_TESTS_TESTAPI=false run-_javascript_core-tests --testapi`

* Scripts/run-_javascript_core-tests:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (202365 => 202366)


--- trunk/Tools/ChangeLog	2016-06-23 04:01:04 UTC (rev 202365)
+++ trunk/Tools/ChangeLog	2016-06-23 05:46:10 UTC (rev 202366)
@@ -1,3 +1,27 @@
+2016-06-22  Saam Barati  <sbar...@apple.com>
+
+        run-_javascript_core-tests should have some environment variables for commonly used settings
+        https://bugs.webkit.org/show_bug.cgi?id=159047
+
+        Reviewed by Keith Miller.
+
+        This patch adds three environment variables that run-_javascript_core-tests
+        consults:
+        - RUN_JAVASCRIPTCORE_TESTS_TESTAPI can be set to 'true' or 'false'. It
+          determines if we should run the api tests or not.
+        - RUN_JAVASCRIPTCORE_TESTS_BUILD can be set to 'true' or 'false'. It
+          determines if we will perform a build or not before running the tests.
+          to set the default should-build setting.
+        - RUN_JAVASCRIPTCORE_TESTS_EXTRA_TESTS can be set to a directory or to
+          a yaml file. If set, we will run the extra tests it refers to.
+
+        All the values in these environment variables will be overridden if an
+        option is explicitly passed in. For example, the following will run
+        the api tests:
+        `RUN_JAVASCRIPTCORE_TESTS_TESTAPI=false run-_javascript_core-tests --testapi`
+
+        * Scripts/run-_javascript_core-tests:
+
 2016-06-22  Saam barati  <sbar...@apple.com>
 
         TypeProfiler and TypeProfilerLog don't play nicely with the concurrent JIT

Modified: trunk/Tools/Scripts/run-_javascript_core-tests (202365 => 202366)


--- trunk/Tools/Scripts/run-_javascript_core-tests	2016-06-23 04:01:04 UTC (rev 202365)
+++ trunk/Tools/Scripts/run-_javascript_core-tests	2016-06-23 05:46:10 UTC (rev 202366)
@@ -73,6 +73,32 @@
 my $remoteConfigFile;
 my $jsonFileName;
 
+if ($ENV{RUN_JAVASCRIPTCORE_TESTS_TESTAPI}) {
+    if ($ENV{RUN_JAVASCRIPTCORE_TESTS_TESTAPI} eq "true") {
+        $runTestAPI = 1;
+    } elsif ($ENV{RUN_JAVASCRIPTCORE_TESTS_TESTAPI} eq "false") {
+        $runTestAPI = 0;
+    } else {
+        print "Don't recognize value for RUN_JAVASCRIPTCORE_TESTS_TESTAPI environment variable: '"
+            . $ENV{RUN_JAVASCRIPTCORE_TESTS_TESTAPI} . "'. Should be set to 'true' or 'false'.\n";
+    }
+}
+
+if ($ENV{RUN_JAVASCRIPTCORE_TESTS_BUILD}) {
+    if ($ENV{RUN_JAVASCRIPTCORE_TESTS_BUILD} eq "true") {
+        $buildJSC = 1;
+    } elsif ($ENV{RUN_JAVASCRIPTCORE_TESTS_BUILD} eq "false") {
+        $buildJSC = 0;
+    } else {
+        print "Don't recognize value for RUN_JAVASCRIPTCORE_TESTS_BUILD environment variable: '"
+            . $ENV{RUN_JAVASCRIPTCORE_TESTS_BUILD} . "'. Should be set to 'true' or 'false'.\n";
+    }
+}
+
+if ($ENV{RUN_JAVASCRIPTCORE_TESTS_EXTRA_TESTS}) {
+    $extraTests = $ENV{RUN_JAVASCRIPTCORE_TESTS_EXTRA_TESTS};
+}
+
 my $programName = basename($0);
 my $buildJSCDefault = $buildJSC ? "will check" : "will not check";
 my $testapiDefault = $runTestAPI ? "will run" : "will not run";
@@ -112,6 +138,10 @@
                                 e.g. \"foo=bar x=y\" (no quotes).
   --gmalloc:                    Run tests with Guard Malloc enabled (if no path is given: $gmallocDefaultPath is used)
 
+Environment Variables:
+  - set RUN_JAVASCRIPTCORE_TESTS_TESTAPI to "true" or "false" (no quotes) to determine if we run the testapi tests.
+  - set RUN_JAVASCRIPTCORE_TESTS_BUILD to "true" or "false" (no quotes) to set the should-we-build-before-running-tests setting.
+  - set RUN_JAVASCRIPTCORE_TESTS_EXTRA_TESTS to the path of a yaml file or a directory of JS files to be run as part of run-_javascript_core-tests.
 EOF
 
 GetOptions(
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to