Skip to content

Commit

Permalink
Update test script
Browse files Browse the repository at this point in the history
  • Loading branch information
colemancda committed Dec 27, 2024
1 parent c0fca55 commit 2925a53
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ source $SWIFT_BUILDROOT/.devcontainer/build-scripts/swift-define
# Build
cd $WORKING_DIR
make $BUILDROOT_OPTIONS swift-hello-build
/usr/bin/$QEMU_BIN -L $BUILDROOT_TARGET $BUILDROOT_TARGET/usr/bin/swift-hello
file $BUILDROOT_TARGET/usr/bin/swift-hello
13 changes: 13 additions & 0 deletions .devcontainer/build-scripts/run-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
set -e

# Configurable
SWIFT_BUILDROOT="${SWIFT_BUILDROOT:=$(pwd)}"
source $SWIFT_BUILDROOT/.devcontainer/build-scripts/swift-define

# Build
cd $WORKING_DIR
make $BUILDROOT_OPTIONS swift-hello-build
QEMU_TEST="/usr/bin/$QEMU_BIN -L $BUILDROOT_TARGET $BUILDROOT_TARGET/usr/bin/swift-hello"
echo "$QEMU_TEST"
$QEMU_TEST
4 changes: 2 additions & 2 deletions .github/workflows/buildroot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ jobs:
with:
name: build-${{ matrix.arch }}
path: ${{ github.workspace }}/output/${{ matrix.arch }}/images/rootfs.tar
- name: Test
- name: Build Test
run: |
export SWIFT_BUILDROOT=$GITHUB_WORKSPACE
export SWIFT_TARGET_ARCH=${{ matrix.arch }}
$SWIFT_BUILDROOT/.devcontainer/build-scripts/test-swift.sh
$SWIFT_BUILDROOT/.devcontainer/build-scripts/build-test.sh
- name: Upload test binary
uses: actions/[email protected]
with:
Expand Down

0 comments on commit 2925a53

Please sign in to comment.