2012-06-13 06:23:26 +00:00
|
|
|
|
2012-08-13 05:01:20 +00:00
|
|
|
AUTOMAKE_OPTIONS = parallel-tests
|
|
|
|
|
2012-06-13 06:23:26 +00:00
|
|
|
test_key = private-key.rsa
|
|
|
|
test_cert = public-cert.pem
|
2012-08-13 05:01:20 +00:00
|
|
|
test_arches = x86_64 i386
|
|
|
|
test_images = test-x86_64.pecoff test-i386.pecoff
|
2012-06-13 06:23:26 +00:00
|
|
|
|
2012-08-13 05:01:20 +00:00
|
|
|
check_PROGRAMS = test-x86_64.pecoff test-i386.pecoff
|
2012-06-13 06:23:26 +00:00
|
|
|
check_DATA = $(test_key) $(test_cert)
|
2012-08-13 05:01:20 +00:00
|
|
|
check_SCRIPTS = test-wrapper.sh
|
2012-06-13 06:23:26 +00:00
|
|
|
|
2017-10-19 00:20:56 +00:00
|
|
|
test_i386_pecoff_SOURCES = test.S
|
|
|
|
test_x86_64_pecoff_SOURCES = test.S
|
2012-06-13 06:23:26 +00:00
|
|
|
|
2012-08-13 05:01:20 +00:00
|
|
|
test-%.pecoff: test-%.elf
|
2012-06-13 06:23:26 +00:00
|
|
|
$(OBJCOPY) -j .text -j .sdata -j .data \
|
|
|
|
-j .dynamic -j .dynsym -j .rel \
|
|
|
|
-j .rela -j .reloc \
|
2017-10-19 00:20:56 +00:00
|
|
|
--target=$(test_lds) $^ $@
|
2012-06-13 06:23:26 +00:00
|
|
|
$(STRIP) $@
|
|
|
|
|
2012-08-13 05:01:20 +00:00
|
|
|
test-x86_64.pecoff: test_image_arch = x86-64
|
2017-10-19 00:20:56 +00:00
|
|
|
test-x86_64.pecoff: test_lds = efi-app-x86_64
|
2012-08-13 05:01:20 +00:00
|
|
|
test-x86_64.pecoff: ASFLAGS += -m64
|
|
|
|
test-x86_64.pecoff: LDFLAGS += -m64
|
|
|
|
test-i386.pecoff: test_image_arch = i386
|
2017-10-19 00:20:56 +00:00
|
|
|
test-i386.pecoff: test_lds = efi-app-ia32
|
2012-08-13 05:01:20 +00:00
|
|
|
test-i386.pecoff: ASFLAGS += -m32
|
|
|
|
test-i386.pecoff: LDFLAGS += -m32
|
|
|
|
|
2017-10-19 00:20:56 +00:00
|
|
|
test-%.elf: LDFLAGS += -nostdlib
|
|
|
|
test-%.elf: test-%.$(OBJEXT)
|
2012-06-13 06:23:26 +00:00
|
|
|
$(LINK) $<
|
|
|
|
|
2012-08-13 05:01:20 +00:00
|
|
|
test-%.$(OBJEXT): $(srcdir)/test.S
|
2012-06-13 08:23:00 +00:00
|
|
|
$(COMPILE.S) -o $@ $^
|
2012-06-13 06:23:26 +00:00
|
|
|
|
|
|
|
$(test_key): Makefile
|
|
|
|
openssl genrsa -out $@ 2048
|
|
|
|
|
|
|
|
$(test_cert): $(test_key) Makefile
|
|
|
|
openssl req -x509 -sha256 -subj '/' -new -key $< -out $@
|
|
|
|
|
|
|
|
TESTS = sign-verify.sh \
|
|
|
|
sign-verify-detached.sh \
|
2012-08-02 08:43:08 +00:00
|
|
|
sign-detach-verify.sh \
|
2012-06-13 09:25:47 +00:00
|
|
|
sign-attach-verify.sh \
|
|
|
|
sign-missing-image.sh \
|
|
|
|
sign-missing-cert.sh \
|
|
|
|
sign-missing-key.sh \
|
|
|
|
verify-missing-image.sh \
|
2012-06-19 03:19:48 +00:00
|
|
|
verify-missing-cert.sh \
|
2012-06-28 04:38:34 +00:00
|
|
|
sign-invalidattach-verify.sh \
|
2012-08-03 02:03:14 +00:00
|
|
|
cert-table-header.sh \
|
|
|
|
resign-warning.sh \
|
2012-08-13 05:49:40 +00:00
|
|
|
reattach-warning.sh \
|
|
|
|
detach-remove.sh
|
2012-06-13 06:23:26 +00:00
|
|
|
|
2012-08-13 05:01:20 +00:00
|
|
|
TEST_EXTENSIONS = .sh
|
2017-10-18 23:48:01 +00:00
|
|
|
AM_TESTS_ENVIRONMENT = TEST_ARCHES='$(test_arches)'; export TEST_ARCHES;
|
|
|
|
SH_LOG_COMPILER = $(srcdir)/test-wrapper.sh
|
2012-08-13 05:01:20 +00:00
|
|
|
|
2012-06-13 06:23:26 +00:00
|
|
|
EXTRA_DIST = $(test_lds) test.S $(TESTS) $(check_SCRIPTS)
|
2012-08-13 05:01:20 +00:00
|
|
|
CLEANFILES = $(test_key) $(test_cert) $(test_images)
|