Skip to content

Commit 1bc21f4

Browse files
Merge pull request #1848 from swiftwasm/katei/fix-broken-test-script
Fix broken test script
2 parents c0cda72 + 3e8e719 commit 1bc21f4

File tree

3 files changed

+29
-11
lines changed

3 files changed

+29
-11
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@ jobs:
134134
name: macos-installable
135135
path: ../swift-wasm-DEVELOPMENT-SNAPSHOT-osx.tar.gz
136136
- name: Pack test results
137-
run: tar cJf swift-test-results.tar.gz ../target-build/*/swift-macosx-x86_64/swift-test-results
137+
working-directory: ${{ github.workspace }}/../
138+
run: |
139+
tar cJf ./swift/swift-test-results.tar.gz target-build/*/swift-macosx-x86_64/swift-test-results
138140
- name: Upload test results
139141
uses: actions/upload-artifact@v1
140142
with:

test/lit.cfg

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,11 +1391,17 @@ elif run_os == 'wasi':
13911391
# Exclude test cases that use objc-interop because clang doesn't support it
13921392
# with WebAssembly binary file yet.
13931393
def use_objc_interop(path):
1394-
with open(path) as f:
1395-
return '-enable-objc-interop' in f.read()
1394+
try:
1395+
with open(path) as f:
1396+
return '-enable-objc-interop' in f.read()
1397+
except:
1398+
return False
13961399
def lldb_related_test(path):
1397-
with open(path) as f:
1398-
return 'lldb-moduleimport-test' in f.read()
1400+
try:
1401+
with open(path) as f:
1402+
return 'lldb-moduleimport-test' in f.read()
1403+
except:
1404+
return False
13991405

14001406
def disabled_filenames(path):
14011407
matches = []

utils/webassembly/ci.sh

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,21 @@ set -ex
55
SOURCE_PATH="$( cd "$(dirname $0)/../../.." && pwd )"
66
SWIFT_PATH=$SOURCE_PATH/swift
77
UTILS_PATH=$SWIFT_PATH/utils/webassembly
8-
if [[ "$(uname)" == "Linux" ]]; then
9-
DEPENDENCIES_SCRIPT=$UTILS_PATH/linux/install-dependencies.sh
10-
else
11-
DEPENDENCIES_SCRIPT=$UTILS_PATH/macos/install-dependencies.sh
12-
fi
8+
9+
case $(uname -s) in
10+
Darwin)
11+
DEPENDENCIES_SCRIPT=$UTILS_PATH/macos/install-dependencies.sh
12+
HOST_SUFFIX=macosx-x86_64
13+
;;
14+
Linux)
15+
DEPENDENCIES_SCRIPT=$UTILS_PATH/linux/install-dependencies.sh
16+
HOST_SUFFIX=linux-x86_64
17+
;;
18+
*)
19+
echo "Unrecognised platform $(uname -s)"
20+
exit 1
21+
;;
22+
esac
1323

1424
BUILD_SCRIPT=$UTILS_PATH/build-toolchain.sh
1525
RUN_TEST_BIN=$SWIFT_PATH/utils/run-test
@@ -37,5 +47,5 @@ else
3747
$RUN_TEST_BIN --build-dir $TARGET_BUILD_DIR --target wasi-wasm32 test/stdlib/
3848

3949
# Run test but ignore failure temporarily
40-
$BUILD_SCRIPT -t || true
50+
ninja check-swift-wasi-wasm32 -C $TARGET_BUILD_DIR/swift-$HOST_SUFFIX || true
4151
fi

0 commit comments

Comments
 (0)