last perl tests migrated to unittests.sh

This commit is contained in:
Thomas von Dein
2016-10-25 21:33:16 +02:00
parent 2cb91c93e0
commit 9c78f3ad63
11 changed files with 188 additions and 183 deletions

View File

@@ -1,7 +1,8 @@
# -*-sh-*-
#
# This file is part of Pretty Curved Privacy (pcp1).
#
# Copyright (C) 2013 T.Linden.
# Copyright (C) 2013-2016 T.v.Dein.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,31 +23,33 @@
#
# stress tests
confirm = Stress tests will take some time, continue?
pcp = ../src/pcp1
outdir = stresstest
vault = $outdir/stresstestin
pvault = $outdir/stresstestout
numkeys = 100
verbose = 1
confirm=Stress tests will take some time, continue?
pcp=../src/pcp1
outdir =stresstest
vault=$outdir/stresstestin
pvault=$outdir/stresstestout
numkeys=100
verbose=1
<test check-bulk-tests>
prepare = ./genmasskeys.sh $outdir $numkeys $pcp $vault
prepare () {
./genmasskeys.sh $outdir $numkeys $pcp $vault
}
<test check-bulk-generate-keys>
cmd = $pcp -V $vault -l | grep 0x | wc -l
expect = $numkeys
</test>
check_bulk_generate_keys () {
cmd=$pcp -V $vault -l | grep 0x | wc -l
expect=$numkeys
}
<test check-bulk-vault-export-publics>
prepare = ./exportmasspubs.sh $outdir $pcp $vault
cmd = ls -1 $outdir/0x* | wc -l
expect = $numkeys
</test>
check_bulk_vault_export_publics () {
./exportmasspubs.sh $outdir $pcp $vault
cmd="ls -1 $outdir/0x* | wc -l"
expect="$numkeys"
check "$cmd" "$expect" "$input"
}
<test check-bulk-import-publics>
prepare = ./importmasspubs.sh $outdir $pcp $pvault
cmd = $pcp -V $pvault -l | grep 0x | wc -l
expect $numkeys
</test>
</test>
check_bulk_import_publics () {
./importmasspubs.sh $outdir $pcp $pvault
cmd="$pcp -V $pvault -l | grep 0x | wc -l"
expect="$numkeys"
check "$cmd" "$expect" "$input"
}