Skip to content

Commit 74fdd9f

Browse files
committed
Fix make check failure on Debian systems
When make check runs on a Debian system, it is reporting: FAIL: run_auparse_tests.sh ========================== cp: cannot stat '../../bindings/swig/python3/.libs/_audit.so': No such file or directory Updated auparse/test/run_auparse_tests.sh.in to locate the built _audit extension via a glob so Debian’s versioned filenames are copied correctly before the Python tests run.
1 parent 62f7816 commit 74fdd9f

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

auparse/test/run_auparse_tests.sh.in

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,23 @@ diff -u "$srcdir"/auparse_test.ref auparse_test.cur
1313
sed -f "$srcdir"/auditd_raw.sed test3.log | sort > auparse_test.raw
1414
diff -u auparse_test.raw auparse_test.cur
1515
if [ "$use_python3" = "yes" ]; then
16-
cp "$top_builddir"/bindings/swig/python3/.libs/_audit.so "$top_builddir"/bindings/swig/python3
16+
audit_builddir="$top_builddir"/bindings/swig/python3
17+
audit_libdir="$audit_builddir"/.libs
18+
audit_module=""
19+
20+
for candidate in "$audit_libdir"/_audit*.so; do
21+
if [ -f "$candidate" ]; then
22+
audit_module="$candidate"
23+
break
24+
fi
25+
done
26+
27+
if [ -z "$audit_module" ]; then
28+
echo "Could not locate Python audit module in $audit_libdir" >&2
29+
exit 1
30+
fi
31+
32+
cp "$audit_module" "$audit_builddir"
1733
PYTHONPATH="$top_builddir"/bindings/python/python3/.libs/ \
1834
PYTHONDONTWRITEBYTECODE=1 \
1935
LD_LIBRARY_PATH="$top_builddir"/auparse/.libs \

0 commit comments

Comments
 (0)