diff options
author | Christian Hesse <mail@eworm.de> | 2013-07-11 12:17:55 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2013-07-11 12:17:55 +0200 |
commit | 82daa91f1c1d80728dfac10aeb86390bd8179ad5 (patch) | |
tree | c5ffc88ae06f1efd2ea1bfcc19074d626853b30c /Makefile | |
parent | 729940e9c3d64ce4cac644ffc034891ea2d8439a (diff) | |
download | cqrlogo-82daa91f1c1d80728dfac10aeb86390bd8179ad5.tar.gz cqrlogo-82daa91f1c1d80728dfac10aeb86390bd8179ad5.tar.zst |
add some more tests
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 81 |
1 files changed, 77 insertions, 4 deletions
@@ -7,6 +7,7 @@ RM := rm ZBARIMG := zbarimg SED := sed GREP := grep +FILE := file CFLAGS += -O2 -Wall -Werror CFLAGS += $(shell pkg-config --cflags --libs libpng) \ $(shell pkg-config --cflags --libs zlib) \ @@ -24,11 +25,83 @@ install: $(INSTALL) -D -m0755 cqrlogo $(DESTDIR)/usr/share/webapps/cqrlogo/cqrlogo check: + $(eval SERVER := www.eworm.de) $(RM) -f check.png - SERVER_NAME=www.eworm.de HTTP_REFERER=http://www.eworm.de/ \ - QUERY_STRING='scale=2&border=1' ./cqrlogo | $(SED) '1,2d' > \ - check.png && $(ZBARIMG) --raw -q check.png | $(GREP) -e \ - '^http://www.eworm.de/$$' + + SERVER_NAME=$(SERVER) HTTP_REFERER=http://$(SERVER)/ \ + ./cqrlogo | $(SED) '1,2d' > check.png + $(FILE) check.png | $(GREP) 'PNG image data' + $(ZBARIMG) --raw -q check.png | $(GREP) -e '^http://$(SERVER)/$$' + + SERVER_NAME=$(SERVER) HTTP_REFERER=http://$(SERVER)/ \ + QUERY_STRING='scale=0' \ + ./cqrlogo | $(SED) '1,2d' > \ + check.png + $(FILE) check.png | $(GREP) 'PNG image data' + $(ZBARIMG) --raw -q check.png | $(GREP) -e '^http://$(SERVER)/$$' + + SERVER_NAME=$(SERVER) HTTP_REFERER=http://$(SERVER)/ \ + QUERY_STRING='scale=4' \ + ./cqrlogo | $(SED) '1,2d' > \ + check.png + $(FILE) check.png | $(GREP) 'PNG image data' + $(ZBARIMG) --raw -q check.png | $(GREP) -e '^http://$(SERVER)/$$' + + SERVER_NAME=$(SERVER) HTTP_REFERER=http://$(SERVER)/ \ + QUERY_STRING='scale=10' \ + ./cqrlogo | $(SED) '1,2d' > \ + check.png + $(FILE) check.png | $(GREP) 'PNG image data' + $(ZBARIMG) --raw -q check.png | $(GREP) -e '^http://$(SERVER)/$$' + + SERVER_NAME=$(SERVER) HTTP_REFERER=http://$(SERVER)/ \ + QUERY_STRING='scale=2&border=0' \ + ./cqrlogo | $(SED) '1,2d' > \ + check.png + $(FILE) check.png | $(GREP) 'PNG image data' + $(ZBARIMG) --raw -q check.png | $(GREP) -e '^http://$(SERVER)/$$' + + SERVER_NAME=$(SERVER) HTTP_REFERER=http://$(SERVER)/ \ + QUERY_STRING='scale=2&border=2' \ + ./cqrlogo | $(SED) '1,2d' > \ + check.png + $(FILE) check.png | $(GREP) 'PNG image data' + $(ZBARIMG) --raw -q check.png | $(GREP) -e '^http://$(SERVER)/$$' + + SERVER_NAME=$(SERVER) HTTP_REFERER=http://$(SERVER)/ \ + QUERY_STRING='scale=2&border=10' \ + ./cqrlogo | $(SED) '1,2d' > \ + check.png + $(FILE) check.png | $(GREP) 'PNG image data' + $(ZBARIMG) --raw -q check.png | $(GREP) -e '^http://$(SERVER)/$$' + + SERVER_NAME=$(SERVER) HTTP_REFERER=http://$(SERVER)/ \ + QUERY_STRING='scale=2&border=10&level=0' \ + ./cqrlogo | $(SED) '1,2d' > \ + check.png + $(FILE) check.png | $(GREP) 'PNG image data' + $(ZBARIMG) --raw -q check.png | $(GREP) -e '^http://$(SERVER)/$$' + + SERVER_NAME=$(SERVER) HTTP_REFERER=http://$(SERVER)/ \ + QUERY_STRING='scale=2&border=10&level=2' \ + ./cqrlogo | $(SED) '1,2d' > \ + check.png + $(FILE) check.png | $(GREP) 'PNG image data' + $(ZBARIMG) --raw -q check.png | $(GREP) -e '^http://$(SERVER)/$$' + + SERVER_NAME=$(SERVER) HTTP_REFERER=http://$(SERVER)/ \ + QUERY_STRING='scale=2&border=10&level=4' \ + ./cqrlogo | $(SED) '1,2d' > \ + check.png + $(FILE) check.png | $(GREP) 'PNG image data' + $(ZBARIMG) --raw -q check.png | $(GREP) -e '^http://$(SERVER)/$$' + + SERVER_NAME=eworm.net HTTP_REFERER=http://$(SERVER)/ \ + ./cqrlogo | $(SED) '1,2d' > \ + check.png + $(FILE) check.png | $(GREP) 'PNG image data' + $(ZBARIMG) --raw -q check.png | \ + $(GREP) -e '^This QR Code has been stolen from eworm.net!$$' clean: $(RM) -f *.o *~ cqrlogo |