Makefile: test
This commit is contained in:
parent
bdb4a6b1f7
commit
fbfae1eccd
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -3,3 +3,4 @@
|
||||||
*.xz
|
*.xz
|
||||||
*.lzma
|
*.lzma
|
||||||
*.bz2
|
*.bz2
|
||||||
|
testdir
|
||||||
|
|
17
Makefile
17
Makefile
|
@ -10,3 +10,20 @@ logmanager.tar: logmanager logarchiver logcompressor logcleaner Makefile
|
||||||
xz -c < $< > $@
|
xz -c < $< > $@
|
||||||
%.tar.bz2: %.tar
|
%.tar.bz2: %.tar
|
||||||
bzip2 -c < $< > $@
|
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
|
||||||
|
|
Loading…
Reference in a new issue