Skip to content

Run tests against Firecracker's released version even test-images fails #475

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

Merged
merged 2 commits into from
Jan 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 22 additions & 23 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,6 @@ steps:
distro: "${BUILDKITE_AGENT_META_DATA_DISTRO}"
hostname: "${BUILDKITE_AGENT_META_DATA_HOSTNAME}"

# Since make test-images mutates the source directory, it cannot be run with other steps.
- wait

- label: ':linux: build docker images'
commands:
- make test-images
agents:
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE:-default}"
distro: "${BUILDKITE_AGENT_META_DATA_DISTRO}"
hostname: "${BUILDKITE_AGENT_META_DATA_HOSTNAME}"

- wait

- label: 'git log validation'
command: './.buildkite/logcheck.sh'
# This should run in the same queue, but we don't care whether it runs on
Expand Down Expand Up @@ -131,23 +118,35 @@ steps:
distro: "${BUILDKITE_AGENT_META_DATA_DISTRO}"
hostname: "${BUILDKITE_AGENT_META_DATA_HOSTNAME}"

- label: ':hammer: test against firecracker main'
env:
FC_TEST_BIN: "${FC_TEST_DATA_PATH}/firecracker-main"
FC_TEST_JAILER_BIN: "${FC_TEST_DATA_PATH}/jailer-main"
DOCKER_IMAGE_TAG: "$BUILDKITE_BUILD_NUMBER"
- label: 'go mod tidy'
commands:
- export FC_TEST_TAP=fc-mst-tap${BUILDKITE_BUILD_NUMBER}
- make test EXTRAGOARGS="-exec 'sudo -E' -v -count=1 -race" DISABLE_ROOT_TESTS=
- 'go mod tidy'
- test -z "$(git status --porcelain)" && exit 0 || git --no-pager diff && echo -e '\ngo.mod and/or go.sum differ from committed, please run "go mod tidy" and commit the updated files.\n' && exit 1
agents:
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE:-default}"
distro: "${BUILDKITE_AGENT_META_DATA_DISTRO}"
hostname: "${BUILDKITE_AGENT_META_DATA_HOSTNAME}"

- label: 'go mod tidy'
- wait

- label: ':linux: build Firecracker from the tip of main branch'
commands:
- 'go mod tidy'
- test -z "$(git status --porcelain)" && exit 0 || git --no-pager diff && echo -e '\ngo.mod and/or go.sum differ from committed, please run "go mod tidy" and commit the updated files.\n' && exit 1
- make test-images
agents:
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE:-default}"
distro: "${BUILDKITE_AGENT_META_DATA_DISTRO}"
hostname: "${BUILDKITE_AGENT_META_DATA_HOSTNAME}"

- wait

- label: ':hammer: test against Firecracker above'
env:
FC_TEST_BIN: "${FC_TEST_DATA_PATH}/firecracker-main"
FC_TEST_JAILER_BIN: "${FC_TEST_DATA_PATH}/jailer-main"
DOCKER_IMAGE_TAG: "$BUILDKITE_BUILD_NUMBER"
commands:
- export FC_TEST_TAP=fc-mst-tap${BUILDKITE_BUILD_NUMBER}
- make test EXTRAGOARGS="-exec 'sudo -E' -v -count=1 -race" DISABLE_ROOT_TESTS=
agents:
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE:-default}"
distro: "${BUILDKITE_AGENT_META_DATA_DISTRO}"
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,7 @@ $(FIRECRACKER_DIR):
test-images: $(FIRECRACKER_BIN) $(JAILER_BIN)

$(FIRECRACKER_BIN) $(JAILER_BIN): $(FIRECRACKER_DIR)
$(FIRECRACKER_DIR)/tools/devtool -y build --release && \
$(FIRECRACKER_DIR)/tools/devtool strip
$(FIRECRACKER_DIR)/tools/devtool -y build --release
cp $(FIRECRACKER_DIR)/build/cargo_target/$(FIRECRACKER_TARGET)/release/firecracker $(FIRECRACKER_BIN)
cp $(FIRECRACKER_DIR)/build/cargo_target/$(FIRECRACKER_TARGET)/release/jailer $(JAILER_BIN)

Expand Down