Skip to content

Commit

Permalink
Add info to the README.md on running the tests
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
  • Loading branch information
Alan Jowett committed May 13, 2021
1 parent 6492b7a commit 691c368
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,29 @@ and a simple executable used by the testsuite. After building the
library you can install using `make -C vm install` via either root or
sudo.

## Running the tests
To run the tests, you first need to build the vm code then use nosetests to execute the tests. Note: The tests have some dependencies that need to be present. See the [.travis.yml](https://github.com/iovisor/ubpf/blob/master/.travis.yml) for details.

### Before running the test (assuming Debian derived distro)
```
sudo apt-get update
sudo apt-get -y install python python-pip python-setuptools python-wheel python-nose
python2 -m pip install --upgrade "pip<21.0"
python2 -m pip install -r requirements.txt
python2 -m pip install cpp-coveralls
```

### Running the test
```
make -C vm COVERAGE=1
nosetests -v # run tests
```

### After running the test
```
coveralls --gcov-options '\-lp' -i $PWD/vm/ubpf_vm.c -i $PWD/vm/ubpf_jit_x86_64.c -i $PWD/vm/ubpf_loader.c
```

## Compiling C to eBPF

You'll need [Clang 3.7](http://llvm.org/releases/download.html#3.7.0).
Expand Down

0 comments on commit 691c368

Please sign in to comment.