Makefile: test

This commit is contained in:
Denis Knauf 2012-07-11 13:33:59 +02:00
parent bdb4a6b1f7
commit fbfae1eccd
2 changed files with 18 additions and 0 deletions

1
.gitignore vendored
View file

@ -3,3 +3,4 @@
*.xz
*.lzma
*.bz2
testdir

View file

@ -10,3 +10,20 @@ logmanager.tar: logmanager logarchiver logcompressor logcleaner Makefile
xz -c < $< > $@
%.tar.bz2: %.tar
bzip2 -c < $< > $@
testdir:
mkdir $@
testdir/.lmtab: testdir
echo $</ \*.log 60 > $@.tmp
mv $@.tmp $@
testdir/.prepare: testdir testdir/.lmtab
for f in `seq 1 10` ; do touch $</logfile$$f.log || exit 1 ; done
touch $</no_log
touch $</no.log.txt
touch $@
test: testdir/.prepare testdir/.lmtab
./logmanager -nc testdir/.lmtab
./logmanager -Nc testdir/.lmtab