diff options
author | Sven Gothel <[email protected]> | 2022-05-30 16:12:55 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2022-05-30 16:12:55 +0200 |
commit | 16e9b421558144000c10fd9e4df36374a6765f22 (patch) | |
tree | 89a61856ea1b747571954c743a5d2ac25056afa3 /scripts | |
parent | 729eca31a10cc92be68381df779ccdc9db086a21 (diff) |
Fix test scripts
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/run_cipherpack.sh | 10 | ||||
-rwxr-xr-x | scripts/run_native_test.sh | 3 | ||||
-rw-r--r-- | scripts/test_data_pack.sh | 18 | ||||
-rw-r--r-- | scripts/test_data_unpack.sh | 16 |
4 files changed, 33 insertions, 14 deletions
diff --git a/scripts/run_cipherpack.sh b/scripts/run_cipherpack.sh index 8bcc728..a0c29c6 100755 --- a/scripts/run_cipherpack.sh +++ b/scripts/run_cipherpack.sh @@ -1,12 +1,12 @@ #!/bin/sh -# export elevator_debug=true -export elevator_verbose=true +# export cipherpack_debug=true +export cipherpack_verbose=true # # ../scripts/run-cipherpack.sh some_plaintext_file.bin # -if [ ! -e bin/cipherpack -o ! -e lib/libelevator.so ] ; then +if [ ! -e bin/cipherpack -o ! -e lib/libcipherpack.so ] ; then echo run from dist directory exit 1 fi @@ -19,8 +19,8 @@ export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8 echo COMMANDLINE $0 $* -echo elevator_debug $elevator_debug -echo elevator_verbose $elevator_verbose +echo cipherpack_debug $cipherpack_debug +echo cipherpack_verbose $cipherpack_verbose #LD_LIBRARY_PATH=`pwd`/lib strace bin/cipherpack $* LD_LIBRARY_PATH=`pwd`/lib bin/cipherpack $* diff --git a/scripts/run_native_test.sh b/scripts/run_native_test.sh index 6414410..865c7d8 100755 --- a/scripts/run_native_test.sh +++ b/scripts/run_native_test.sh @@ -43,6 +43,8 @@ do_test() { echo elevator_debug $elevator_debug echo elevator_verbose $elevator_verbose echo logfile $logfile + echo test_exe ${test_exe} + echo test_basename ${test_basename} test_dir=`dirname $test_exe` echo "cd ${test_dir}" @@ -51,6 +53,7 @@ do_test() { ulimit -c unlimited $EXE_WRAPPER ./${test_basename} ${*@Q} + #$EXE_WRAPPER ${test_exe} ${*@Q} exit $? } diff --git a/scripts/test_data_pack.sh b/scripts/test_data_pack.sh index e4da738..f48a0da 100644 --- a/scripts/test_data_pack.sh +++ b/scripts/test_data_pack.sh @@ -1,5 +1,8 @@ #!/bin/sh +# export cipherpack_debug=true +export cipherpack_verbose=true + script_args="$@" sdir=`dirname $(readlink -f $0)` rootdir=`dirname $sdir` @@ -17,17 +20,28 @@ if [ ! -e ${dist_dir} ] ; then fi cd ${dist_dir} -if [ ! -e bin/cipherpack -o ! -e lib/libelevator.so ] ; then +if [ ! -e bin/cipherpack -o ! -e lib/libcipherpack.so ] ; then echo build incomplete exit 1 fi +ulimit -c unlimited + +# run as root 'dpkg-reconfigure locales' enable 'en_US.UTF-8' +# perhaps run as root 'update-locale LC_MEASUREMENT=en_US.UTF-8 LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8' +export LC_MEASUREMENT=en_US.UTF-8 +export LC_ALL=en_US.UTF-8 +export LANG=en_US.UTF-8 do_test() { echo logfile $logfile + echo COMMANDLINE $0 $* + echo cipherpack_debug $cipherpack_debug + echo cipherpack_verbose $cipherpack_verbose #for i in ../test_data_local/data-10kiB.bin ../test_data_local/data-64kB.bin ../test_data_local/data-382MB.mkv ../test_data_local/data-1GB.mkv ; do for i in ../test_data_local/*.bin ; do - ../scripts/run_cipherpack.sh pack -epk ../test_keys/terminal_rsa1.pub.pem -epk ../test_keys/terminal_rsa2.pub.pem -epk ../test_keys/terminal_rsa3.pub.pem \ + LD_LIBRARY_PATH=`pwd`/lib bin/cipherpack pack \ + -epk ../test_keys/terminal_rsa1.pub.pem -epk ../test_keys/terminal_rsa2.pub.pem -epk ../test_keys/terminal_rsa3.pub.pem \ -ssk ../test_keys/host_rsa1 -in $i -target_path $i -version 201 -version_parent 200 -out $i.enc done } diff --git a/scripts/test_data_unpack.sh b/scripts/test_data_unpack.sh index e79e7ba..7a1ecb7 100644 --- a/scripts/test_data_unpack.sh +++ b/scripts/test_data_unpack.sh @@ -1,9 +1,10 @@ #!/bin/sh -# export elevator_debug=true -export elevator_verbose=true +# export cipherpack_debug=true +export cipherpack_verbose=true USE_HTTPD=1 +#USE_HTTPD=0 script_args="$@" sdir=`dirname $(readlink -f $0)` @@ -24,7 +25,7 @@ if [ ! -e ${dist_dir} ] ; then fi cd ${dist_dir} -if [ ! -e bin/cipherpack -o ! -e lib/libelevator.so ] ; then +if [ ! -e bin/cipherpack -o ! -e lib/libcipherpack.so ] ; then echo build incomplete exit 1 fi @@ -46,13 +47,14 @@ ulimit -c unlimited do_test() { echo logfile $logfile echo logfile $logfile_httpd - echo elevator_debug $elevator_debug - echo elevator_verbose $elevator_verbose + echo cipherpack_debug $cipherpack_debug + echo cipherpack_verbose $cipherpack_verbose #for i in ../test_data_local/data-10kiB.bin ../test_data_local/data-64kB.bin ../test_data_local/data-382MB.mkv ../test_data_local/data-1GB.mkv ; do - #for i in ../test_data_local/*.bin.enc ; do #for i in ../test_data_local/data-10kiB.bin.enc ; do - for i in ../test_data_local/data-1GB.bin.enc ../test_data_local/data-2GB.bin.enc ; do + #for i in ../test_data_local/data-1GB.bin.enc ../test_data_local/data-2GB.bin.enc ; do + #for i in ../test_data_local/*.bin.enc ; do + for i in ../test_data_local/data-2GB.bin.enc ; do bname_file=`basename $i` if [ $USE_HTTPD -eq 1 ] ; then in_name="http://localhost:8080/test_data_local/${bname_file}" |