Skip to content

Commit

Permalink
Build and run checker
Browse files Browse the repository at this point in the history
  • Loading branch information
paulcacheux committed Nov 26, 2022
1 parent 7fc21b7 commit cf98757
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: push

jobs:
test:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand All @@ -15,6 +15,11 @@ jobs:
repository: Alan-Jowett/bpf_conformance
path: conformance

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libboost-all-dev
- name: Setup Go
uses: actions/setup-go@v3
with:
Expand All @@ -24,6 +29,12 @@ jobs:
run: |
go build -o test_driver ./conformance_tests
- name: Help
- name: Build conformance checker
working-directory: conformance
run: |
cmake -S . -B build
cmake --build build
- name: Run checker
run: |
./test_driver -help
./conformance/build/bin/bpf_conformance_runner --test_file_directory ./conformance/tests --plugin_path ./test_driver --debug 1
8 changes: 1 addition & 7 deletions conformance_tests/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,11 @@ import (
"github.com/cilium/ebpf"
"github.com/cilium/ebpf/asm"
"github.com/safchain/baloum/pkg/baloum"
"go.uber.org/zap"
)

const TEST_RUN_SECTION = "test_run"

func main() {
logger, _ := zap.NewDevelopment()
defer logger.Sync()

suggar := logger.Sugar()

program := flag.String("program", "", "input program in hexa form")
flag.Parse()

Expand Down Expand Up @@ -52,7 +46,7 @@ func main() {
},
}

vm := baloum.NewVM(spec, baloum.Opts{Logger: suggar})
vm := baloum.NewVM(spec, baloum.Opts{})

var ctx baloum.Context
code, err := vm.RunProgram(ctx, TEST_RUN_SECTION)
Expand Down

0 comments on commit cf98757

Please sign in to comment.