Browse Source
Add a test script that splits a file and immediately attempts to reconstruct it, as a complete test of the whole thing.master
3 changed files with 28 additions and 2 deletions
@ -0,0 +1,23 @@
|
||||
#!/bin/bash |
||||
|
||||
../src/gfsec-split -k -c $$.conf Makefile \ |
||||
file://$PWD/$$.share file://$PWD/$$.share file://$PWD/$$.share |
||||
if [ $? != 0 ]; then |
||||
echo "t-split-restore: gfsec-split failed" >&2 |
||||
exit 1 |
||||
fi |
||||
|
||||
../src/gfsec-use -c $$.conf -k -o $$.rebuilt |
||||
if [ $? != 0 ]; then |
||||
echo "t-split-restore: gfsec-use failed" >&2 |
||||
exit 1 |
||||
fi |
||||
|
||||
if [ "$(md5sum Makefile | cut -d' ' -f1)" != "$(md5sum $$.rebuilt | cut -d' ' -f1)" ]; then |
||||
echo "t-split-restore: Reconstructed file differs from the original file" |
||||
exit 1 |
||||
fi |
||||
|
||||
rm -f $$.* |
||||
|
||||
exit 0 |
Loading…
Reference in new issue