-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate integration and package tests (#134)
- Loading branch information
Showing
3 changed files
with
57 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
|
||
# Swift package tests | ||
|
||
set -e | ||
|
||
export RUSTFLAGS="-D warnings" | ||
|
||
# Change to the root directory of the Xcode project | ||
cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P | ||
THIS_DIR=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) | ||
ROOT_DIR="$THIS_DIR" | ||
cd $ROOT_DIR | ||
|
||
# Make a temp directory | ||
TEMP_DIR=$(mktemp -d) | ||
|
||
# Delete the temp directory before the shell exits | ||
trap 'rm -rf $TEMP_DIR' EXIT | ||
|
||
# Copy directories related to all of the building and test running to the temp directory | ||
for DIR in crates src examples SwiftRustIntegrationTestRunner | ||
do | ||
cp -r $DIR/ $TEMP_DIR/$DIR | ||
done | ||
cp Cargo.toml $TEMP_DIR | ||
cd $TEMP_DIR/SwiftRustIntegrationTestRunner | ||
|
||
# Build Rust | ||
mkdir -p swift-package-rust-library-fixture/generated | ||
|
||
./swift-package-rust-library-fixture/build.sh | ||
|
||
# Create Swift Package | ||
cargo run -p integration-test-create-swift-package | ||
|
||
# Test Swift Package | ||
cd swift-package-test-package | ||
swift test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters