WebKit Bugzilla
Attachment 371092 Details for
Bug 198386
: [PlayStation] Support internal test runner for JSC tests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
198386.2.diff (text/plain), 5.73 KB, created by
Stephan Szabo
on 2019-05-31 15:40:01 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Stephan Szabo
Created:
2019-05-31 15:40:01 PDT
Size:
5.73 KB
patch
obsolete
>diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index 752e7129765..470066d8dbc 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,26 @@ >+2019-05-30 Stephan Szabo <stephan.szabo@sony.com> >+ >+ [PlayStation] Support internal test runner for JSC tests >+ https://bugs.webkit.org/show_bug.cgi?id=198386 >+ >+ Reviewed by Alex Christensen. >+ >+ Support using our test runner with our wrapper library >+ to run multiple tests sequentially in one execution. With >+ default arguments, will run as normal, but with special >+ arguments will shift into this mode. >+ >+ * runtime/Options.h: >+ Export the default values of the JSC options similar >+ to the values for resetting the values between tests. >+ * shell/PlatformPlayStation.cmake: >+ * shell/playstation/TestShell.cpp: Added. >+ (setupTestRun): Function to set up the system before starting the tests >+ (preTest): Function for setting up individual test >+ (runTest): Function to run a test execution >+ (postTest): Function for shutdown of individual test >+ (shutdownTestRun): Function for shutting down the system after test run completes. >+ > 2019-05-28 Tadeu Zagallo <tzagallo@apple.com> > > JITOperations putByVal should mark negative array indices as out-of-bounds >diff --git a/Source/JavaScriptCore/runtime/Options.h b/Source/JavaScriptCore/runtime/Options.h >index 6f223bee75f..14c9b5663e5 100644 >--- a/Source/JavaScriptCore/runtime/Options.h >+++ b/Source/JavaScriptCore/runtime/Options.h >@@ -674,7 +674,7 @@ private: > > // Declare the singleton instance of the options store: > JS_EXPORT_PRIVATE static Entry s_options[numberOfOptions]; >- static Entry s_defaultOptions[numberOfOptions]; >+ JS_EXPORT_PRIVATE static Entry s_defaultOptions[numberOfOptions]; > static const EntryInfo s_optionsInfo[numberOfOptions]; > > friend class Option; >diff --git a/Source/JavaScriptCore/shell/PlatformPlayStation.cmake b/Source/JavaScriptCore/shell/PlatformPlayStation.cmake >index 56b43d83034..202ea75fb81 100644 >--- a/Source/JavaScriptCore/shell/PlatformPlayStation.cmake >+++ b/Source/JavaScriptCore/shell/PlatformPlayStation.cmake >@@ -1,4 +1,6 @@ >+list(REMOVE_ITEM jsc_SOURCES ../jsc.cpp) > list(APPEND jsc_SOURCES >+ ${JAVASCRIPTCORE_DIR}/shell/playstation/TestShell.cpp > ${JAVASCRIPTCORE_DIR}/shell/playstation/Initializer.cpp > ) > >@@ -6,5 +8,5 @@ find_library(LIBTESTWRAPPERS testwrappers PATHS ${WEBKIT_LIBRARIES_DIR}/lib) > > set(PLAYSTATION_jsc_PROCESS_NAME "JSCShell") > set(PLAYSTATION_jsc_MAIN_THREAD_NAME "JSCShell") >-set(PLAYSTATION_jsc_WRAP fopen getcwd main) >+set(PLAYSTATION_jsc_WRAP fopen getcwd chdir main) > list(APPEND jsc_LIBRARIES ${LIBTESTWRAPPERS}) >diff --git a/Source/JavaScriptCore/shell/playstation/TestShell.cpp b/Source/JavaScriptCore/shell/playstation/TestShell.cpp >new file mode 100644 >index 00000000000..1f379c83cd4 >--- /dev/null >+++ b/Source/JavaScriptCore/shell/playstation/TestShell.cpp >@@ -0,0 +1,75 @@ >+/* >+ * Copyright (C) 2019 Sony Interactive Entertainment Inc. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "../jsc.cpp" >+ >+extern "C" void setupTestRun() >+{ >+ // Need to initialize WTF threading before we start any threads. Cannot initialize JSC >+ // threading yet, since that would do somethings that we'd like to defer until after we >+ // have a chance to parse options. >+ WTF::initializeThreading(); >+ >+ // Need to override and enable restricted options before we start parsing options below. >+ Options::enableRestrictedOptions(true); >+ >+ // Initialize JSC before getting VM. >+ WTF::initializeMainThread(); >+ JSC::initializeThreading(); >+ >+#if ENABLE(WEBASSEMBLY) >+ JSC::Wasm::enableFastMemory(); >+#endif >+ Gigacage::disableDisablingPrimitiveGigacageIfShouldBeEnabled(); >+} >+ >+extern "C" void preTest() >+{ >+#define FOR_EACH_OPTION(type_, name_, defaultValue_, availability_, description_) \ >+ JSC::Options::name_() = JSC::Options::name_##Default(); >+ JSC_OPTIONS(FOR_EACH_OPTION) >+#undef FOR_EACH_OPTION >+} >+ >+extern "C" int runTest(int argc, char* argv[]) >+{ >+ CommandLine options(argc, argv); >+ processConfigFile(Options::configFile(), "jsc"); >+ >+ return runJSC( >+ options, true, >+ [&](VM& vm, GlobalObject* globalObject, bool& success) { >+ UNUSED_PARAM(vm); >+ runWithOptions(globalObject, options, success); >+ }); >+} >+ >+extern "C" void postTest() >+{ >+} >+ >+extern "C" void shutdownTestRun() >+{ >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198386
:
370972
|
370996
|
371064
| 371092