Add test harness

pull/2/head
Dave Vasilevsky 15 years ago
parent 9fb824505b
commit 1be1eb743c

2
.gitignore vendored

@ -6,7 +6,7 @@ read
*.tar
*.txz
*.tpz
*.tpxz
*.o
test.out

@ -1,4 +1,5 @@
LDFLAGS = -L./libs -g -Wall
#LDFLAGS = -Llibs -search_paths_first -g -Wall
LDFLAGS = -L/Library/Fink/sl64/lib -search_paths_first -g -Wall
CFLAGS = -I/Library/Fink/sl64/include -g -O0 -std=c99 -Wall
CC = gcc $(CFLAGS) -c -o
@ -17,13 +18,13 @@ pixzlist: pixzlist.o
$(LD) $@ $^ -llzma
pixztar: tar.o util.o index.o encode.o block.o
$(LD) $@ $^ ./libs/libarchive.a -llzma
$(LD) $@ $^ -larchive -llzma
write: write.o
$(LD) $@ $^ ./libs/libarchive.a -llzma
$(LD) $@ $^ -larchive -llzma
read: read.o
$(LD) $@ $^ ./libs/libarchive.a -llzma
$(LD) $@ $^ -larchive -llzma
run: pixz
time ./$< < test.in > test.out

@ -0,0 +1,24 @@
#!/bin/sh
#base=lmnopuz
#file=lmnopuz/CheckPUZ.app/Contents/Resources/script
#base=nicotine
#file=nicotine/museek+-0.1.13/doc/SConscript
base=simbl
file=Users/vasi/Desktop/SIMBL/keywurl/SIMBL.pkg/Contents/Info.plist
echo XZ
time xz -c < $base.tar > $base.txz
time xz -cd < $base.txz | tar xO $file | md5sum
echo; echo; echo PIXZ
time ./write $base.tar $base.tpxz
time ./read $base.tpxz $file | tar xO $file | md5sum
echo; echo; echo CROSS
xz -cd < $base.tpxz | tar xO $file | md5sum
echo; echo
du -sh $base.tar $base.tpxz $base.txz
Loading…
Cancel
Save