aboutsummaryrefslogtreecommitdiff
path: root/regress/Makefile
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-01-22 16:48:04 +0000
committerOmar Polo <op@omarpolo.com>2021-01-22 16:48:04 +0000
commit5c2e310edececfc9ef67946c1bf7df6bcdbe8931 (patch)
tree21cd8ab64846eb5154b064e3908d80e934a68e01 /regress/Makefile
parentf890c8c54d88b529dc568eaf187b29a5acf6d22d (diff)
brand new regress suite
Diffstat (limited to 'regress/Makefile')
-rw-r--r--regress/Makefile38
1 files changed, 38 insertions, 0 deletions
diff --git a/regress/Makefile b/regress/Makefile
new file mode 100644
index 0000000..67948a4
--- /dev/null
+++ b/regress/Makefile
@@ -0,0 +1,38 @@
+include ../Makefile.local
+
+.PHONY: all clean runtime
+
+all: iri_test runtime
+ ./iri_test
+
+iri_test: iri_test.o ../iri.o ../utf8.o
+ ${CC} iri_test.o ../iri.o ../utf8.o -o iri_test ${LDFLAGS}
+
+key.pem: cert.pem
+
+# XXX: key size is NOT GOOD. This is only for testing. Smaller keys
+# are quicker to generate. DON'T DO THIS AT HOME.
+cert.pem:
+ printf ".\n.\n.\n.\n.\nlocalhost\n.\n" | \
+ openssl req -x509 -newkey rsa:1024 \
+ -keyout key.pem \
+ -out cert.pem \
+ -days 365 -nodes
+ @echo
+
+clean:
+ rm -f *.o iri_test cert.pem key.pem
+ rm -rf testdata
+
+testdata:
+ mkdir testdata
+ ./genbigfile testdata/bigfile
+ ./sha testdata/bigfile testdata/bigfile.sha
+ printf "# hello world\n" > testdata/index.gmi
+ ./sha testdata/index.gmi testdata/index.gmi.sha
+ cp hello slow err testdata/
+ mkdir testdata/dir
+ cp testdata/index.gmi testdata/dir/foo.gmi
+
+runtime: testdata cert.pem
+ ./runtime