summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorGravatar Marvin Sielenkemper <sielenk@gmx.de>2016-09-17 09:33:39 +0200
committerGravatar Marvin Sielenkemper <sielenk@gmx.de>2016-09-17 09:33:39 +0200
commit6bd95b0236f8142181aae369c93e00d15bb3c83f (patch)
tree76c21d0c1526bbe3496987bfc9450747e7437505 /Makefile.am
parent10baddb6ee0fcd645ef0da096ef1dd5b6d4e09a4 (diff)
Check if the loopback interface has an IPv6 address and only run IPv6 test tests if this is the case
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am20
1 files changed, 13 insertions, 7 deletions
diff --git a/Makefile.am b/Makefile.am
index 3eb0a377..0b9a5957 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -121,11 +121,17 @@ test:
(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)`
- 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)`
+ 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.