diff --git a/test/falco_test.py b/test/falco_test.py index 5c084d10..2a209593 100644 --- a/test/falco_test.py +++ b/test/falco_test.py @@ -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='') diff --git a/test/run_regression_tests.sh b/test/run_regression_tests.sh index c04b4224..c5aeb873 100755 --- a/test/run_regression_tests.sh +++ b/test/run_regression_tests.sh @@ -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