Debian Codegraph @

deps/phc-winner-argon2-20190702/kats/test.sh

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2
3 for opttest in "" "OPTTEST=1"
4 do
5 if [scip-shell system . . `[`. "" = "$opttest" ]
6 then
7 printfscip-shell system . . printf. "Default build\n"
8 else
9 printfscip-shell system . . printf. "Force OPTTEST=1\n"
10 fi
11
12 makescip-shell system . . make. genkat $opttest > /dev/nullscip-shell filesystem . . `/dev/null`.
13 if [scip-shell system . . `[`. $? -ne 0 ]
14 then
15 exit $?
16 fi
17
18 i=0
19 for version in 16 19
20 do
21 for type in i d id
22 do
23 i=$(($i+1))
24
25 printfscip-shell system . . printf. "argon2$type v=$version: "
26
27 if [scip-shell system . . `[`. 19 -eq $version ]
28 then
29 kats="kats/argon2"$type
30 else
31 kats="kats/argon2"$type"_v"$version
32 fi
33
34 ./genkat $type $version > tmp
35 if diffscip-shell system . . diff. tmp $kats
36 then
37 printfscip-shell system . . printf. "OK"
38 else
39 printfscip-shell system . . printf. "ERROR"
40 exit $i
41 fi
42 printfscip-shell system . . printf. "\n"
43 done
44 done
45 done
46
47 rmscip-shell system . . rm. -f tmp
48
49 exit 0