mirror of
https://github.com/falcosecurity/falco.git
synced 2025-07-10 13:13:40 +00:00
Pass the build dir along when running tests
As of 0e1c436d14
, the build directory is
an argument to run_regression_tests.sh. However, the build directory in
falco_tests.yaml is currently hard-coded to /build, with the build
variant influencing the subdirectory.
Clean this up so the entire build directory passed to
run_regression_tests.sh is passed to avocado and used for the build
directory.
Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
This commit is contained in:
parent
193f33cd40
commit
6e11e75c15
@ -34,13 +34,11 @@ class FalcoTest(Test):
|
||||
"""
|
||||
Load the sysdig kernel module if not already loaded.
|
||||
"""
|
||||
build_type = "release"
|
||||
if 'BUILD_TYPE' in os.environ:
|
||||
build_type = os.environ['BUILD_TYPE'].lower()
|
||||
build_type = "debug" if build_type == "debug" else "release"
|
||||
build_dir = "/build"
|
||||
if 'BUILD_DIR' in os.environ:
|
||||
build_dir = os.environ['BUILD_DIR']
|
||||
|
||||
build_dir = os.path.join('/build', build_type)
|
||||
self.falcodir = self.params.get('falcodir', '/', default=os.path.join(self.basedir, build_dir))
|
||||
self.falcodir = self.params.get('falcodir', '/', default=build_dir)
|
||||
|
||||
self.stdout_is = self.params.get('stdout_is', '*', default='')
|
||||
self.stderr_is = self.params.get('stderr_is', '*', default='')
|
||||
|
@ -92,7 +92,7 @@ function run_tests() {
|
||||
for mult in $SCRIPTDIR/falco_traces.yaml $SCRIPTDIR/falco_tests.yaml $SCRIPTDIR/falco_tests_package.yaml $SCRIPTDIR/falco_k8s_audit_tests.yaml; do
|
||||
CMD="avocado run --mux-yaml $mult --job-results-dir $SCRIPTDIR/job-results -- $SCRIPTDIR/falco_test.py"
|
||||
echo "Running: $CMD"
|
||||
$CMD
|
||||
BUILD_DIR=${BUILD_DIR} $CMD
|
||||
RC=$?
|
||||
TEST_RC=$((TEST_RC+$RC))
|
||||
if [ $RC -ne 0 ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user