-
Notifications
You must be signed in to change notification settings - Fork 79
/
.kitura-test.sh
41 lines (36 loc) · 1.14 KB
/
.kitura-test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Run Kitura-net tests
travis_start "swift_test"
echo ">> Executing Kitura-net tests"
swift test
SWIFT_TEST_STATUS=$?
travis_end
if [ $SWIFT_TEST_STATUS -ne 0 ]; then
echo ">> swift test command exited with $SWIFT_TEST_STATUS"
# Return a non-zero status so that Package-Builder will generate a backtrace
return $SWIFT_TEST_STATUS
fi
# Clone Kitura
set -e
echo ">> Building Kitura"
travis_start "swift_build_kitura"
cd .. && git clone https://github.com/Kitura/Kitura && cd Kitura
# Build once
swift build
# Edit package Kitura-net to point to the current branch
echo ">> Editing Kitura package to use latest Kitura-net"
swift package edit Kitura-net --path ../Kitura-net
travis_end
set +e
# Run Kitura tests
travis_start "swift_test_kitura"
echo ">> Executing Kitura tests"
swift test
SWIFT_TEST_STATUS=$?
travis_end
if [ $SWIFT_TEST_STATUS -ne 0 ]; then
echo ">> swift test command exited with $SWIFT_TEST_STATUS"
# Return a non-zero status so that Package-Builder will generate a backtrace
return $SWIFT_TEST_STATUS
fi
# Move back to the original build directory. This is needed on macOS builds for the subsequent swiftlint step.
cd ../Kitura-net