-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We want to make sure that we do not break the default launch procedure of KTF. Hence, add it to CI. Signed-off-by: Norbert Manthey <[email protected]>
- Loading branch information
Showing
2 changed files
with
53 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# | ||
# This script builds the project's boot.iso file in the docker environment | ||
set -e | ||
|
||
# Execute relative to this script | ||
SCRIPTDIR="$( cd "$(dirname "$0")" ; pwd -P )" | ||
declare -r SCRIPTDIR | ||
|
||
# Go to root directory of repository | ||
cd "$SCRIPTDIR"/../.. | ||
|
||
# Build project in docker | ||
make clean V=1 | ||
make docker:boot.iso V=1 |
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,36 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# | ||
# This script builds the project's boot.iso file in the docker environment and | ||
# next launches a test and checks for a successful timeout. | ||
set -e | ||
|
||
# Execute relative to this script | ||
SCRIPTDIR="$( cd "$(dirname "$0")" ; pwd -P )" | ||
declare -r SCRIPTDIR | ||
|
||
# Go to root directory of repository | ||
cd "$SCRIPTDIR"/../.. | ||
|
||
# Build project in docker | ||
echo "Building project from scratch" | ||
make clean V=1 | ||
make docker:boot.iso V=1 | ||
|
||
# Use QEMU to launch the guest | ||
echo "Launching KTF" | ||
declare -i STATUS=0 | ||
timeout 10 make boot V=1 || STATUS=$? | ||
|
||
# Check if the expected exit code happened (124 for timeout) | ||
if [ "$STATUS" -ne 0 ] && [ "$STATUS" -ne 124 ] | ||
then | ||
echo "error: received unexpected exit code $STATUS" | ||
exit $STATUS | ||
elif [ "$STATUS" -eq 124 ] | ||
then | ||
echo "info: terminated with expected timeout signal" | ||
fi | ||
|
||
exit 0 |