1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
#!/bin/sh
precompile()
{
cd ..
cd ../signal
icmbuild
cd ../processdata
icmbuild
cd ../process
icmbuild
cd driver
}
compile()
{
precompile
echo compiling $1.cc $2
g++ `cat ../../c++std` -o $1 $2 $1.cc \
-L../tmp -lprocess \
-L../../processdata/tmp -lprocessdata \
-L../../signal/tmp -lsignal \
-lbobcat -s
}
case $1 in
(pipe|gpg|sha1sum|limit|ls)
compile $1
;;
(sort|thread)
compile $1 -pthread
;;
(all)
compile cincoutcerr
compile $1 -pthread
;;
(clean)
rm -f pipe gpg sort sha1sum thread limit ls all cincoutcerr
rm -rf ../tmp ../../*/tmp
;;
(*)
echo "
Provide the name of the test as first argument. The executable receives the
name of the test. The test-name plus .cc extension is the name of the test
program source file.
Available tests are:
all - stdin is split over stdout and stderr using multi-threading
gpg - stdin is a PGP encrypted file, stdout is the decrypted file,
stderr shows the result of the signature verification
limit - limits process time to 5 seconds, while copying stdin to stdout
using /bin/cat
ls - show directory contents: no input, only std output
pipe - stdin is passed through 3 /bin/cat programs, and is then
written to stdout
sha1sum - compute the input's sha1sum not using multi-threading
sort - multi threading is used when sorting stdin to stdout, where
sort's output is extracted from the Process object
thread - compute the input's sha1sum using multi-threading
clean - not a test, but removes the test binaries
"
;;
esac
|