go: pylint tests

pylint:
	./this-pylint --which-2 None --to-pylint looper

tests:
	! ./looper --command 'echo 1; exit 1' --command 'echo 2; exit 2' --command 'echo 3; exit 3' --force-cleanup
	! ./looper --maxtime 1 --command 'sleep 2' --force-cleanup
	./looper --labeled-command 'cmd1:true' --labeled-command 'cmd2:true' --force-cleanup
	! ./looper --labeled-command 'cmd1:true' --labeled-command 'cmd2:false' --force-cleanup
	! ./looper --labeled-command 'cmd1:false' --labeled-command 'cmd2:true' --force-cleanup
	! ./looper --labeled-command 'cmd1:false' --labeled-command 'cmd2:false' --force-cleanup
	./looper --or-statuses --labeled-command 'cmd1:true' --labeled-command 'cmd2:true' --force-cleanup
	./looper --or-statuses --labeled-command 'cmd1:true' --labeled-command 'cmd2:false' --force-cleanup
	./looper --or-statuses --labeled-command 'cmd1:false' --labeled-command 'cmd2:true' --force-cleanup
	! ./looper --or-statuses --labeled-command 'cmd1:false' --labeled-command 'cmd2:false' --force-cleanup
	./looper --labeled-command 'cmd1:exit 20' --labeled-command 'cmd2:exit 10'; [ "$$?" = 20 ]
	./looper --or-statuses --labeled-command 'cmd1:exit 20' --labeled-command 'cmd2:exit 10'; [ "$$?" = 10 ]
	./looper -v -v --max-concurrency 2 --ssh-command 'echo foo' 'localhost zareason2'
	./looper -v -v --max-concurrency 2 --command 'date' --command date --command date --numbered
	./looper -v -v --to-stdout --command date --command hostname --command 'head /etc/services' --to-stdout
	./looper --to-stdout --command './munch /etc/protocols' --command './munch /etc/passwd'
	(echo echo 1; echo echo 2; echo echo 3) > commands-file-1.txt
	./looper -v -v --max-concurrency 2 --commands-file commands-file-1.txt
	rm -f commands-file-1.txt
	(echo echo 1; echo echo 2; echo echo 3; echo '# echo a'; echo echo 4) > commands-file-2.txt
	./looper -v -v --max-concurrency 2 --commands-file commands-file-2.txt
	rm -f commands-file-2.txt
	./seq-test
	@echo All tests passed.

go2:
	./munch /etc/passwd

clean:
	rm -f commands-file-1.txt
	rm -f commands-file-2.txt

install:
	./install-file --file looper --directory /usr/local/bin/.
	./install-file --file bashquote.py --directory /usr/local/lib/.