Files
falco/test
Leonardo Di Donato bb1282c7be update(test): make run_regression_tests.sh script accept different
options

The following options have been added:
* -v (verbose)
* -p (prepare falco_traces test suite)
* -b (specify custom branch for downloading trace files)
* -d (specify the build directory)

Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2020-07-20 22:48:00 +02:00
..
2019-11-14 10:00:36 -08:00
2019-10-08 16:02:26 +02:00
2019-10-08 16:02:26 +02:00
2019-10-08 16:02:26 +02:00

Falco regression tests

This folder contains the Regression tests suite for Falco.

You can find instructions on how to run this test suite on the Falco website here.

Test suites

Running locally

This step assumes you already built Falco.

Also, it assumes you already run the following command from the build directory:

make test-trace-files

It prepares the fixtures (json and scap files) needed by the integration tests.

Using virtualenv the steps to locally run a specific test suite are the following ones (from this directory):

virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
BUILD_DIR="../build" avocado run --mux-yaml falco_tests.yaml --job-results-dir /tmp/job-results -- falco_test.py
deactivate

The name of the specific test suite to run is falco_tests.yaml in this case. Change it to run others test suites.

In case you want to only execute a specific test case, use the --mux-filter-only parameter as follows:

BUILD_DIR="../build" avocado run --mux-yaml falco_tests.yaml --job-results-dir /tmp/job-results --mux-filter-only /run/trace_files/program_output -- falco_test.py

To obtain the path of all the available variants, execute:

avocado variants --mux-yaml falco_tests.yaml

falco_traces

The falco_traces.yaml test suite gets generated through the falco_traces.yaml.in file and some fixtures (scap files) downloaded from the web at execution time.

  1. Ensure you have unzip and xargs utilities

  2. Prepare the test suite with the following command:

    bash run_regression_tests.sh -p -v
    

falco_tests_package