forked from bpftrace/bpftrace
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scripts: Add script to update codegen tests
This script helps update codegen changes. Basically all it does is compile bpftrace against LLVM 8 and run bpftrace_test with the right invocation.
- Loading branch information
Showing
3 changed files
with
37 additions
and
3 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
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,30 @@ | ||
#!/bin/bash | ||
|
||
# Updates codegen tests' expected LLVM IR | ||
# | ||
|
||
set -eu | ||
|
||
# Change dir to project root | ||
cd "$(dirname "${BASH_SOURCE[0]}")" | ||
cd .. | ||
|
||
# Build docker image | ||
pushd docker | ||
docker build \ | ||
--network host \ | ||
--build-arg LLVM_VERSION=8 \ | ||
-t bpftrace-builder-bionic \ | ||
-f Dockerfile.bionic \ | ||
. | ||
popd | ||
|
||
# Update IR | ||
docker run \ | ||
--network host \ | ||
--rm \ | ||
-it \ | ||
-v $(pwd):$(pwd) \ | ||
-e BPFTRACE_UPDATE_TESTS=1 \ | ||
-e TEST_ARGS="--gtest_filter=codegen.*" \ | ||
bpftrace-builder-bionic "$(pwd)/build-codegen-update" Debug "$@" |
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