-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add error handling #70
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,9 @@ | |
XTRACE=$(set +o | grep xtrace) | ||
set -o xtrace | ||
|
||
# Track failures | ||
FAILED=0 | ||
|
||
OVS_REPO=${1:-https://github.com/openvswitch/ovs.git} | ||
OVS_BRANCH=${2:-master} | ||
|
||
|
@@ -12,13 +15,15 @@ echo "OVS_REPO=${OVS_REPO} OVS_BRANCH=${OVS_BRANCH}" | |
# A combined script to run all the things | ||
|
||
# Prepare the environment | ||
./prepare.sh | ||
./prepare.sh || FAILED=$(( $FAILED + 1 )) | ||
|
||
# Run the testsuite | ||
./scale-run.sh $OVS_REPO $OVS_BRANCH | ||
./scale-run.sh $OVS_REPO $OVS_BRANCH || FAILED=$(( $FAILED + 1 )) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With the PR, shall we avoid calling exit in the other script, e.g., https://github.com/openvswitch/ovn-scale-test/blob/master/ci/scale-run.sh#L23 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, that should be a return instead of an exit. I will fix it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks |
||
|
||
# Clean things up | ||
./scale-cleanup.sh | ||
./scale-cleanup.sh || FAILED=$(( $FAILED + 1 )) | ||
|
||
return $FAILED | ||
|
||
# Restore xtrace | ||
$XTRACE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this variable used to indicate how many tests the CI job fails?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's mainly used to detect if a specific command in docker-rally.sh fails. If run fails, we want to ensure we run cleanup, but we need to remember run failed so we can return that to travis-ci. Make sense?