From aeb7573732347cd0bbf0e3d7e560a53f875313cf Mon Sep 17 00:00:00 2001 From: Alice Frosi Date: Fri, 31 Mar 2023 11:10:42 +0200 Subject: tests: add tests for filtering the syscalls --- tests/unit/Makefile | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'tests/unit/Makefile') diff --git a/tests/unit/Makefile b/tests/unit/Makefile index 1c3a413..aeaf6ae 100644 --- a/tests/unit/Makefile +++ b/tests/unit/Makefile @@ -7,8 +7,13 @@ OP_DIR := ../../ COOKER_DIR := ../../cooker DBG_DIR := ../../debug -SRCS_FILTER := $(COOKER_DIR)/filter.c $(DBG_DIR)/disasm.c $(COMMON_DIR)/common.c -HEADERS_FILTER := $(COOKER_DIR)/filter.h $(DBG_DIR)/disasm.h $(COMMON_DIR)/common.h +SRCS_FILTER_BUILD := $(COOKER_DIR)/filter.c $(DBG_DIR)/disasm.c $(COMMON_DIR)/common.c +HEADERS_FILTER_BUILD := $(COOKER_DIR)/filter.h $(DBG_DIR)/disasm.h $(COMMON_DIR)/common.h + +SRCS_FILTER := $(COOKER_DIR)/filter.c $(COMMON_DIR)/common.c util.c \ + $(DBG_DIR)/disasm.c +HEADERS_FILTER := $(COOKER_DIR)/filter.h $(COMMON_DIR)/common.h \ + $(DBG_DIR)/disasm.h testutil.h HEADERS_OP_CALL := $(COMMON_DIR)/gluten.h $(OP_DIR)/operations.h SRCS_OP_CALL := $(OP_DIR)/operations.c @@ -33,11 +38,16 @@ CFLAGS += -DSEITAN_AUDIT_ARCH=AUDIT_ARCH_$(AUDIT_ARCH) -DTMP_DATA_SIZE=1000 test: test-filter test-operations test-op-call -test-filter-build: test_filter_build.c $(SRCS_FILTER) $(HEADERS_FILTER) +test-filter-build: test_filter_build.c $(SRCS_FILTER_BUILD) $(HEADERS_FILTER_BUILD) $(CC) $(CFLAGS) -o test-filter-build $(SRCS_FILTER) \ test_filter_build.c ./test-filter-build +test-filter: test_filter.c $(SRCS_FILTER) $(HEADERS_FILTER) + $(CC) $(CFLAGS) -o test-filter $(SRCS_FILTER) \ + test_filter.c + ./test-filter + test-op-call: test_op_call.c $(SRCS_OP_CALL) $(HEADERS_OP_CALL) $(CC) $(CFLAGS) -o test-op-call $(SRCS_OP_CALL) \ test_op_call.c -- cgit v1.2.3