Skip to content
This repository was archived by the owner on Mar 7, 2021. It is now read-only.

Commit e47d139

Browse files
committed
Attempt to fix tests
1 parent cc1080b commit e47d139

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

tests/Makefile

+5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1+
ifneq ($(KERNELRELEASE),)
12
obj-m := testmodule.o
23
testmodule-objs := $(TEST_LIBRARY)
34
EXTRA_LDFLAGS += --entry=init_module
45

6+
$(M)/$(TEST_LIBRARY): $(TEST_LIBRARY_ARCHIVE)
7+
$(LD) -r -o $@ --whole-archive $^
8+
else
59
all:
610
$(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(CURDIR)
711

812
clean:
913
$(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(CURDIR) clean
14+
endif

tests/run_tests.py

+3
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ def main():
4646
path
4747
)
4848
)
49+
library_archive, _ = os.path.splitext(os.path.basename(module))
50+
library_archive = os.path.join(library_archive, ".a")
4951
run(
5052
"make", "-C", BASE_DIR,
5153
"TEST_LIBRARY={}".format(
@@ -54,6 +56,7 @@ def main():
5456
os.path.basename(module)
5557
)
5658
),
59+
"TEST_LIBRARY_ARCHIVE={}".format(library_archive),
5760
)
5861
run(
5962
"rustc",

0 commit comments

Comments
 (0)