summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbaren@mit.edu>2016-10-23 14:26:59 -0400
committerGravatar Benjamin Barenblat <bbaren@mit.edu>2016-10-23 14:26:59 -0400
commit235602373c04aa38b7f8c93e6efbd9276ecc2266 (patch)
tree97c39e67902dd84d088ab930d8675e90760a674a /Makefile.am
parentc921d0df325c803fed8c7742eb088cb3d030d541 (diff)
parent20f3308b8c2a5a331239839e222bd21befde73eb (diff)
Merge branch 'upstream' into dfsg_clean20161022+dfsg
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am15
1 files changed, 14 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 9ab31acd..83a08171 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -116,9 +116,22 @@ test:
bin/urweb -boot -noEmacs -dbms sqlite -db $(TESTDB) -demo /Demo demo
rm -f $(TESTDB)
sqlite3 $(TESTDB) < demo/demo.sql
- demo/demo.exe & echo $$! > $(TESTPID)
+ demo/demo.exe -a 127.0.0.1 & echo $$! > $(TESTPID)
sleep 1
(curl -s 'http://localhost:8080/Demo/Hello/main' | diff tests/hello.html -) || (kill `cat $(TESTPID)`; echo "Test 'Hello' failed"; /bin/false)
(curl -s 'http://localhost:8080/Demo/Crud1/create?A=1&B=2&C=3&D=4' | diff tests/crud1.html -) || (kill `cat $(TESTPID)`; echo "Test 'Crud1' failed"; /bin/false)
kill `cat $(TESTPID)`
+ if (ifconfig lo | grep -q inet6); \
+ then \
+ echo "Running IPv6 tests."; \
+ rm -f $(TESTDB); \
+ sqlite3 $(TESTDB) < demo/demo.sql; \
+ demo/demo.exe -A ::1 & echo $$! > $(TESTPID); \
+ sleep 1; \
+ (curl -g -6 -s 'http://[::1]:8080/Demo/Hello/main' | diff tests/hello.html -) || (kill `cat $(TESTPID)`; echo "Test 'Hello' failed"; /bin/false); \
+ (curl -g -6 -s 'http://[::1]:8080/Demo/Crud1/create?A=1&B=2&C=3&D=4' | diff tests/crud1.html -) || (kill `cat $(TESTPID)`; echo "Test 'Crud1' failed"; /bin/false); \
+ kill `cat $(TESTPID)`; \
+ else \
+ echo "Skipped IPv6 tests."; \
+ fi
echo Tests succeeded.