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
Run unit tests on travis #56
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,4 +4,12 @@ set -o pipefail | |
|
||
source /etc/profile.d/gimme.sh | ||
export GOPATH="/root/go" | ||
|
||
# launch OVS | ||
function quit { | ||
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. i don't like the fact that we use docker-builder to run tests, but i guess we can live with it if it saves us from another container 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. Yeah I don't think we need to create another container for that. I will be much more complex with volumes and mounts |
||
/usr/share/openvswitch/scripts/ovs-ctl stop | ||
exit 0 | ||
} | ||
trap quit SIGTERM | ||
/usr/share/openvswitch/scripts/ovs-ctl start --system-id=random | ||
eval "$@" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
# | ||
# This file is part of the KubeVirt project | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
# Copyright 2017 Red Hat, Inc. | ||
# | ||
|
||
set -e | ||
source $(dirname "$0")/common.sh | ||
|
||
DOCKER_DIR=${KUBEVIRT_DIR}/hack/docker-builder | ||
|
||
SYNC_OUT=${SYNC_OUT:-true} | ||
|
||
BUILDER=${job_prefix} | ||
|
||
SYNC_VENDOR=${SYNC_VENDOR:-false} | ||
|
||
TEMPFILE=".rsynctemp" | ||
|
||
# Reduce verbosity if an automated build | ||
BUILD_QUIET= | ||
if [ -n "$JOB_NAME" -o -n "$TRAVIS_BUILD_ID" ]; then | ||
BUILD_QUIET="-q" | ||
fi | ||
|
||
# Build the build container | ||
(cd ${DOCKER_DIR} && docker build . ${BUILD_QUIET} -t ${BUILDER}) | ||
|
||
docker run --rm -it --privileged --network host --cap-add ALL -v /lib/modules:/lib/modules -v `pwd`:/root/go/src/kubevirt.io/ovs-cni -w "/root/go/src/kubevirt.io/ovs-cni" ${BUILDER} make test |
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 should be the other way around - docker-test runs hack/tests.sh
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.
Done