diff options
| author | Peter Jones <pjones@redhat.com> | 2021-07-23 14:31:46 -0400 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2021-09-07 17:05:04 -0400 |
| commit | 97350bd6e02ceb0818e8bc0a2b2bc6adaf9c2092 (patch) | |
| tree | 3938da2461cf083b8d40c6809b6622d836af7b15 /include/test.mk | |
| parent | e5a406b4655f75bb1a691acc73a18ac69cc87cb0 (diff) | |
| download | efi-boot-shim-97350bd6e02ceb0818e8bc0a2b2bc6adaf9c2092.tar.gz efi-boot-shim-97350bd6e02ceb0818e8bc0a2b2bc6adaf9c2092.zip | |
tests: link all tests against libefivar
When writing new tests, if we get to the point where we have to use
libefivar for something, it's very common that I accidentally link it in
twice. When that happens, I typically spend an unfortunate amount of
time staring at FLTO's mangled names before I figure out what I've done
wrong.
This patch makes all the tests link against libefivar, thereby
avoiding the issue.
Signed-off-by: Peter Jones <pjones@redhat.com>
Diffstat (limited to 'include/test.mk')
| -rw-r--r-- | include/test.mk | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/include/test.mk b/include/test.mk index c11d0c74..60a7e6fa 100644 --- a/include/test.mk +++ b/include/test.mk @@ -67,10 +67,7 @@ $(wildcard test-*.c) :: %.c : test-random.h $(patsubst %.c,%,$(wildcard test-*.c)) :: | test-random.h $(patsubst %.c,%.o,$(wildcard test-*.c)) : | test-random.h -test-load-options_FILES = lib/guid.c \ - libefi-test.a \ - -lefivar -test-load-options :: libefi-test.a +test-load-options_FILES = lib/guid.c test-load-options : CFLAGS+=-DHAVE_SHIM_LOCK_GUID test-sbat_FILES = csv.c lib/variables.c lib/guid.c @@ -83,7 +80,7 @@ tests := $(patsubst %.c,%,$(wildcard test-*.c)) $(tests) :: test-% : | libefi-test.a $(tests) :: test-% : test.c test-%.c $(test-%_FILES) - $(CC) $(CFLAGS) -o $@ $^ $(wildcard $*.c) $(test-$*_FILES) libefi-test.a + $(CC) $(CFLAGS) -o $@ $^ $(wildcard $*.c) $(test-$*_FILES) libefi-test.a -lefivar $(VALGRIND) ./$@ test : $(tests) |
