-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (27 loc) · 1.18 KB
/
Makefile
File metadata and controls
40 lines (27 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
CC = gcc
CFLAGS = -I/usr/local/include
LDFLAGS = -L/usr/local/lib/x86_64-linux-gnu -Wl,-rpath,/usr/local/lib/x86_64-linux-gnu -lblkio
TESTS_DIR = tests/blkio
TARGET_TESTS_DIR = target/tests/blkio
all: test-client create-base-image
test-client: $(TESTS_DIR)/client.c
$(CC) -o $(TARGET_TESTS_DIR)/client $(TESTS_DIR)/client.c $(CFLAGS) $(LDFLAGS)
create-base-image: $(TESTS_DIR)/create_base_image.c
$(CC) -o $(TARGET_TESTS_DIR)/create_base_image $(TESTS_DIR)/create_base_image.c $(CFLAGS)
build-ubiblk:
cargo build
populate-base-image: create-base-image
./$(TARGET_TESTS_DIR)/create_base_image $(TARGET_TESTS_DIR)/base.raw 2097152
test-write-read: test-client
TEST_MODE=write_read ./$(TARGET_TESTS_DIR)/client
test-lazy-read: test-client
TEST_MODE=lazy_read ./$(TARGET_TESTS_DIR)/client
test-write-encrypted-data: test-client
TEST_MODE=write_encrypted_data ./$(TARGET_TESTS_DIR)/client
test-e2e: test-client build-ubiblk
./$(TESTS_DIR)/run-tests.sh
test-e2e-verbose: test-client build-ubiblk
RUST_LOG=debug RUST_BACKTRACE=full DEBUG=1 ./$(TESTS_DIR)/run-tests.sh
format-tests:
clang-format -i $(TESTS_DIR)/*.c
.PHONY: all test-client test-verbose test-write-read format-tests build-ubiblk