File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -21,11 +21,18 @@ test:
21
21
CONFIGURATION=release SWIFT_BUILD_FLAGS=" $( SWIFT_BUILD_FLAGS) " $(MAKE ) test && \
22
22
CONFIGURATION=release SWIFT_BUILD_FLAGS=" $( SWIFT_BUILD_FLAGS) -Xswiftc -DJAVASCRIPTKIT_WITHOUT_WEAKREFS" $(MAKE ) test
23
23
24
+ TEST_RUNNER := node --experimental-wasi-unstable-preview1 scripts/test-harness.mjs
24
25
.PHONY : unittest
25
26
unittest :
26
27
@echo Running unit tests
27
28
swift build --build-tests -Xswiftc -Xclang-linker -Xswiftc -mexec-model=reactor -Xlinker --export-if-defined=main -Xlinker --export-if-defined=__main_argc_argv --static-swift-stdlib -Xswiftc -static-stdlib $(SWIFT_BUILD_FLAGS )
28
- node --experimental-wasi-unstable-preview1 scripts/test-harness.mjs ./.build/debug/JavaScriptKitPackageTests.wasm
29
+ # Swift 6.1 and later uses .xctest for XCTest bundle but earliers used .wasm
30
+ # See https://github.com/swiftlang/swift-package-manager/pull/8254
31
+ if [ -f .build/debug/JavaScriptKitPackageTests.xctest ]; then \
32
+ $(TEST_RUNNER) .build/debug/JavaScriptKitPackageTests.xctest; \
33
+ else \
34
+ $(TEST_RUNNER) .build/debug/JavaScriptKitPackageTests.wasm; \
35
+ fi
29
36
30
37
.PHONY : benchmark_setup
31
38
benchmark_setup :
You can’t perform that action at this time.
0 commit comments