diff options
author | Adam Chlipala <adamc@csail.mit.edu> | 2016-09-19 15:43:08 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-19 15:43:08 -0400 |
commit | 51edbe25d082a0db06727b25b9a3739d807ae277 (patch) | |
tree | db8d579c724707c29e0019af8bef45e70c7df4cb /Makefile.am | |
parent | a2af672326e0cf943ba3622ed77be18ac703d3c7 (diff) | |
parent | 0d9b72d8806df969a7a4f3dbf0813eb68c52fae0 (diff) |
Merge pull request #49 from sielenk/master
Add IPv6 support and a new '-A' option to specify an IPv6 adress to bind
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am index 9ab31acd..0b9a5957 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 -s 'http://[::1]:8080/Demo/Hello/main' | diff tests/hello.html -) || (kill `cat $(TESTPID)`; echo "Test 'Hello' failed"; /bin/false); \ + (curl -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. |