1# $OpenBSD: Makefile.inc,v 1.36 2024/01/08 08:26:38 tb Exp $ 2 3.PATH: ${.CURDIR}/../../../../usr.sbin/rpki-client 4 5PROGS += test-ip 6PROGS += test-cert 7PROGS += test-gbr 8PROGS += test-geofeed 9PROGS += test-mft 10PROGS += test-roa 11PROGS += test-rsc 12PROGS += test-tal 13PROGS += test-rrdp 14PROGS += test-aspa 15PROGS += test-tak 16 17.for p in ${PROGS} 18REGRESS_TARGETS += run-regress-$p 19.endfor 20 21CFLAGS+= -I${.CURDIR}/.. -I${.CURDIR}/../../../../usr.sbin/rpki-client 22LDADD+= -lcrypto -lutil 23DPADD+= ${LIBCRYPTO} ${LIBUTIL} 24 25CLEANFILES+= *.out *.err *.txt 26 27SRCS_test-ip += test-ip.c ip.c io.c encoding.c print.c x509.c \ 28 validate.c as.c cert.c cms.c crl.c mft.c json.c \ 29 constraints-dummy.c rfc3779.c 30run-regress-test-ip: test-ip 31 ./test-ip 32 33TALARGS += ta/AfriNIC.cer tal/afrinic.tal 34TALARGS += ta/apnic-rpki-root-iana-origin.cer tal/apnic.tal 35TALARGS += ta/ripe-ncc-ta.cer tal/ripe.tal 36 37SRCS_test-cert+= test-cert.c cert.c cms.c crl.c x509.c ip.c as.c io.c \ 38 tal.c validate.c encoding.c print.c mft.c json.c \ 39 constraints-dummy.c rfc3779.c 40run-regress-test-cert: test-cert 41 ./test-cert -v ${.CURDIR}/../cer/*.cer 42 ./test-cert -vt ${TALARGS:S,,${.CURDIR}/../&,} 43 44SRCS_test-mft+= test-mft.c mft.c crl.c cms.c x509.c ip.c io.c validate.c \ 45 encoding.c print.c json.c cert.c as.c \ 46 constraints-dummy.c rfc3779.c 47run-regress-test-mft: test-mft 48 ./test-mft -v ${.CURDIR}/../mft/*.mft 49 50SRCS_test-roa+= test-roa.c roa.c cms.c x509.c ip.c as.c io.c json.c \ 51 encoding.c print.c validate.c cert.c crl.c mft.c repo-dummy.c \ 52 constraints-dummy.c rfc3779.c 53run-regress-test-roa: test-roa 54 ./test-roa -v ${.CURDIR}/../roa/*.roa 55 56SRCS_test-rsc+= test-rsc.c rsc.c cms.c x509.c ip.c as.c io.c \ 57 encoding.c print.c validate.c cert.c crl.c mft.c json.c \ 58 constraints-dummy.c rfc3779.c 59run-regress-test-rsc: test-rsc 60 ./test-rsc -v ${.CURDIR}/../rsc/*.sig 61 62SRCS_test-gbr+= test-gbr.c gbr.c cms.c crl.c x509.c ip.c io.c \ 63 encoding.c print.c validate.c as.c cert.c mft.c json.c \ 64 constraints-dummy.c rfc3779.c 65run-regress-test-gbr: test-gbr 66 ./test-gbr -v ${.CURDIR}/../gbr/*.gbr 67 68SRCS_test-geofeed+= test-geofeed.c geofeed.c cms.c x509.c ip.c io.c \ 69 encoding.c print.c validate.c as.c cert.c crl.c mft.c json.c \ 70 constraints-dummy.c rfc3779.c 71run-regress-test-geofeed: test-geofeed 72 ./test-geofeed -v ${.CURDIR}/../geofeed/*.csv 73 74SRCS_test-tal+= test-tal.c tal.c ip.c io.c validate.c cms.c \ 75 encoding.c print.c crl.c x509.c json.c cert.c as.c mft.c \ 76 constraints-dummy.c rfc3779.c 77run-regress-test-tal: test-tal 78 ./test-tal -v ${.CURDIR}/../tal/*.tal 79 80SRCS_test-aspa+= test-aspa.c aspa.c cms.c x509.c ip.c as.c io.c \ 81 encoding.c print.c validate.c cert.c crl.c mft.c repo-dummy.c \ 82 json.c constraints-dummy.c rfc3779.c 83run-regress-test-aspa: test-aspa 84 ./test-aspa -v ${.CURDIR}/../aspa/*.asa 85 86SRCS_test-tak+= test-tak.c tak.c cms.c x509.c ip.c as.c io.c \ 87 encoding.c print.c validate.c cert.c crl.c mft.c json.c \ 88 constraints-dummy.c rfc3779.c 89run-regress-test-tak: test-tak 90 ./test-tak -v ${.CURDIR}/../tak/*.tak 91 92SRCS_test-rrdp+= test-rrdp.c rrdp_delta.c rrdp_notification.c cms.c \ 93 rrdp_snapshot.c rrdp_util.c cert.c as.c mft.c io.c \ 94 encoding.c ip.c validate.c crl.c x509.c \ 95 constraints-dummy.c rfc3779.c print.c json.c 96LDADD_test-rrdp+= -lexpat ${LDADD} 97DPADD_test-rrdp+= ${LIBEXPAT} ${DPADD} 98run-regress-test-rrdp: test-rrdp 99 ./test-rrdp \ 100 -n < ${.CURDIR}/../rrdp/notification.xml 2>&1 | tee rrdp-r1.out 101 cmp ${.CURDIR}/../rrdp/rrdp-r1.out rrdp-r1.out 102 103 ./test-rrdp -S 8fe05c2e-047d-49e7-8398-cd4250a572b1 -N 50500 \ 104 -n < ${.CURDIR}/../rrdp/notification.xml 2>&1 | tee rrdp-r2.out 105 cmp ${.CURDIR}/../rrdp/rrdp-r2.out rrdp-r2.out 106 107 ./test-rrdp -S 9b3f7e31-4979-4f8c-9818-73e4dadc3e6b -N 13755 \ 108 -H 75416a54d1bb47f4f4dec7696bd33f77aa3a4a09a295b7f1a027841af0b50c1b \ 109 -d < ${.CURDIR}/../rrdp/delta.xml 2>&1 | tee rrdp-r3.out 110 cmp ${.CURDIR}/../rrdp/rrdp-r3.out rrdp-r3.out 111 112 ./test-rrdp -S 7e7d2563-5bbb-40b0-8723-6a2e90c85d9e -N 28483 \ 113 -H 2a051bfd199150fe6bcdc777d09e70fe1acdf239fbf98ba378a793685e5adb21 \ 114 -s < ${.CURDIR}/../rrdp/snapshot.xml 2>&1 | tee rrdp-r4.out 115 cmp ${.CURDIR}/../rrdp/rrdp-r4.out rrdp-r4.out 116 117 ./test-rrdp \ 118 -n < ${.CURDIR}/../rrdp/xxe.xml 2>&1 | tee rrdp-r5.out 119 cmp ${.CURDIR}/../rrdp/rrdp-r5.out rrdp-r5.out 120 121 ./test-rrdp \ 122 -n < ${.CURDIR}/../rrdp/billion_lol.xml 2>&1 | tee rrdp-r6.out 123 cmp ${.CURDIR}/../rrdp/rrdp-r6.out rrdp-r6.out 124 125 ./test-rrdp \ 126 -n < ${.CURDIR}/../rrdp/notification_xmlns.xml 2>&1 | tee rrdp-r7.out 127 cmp ${.CURDIR}/../rrdp/rrdp-r7.out rrdp-r7.out 128 @echo OK 129