Refactor TestWebKitAPI to allow just testing WTF
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Jun 2016 20:38:35 +0000 (20:38 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Jun 2016 20:38:35 +0000 (20:38 +0000)
commit31961348d6653e5d8b3887dea91b7ad5035eaf16
treed5f67fe8ff3d3446e5176b4026a67a4d18b0f490
parentbf5520de2e3884716b2f40a8f27b72c037e089b1
Refactor TestWebKitAPI to allow just testing WTF
https://bugs.webkit.org/show_bug.cgi?id=158625

Reviewed by Tim Horton.

Extract all the WTF tests into a new target to allow a faster build / test / fix
cycle when working on WTF bugs and features.

By calling `run-api-tests --wtf-only`, you don't need to have a build of JavaScriptCore/WebCore/etc
to test WTF only changes.

* Scripts/build-api-tests:
* Scripts/run-api-tests:
(buildTestTool):
(testToolPaths):
Add new options to build-api-tests and run-api-tests to only build/run the WTF test runner.

* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/Configurations/TestWTF.xcconfig: Added.
* TestWebKitAPI/Configurations/TestWTFLibrary.xcconfig: Added.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
Add two new targets, TestWTFLibrary which contains all the WTF tests, and TestWTF,
the test runner that runs the WTF tests.

* TestWebKitAPI/Tests/WTF/RunLoop.cpp:
Use Utilities.h rather than PlatformUtilities.h.

* TestWebKitAPI/Utilities.h: Added.
* TestWebKitAPI/PlatformUtilities.h:
* TestWebKitAPI/cocoa/PlatformUtilitiesCocoa.mm:
* TestWebKitAPI/cocoa/UtilitiesCocoa.mm: Added.
Move the sleep and run functions into a new Utilities.h/cpp file. This file contains utilities
that don't depend on anything in the WebKit project.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201938 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Tools/ChangeLog
Tools/Scripts/build-api-tests
Tools/Scripts/run-api-tests
Tools/TestWebKitAPI/Configurations/TestWTF.xcconfig [new file with mode: 0644]
Tools/TestWebKitAPI/Configurations/TestWTFLibrary.xcconfig [new file with mode: 0644]
Tools/TestWebKitAPI/Configurations/TestWebKitAPILibrary.xcconfig
Tools/TestWebKitAPI/PlatformUtilities.h
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Tools/TestWebKitAPI/Tests/WTF/RunLoop.cpp
Tools/TestWebKitAPI/Utilities.h [new file with mode: 0644]
Tools/TestWebKitAPI/cocoa/PlatformUtilitiesCocoa.mm
Tools/TestWebKitAPI/cocoa/UtilitiesCocoa.mm [new file with mode: 0644]