lars
108acd0e8a
moved log file reading from cryptobox/core/main to 'log' plugin added unittests for volume_mount, volume_format_fs and volume_rename replace "get help" links with a "help mode" displaying information for every form added first drafts of help texts for volume_mount, volume_format and partition replaced the word 'container' with 'volume' in english texts
41 lines
1,013 B
Bash
Executable file
41 lines
1,013 B
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# run this script _before_ you do a commit and fix errors before uploading
|
|
#
|
|
|
|
BASE_DIR=$(cd "$(dirname $0)/.."; pwd)
|
|
|
|
export PYTHONPATH=$BASE_DIR/src
|
|
|
|
# check if /dev/loop1 is available - otherwise some tests will fail!
|
|
if /sbin/losetup /dev/loop1 &>/dev/null || test -e /dev/ubdb
|
|
then true
|
|
else echo "misconfiguration detected: sorry - you need /dev/loop1 for the tests" >&2
|
|
echo "just do the following:" >&2
|
|
echo " dd if=/dev/zero of=test.img bs=1M count=1 seek=100" >&2
|
|
echo " sudo /sbin/losetup /dev/loop1 test.img" >&2
|
|
echo "then you can run the tests again ..." >&2
|
|
echo >&2
|
|
exit 1
|
|
fi
|
|
|
|
dest_files=""
|
|
while test $# -gt 0
|
|
do files="${files} $(cd $(dirname $1); pwd)/$(basename $1)"
|
|
shift
|
|
done
|
|
|
|
# chdir to 'bin' - all config settings depend on this
|
|
cd "${BASE_DIR}/bin"
|
|
|
|
if test -n "$files"
|
|
then # do the specified tests
|
|
for a in $files
|
|
do testoob -v "$a"
|
|
done
|
|
else # do all tests
|
|
for a in ${BASE_DIR}/src/cryptobox/tests/test.*.py
|
|
do testoob -v "$a"
|
|
done
|
|
fi
|
|
|