test: skip sandbox tests if not enabled

This commit is contained in:
CismonX 2025-07-11 23:44:21 +08:00
parent 328095ae43
commit 300e3d889a
No known key found for this signature in database
GPG key ID: 3094873E29A482FB
3 changed files with 9 additions and 1 deletions

View file

@ -22,8 +22,12 @@ if BOOKMARKFS_UTIL
check_util_lib_CPPFLAGS = -I$(top_srcdir)/src
check_util_lib_LDADD = $(top_builddir)/src/libbookmarkfs_util.la
check_util_lib_SOURCES = check_lib.c check_watcher.c check_sandbox.c \
check_util_lib_SOURCES = check_lib.c check_watcher.c \
check_hashmap.c check_util.c
if SANDBOX
check_util_lib_SOURCES += check_sandbox.c
endif # SANDBOX
endif # BOOKMARKFS_UTIL
if BOOKMARKFS_MOUNT

View file

@ -59,8 +59,10 @@ dispatch_subcmds (
status = subcmd_prng(argc, argv);
} else if (0 == strcmp("watcher", cmd)) {
status = check_watcher(argc, argv);
#ifdef BOOKMARKFS_SANDBOX
} else if (0 == strcmp("sandbox", cmd)) {
status = check_sandbox(argc, argv);
#endif
} else if (0 == strcmp("hashmap", cmd)) {
status = check_hashmap(argc, argv);
} else {

View file

@ -11,6 +11,8 @@ AT_SETUP([util lib: sandbox])
AT_KEYWORDS([lib sandbox])
ATX_CHECK_LIB([
ATX_FEAT_PREREQ([sandbox])
tmpdir=./$(ath_fn_rand_u64_hex).tmp.d
mkdir $tmpdir