X-Git-Url: https://pd.if.org/git/?p=newsd;a=blobdiff_plain;f=Makefile;h=7102ea4d19cac11c0aa497201fc9ed2b8ff78af8;hp=2d12af3bdd637e7877ad554c15d8209e95559176;hb=HEAD;hpb=db741b52b4341593e56024f0628685faa9cf7c5f diff --git a/Makefile b/Makefile index 2d12af3..7102ea4 100644 --- a/Makefile +++ b/Makefile @@ -20,8 +20,8 @@ control.ctl: newsdb: -dropdb news createdb -O news -T template0 -E SQL_ASCII news - psql -d news -c 'alter database news set search_path to nntp,public' - psql -d news -c 'alter database news set client_min_messages to warning' + $(PSQL) -c 'alter database news set search_path to nntp,public' + $(PSQL) -c 'alter database news set client_min_messages to warning' preserve: sudo su -c 'psql -1 --set ON_ERROR_STOP=1 -U news -d news -f preserve.sql' news @@ -37,11 +37,25 @@ loadnewsgroups: newsgroups touch $@ testserver: + -test -f newsd.pid && kill `cat newsd.pid` rm -f news.log PERL5LIB=./Net-Server-NNTP/lib ./newsd conf_file=test.conf test: - prove t/*.t + -test -f newsd.pid && kill `cat newsd.pid` + rm -f news.log + PERL5LIB=./Net-Server-NNTP/lib ./newsd conf_file=t/test.conf + sleep 1 + -prove t/*.t + -test -f newsd.pid && kill `cat newsd.pid` + +vtest: + -test -f newsd.pid && kill `cat newsd.pid` + rm -f news.log + PERL5LIB=./Net-Server-NNTP/lib ./newsd conf_file=t/test.conf + sleep 1 + -prove -v t/*.t + -test -f newsd.pid && kill `cat newsd.pid` schema: (echo 'set role news;'; cat schema.sql) | $(PSQL)