Skip to content

Commit

Permalink
ci: add go integration tests with supervisord
Browse files Browse the repository at this point in the history
  • Loading branch information
karampok committed Dec 23, 2019
1 parent f2b707d commit 321a5b6
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 23 deletions.
39 changes: 29 additions & 10 deletions .buildkite/pipeline_buildlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,26 @@ steps:
timeout_in_minutes: 10
- label: "Check generated go_deps.bzl file is up to date with go.mod"
command:
- "rm -rf /tmp/$BUILDKITE_STEP_ID/"
- "mkdir -p /tmp/$BUILDKITE_STEP_ID/"
- "cp go.mod go.sum go_deps.bzl /tmp/$BUILDKITE_STEP_ID/"
- "rm -rf /tmp/${BUILDKITE_STEP_ID:-local}/"
- "mkdir -p /tmp/${BUILDKITE_STEP_ID:-local}/"
- "cp go.mod go.sum go_deps.bzl /tmp/${BUILDKITE_STEP_ID:-local}/"
- "make godeps -B"
- "bazel-${BUILDKITE_PIPELINE_SLUG}/external/go_sdk/bin/go mod tidy"
- "diff -u /tmp/$BUILDKITE_STEP_ID/go.mod go.mod"
- "diff -u /tmp/$BUILDKITE_STEP_ID/go.sum go.sum"
- "diff -u /tmp/$BUILDKITE_STEP_ID/go_deps.bzl go_deps.bzl"
- "diff -u /tmp/${BUILDKITE_STEP_ID:-local}/go.mod go.mod"
- "diff -u /tmp/${BUILDKITE_STEP_ID:-local}/go.sum go.sum"
- "diff -u /tmp/${BUILDKITE_STEP_ID:-local}/go_deps.bzl go_deps.bzl"
key: go_deps_lint
retry:
automatic:
- exit_status: -1 # Agent was lost
- exit_status: 255 # Forced agent shutdown
- label: "Check generated go/proto files in git"
command:
- "rm -rf /tmp/$BUILDKITE_STEP_ID/"
- "mkdir -p /tmp/$BUILDKITE_STEP_ID/"
- "cp -R go/proto/ /tmp/$BUILDKITE_STEP_ID/"
- "rm -rf /tmp/${BUILDKITE_STEP_ID:-local}/"
- "mkdir -p /tmp/${BUILDKITE_STEP_ID:-local}/"
- "cp -R go/proto/ /tmp/${BUILDKITE_STEP_ID:-local}/"
- "make gogen"
- "diff -ur /tmp/$BUILDKITE_STEP_ID/proto/ go/proto/"
- "diff -ur /tmp/${BUILDKITE_STEP_ID:-local}/proto/ go/proto/"
key: go_gen_lint
retry:
automatic:
Expand All @@ -53,3 +53,22 @@ steps:
automatic:
- exit_status: -1 # Agent was lost
- exit_status: 255 # Forced agent shutdown
- label: "Integration: {cert_req,pp,end2end,scmp}_integration"
command:
- bazel --bazelrc=.bazelrc_ci build //:scion //:scion-ci >/dev/null 2>&1
- tar -kxf bazel-bin/scion.tar -C bin --overwrite
- tar -kxf bazel-bin/scion-ci.tar -C bin --overwrite
- ./scion.sh topology nobuild
- ./scion.sh run nobuild && sleep 10
- ./bin/cert_req_integration -log.console warn -log.dir logs
- ./bin/pp_integration -log.console warn -log.dir logs
- ./bin/scmp_integration -log.console warn -log.dir logs
- ./bin/end2end_integration -log.console warn -log.dir logs
artifact_paths:
- "artifacts.out/**/*"
timeout_in_minutes: 5
key: integration_tests
retry:
automatic:
- exit_status: -1 # Agent was lost
- exit_status: 255 # Forced agent shutdown
13 changes: 0 additions & 13 deletions scion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ cmd_run() {
./tools/quiet ./docker.sh tester
fi
fi
run_setup
echo "Running the network..."
# Start dispatcher first, as it is requrired by the border routers.
./tools/quiet ./scion.sh mstart '*disp*'
Expand Down Expand Up @@ -104,7 +103,6 @@ stop_jaeger() {
}

cmd_mstart() {
run_setup
# Run with docker-compose or supervisor
if is_docker_be; then
services="$(glob_docker "$@")"
Expand All @@ -115,17 +113,6 @@ cmd_mstart() {
fi
}

run_setup() {
python/integration/set_ipv6_addr.py -a
# Create dispatcher and sciond dirs or change owner
local disp_dir="/run/shm/dispatcher"
[ -d "$disp_dir" ] || mkdir "$disp_dir"
[ $(stat -c "%U" "$disp_dir") == "$LOGNAME" ] || { sudo -p "Fixing ownership of $disp_dir - [sudo] password for %p: " chown $LOGNAME: "$disp_dir"; }
local sciond_dir="/run/shm/sciond"
[ -d "$sciond_dir" ] || mkdir "$sciond_dir"
[ $(stat -c "%U" "$sciond_dir") == "$LOGNAME" ] || { sudo -p "Fixing ownership of $sciond_dir - [sudo] password for %p: " chown $LOGNAME: "$sciond_dir"; }
}

cmd_stop() {
echo "Terminating this run of the SCION infrastructure"
if is_docker_be; then
Expand Down

0 comments on commit 321a5b6

Please sign in to comment.