Skip to content

Commit a343950

Browse files
authored
Merge pull request #1554 from swiftwasm/maxd/local-test-run
Fix local test runs by passing real test dir path
2 parents 3d8b2f7 + 5ebcc60 commit a343950

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

utils/webassembly/build-toolchain.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,3 +125,4 @@ merge_toolchains
125125

126126
cd "$DIST_TOOLCHAIN_DESTDIR"
127127
tar cfz "$PACKAGE_ARTIFACT" "$TOOLCHAIN_NAME"
128+
echo "Toolchain archive created successfully!"

utils/webassembly/ci.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,26 @@ export SCCACHE_DIR="$SOURCE_PATH/build-cache"
3434

3535
$BUILD_SCRIPT
3636

37+
echo "Build script completed, will attempt to run test suites..."
38+
3739
if [[ "$(uname)" == "Darwin" ]]; then
3840
# workaround: host target test directory is necessary to use run-test
3941
mkdir -p $TARGET_BUILD_DIR/swift-macosx-x86_64/test-macosx-x86_64
42+
HOST_PLATFORM=macosx
43+
else
44+
HOST_PLATFORM=linux
4045
fi
4146

4247
if [[ "$(uname)" == "Linux" ]]; then
43-
$RUN_TEST_BIN --build-dir $TARGET_BUILD_DIR --target wasi-wasm32 test/stdlib/
48+
$RUN_TEST_BIN --build-dir $TARGET_BUILD_DIR --target wasi-wasm32 \
49+
$TARGET_BUILD_DIR/swift-${HOST_PLATFORM}-x86_64/test-wasi-wasm32/stdlib
4450
echo "Skip running test suites for Linux"
4551
else
46-
47-
$RUN_TEST_BIN --build-dir $TARGET_BUILD_DIR --target wasi-wasm32 test/stdlib/
52+
$RUN_TEST_BIN --build-dir $TARGET_BUILD_DIR --target wasi-wasm32 \
53+
$TARGET_BUILD_DIR/swift-${HOST_PLATFORM}-x86_64/test-wasi-wasm32/stdlib
4854

4955
# Run test but ignore failure temporarily
5056
ninja check-swift-wasi-wasm32 -C $TARGET_BUILD_DIR/swift-$HOST_SUFFIX || true
5157
fi
58+
59+
echo "The test suite has finished"

0 commit comments

Comments
 (0)