-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·48 lines (45 loc) · 1.02 KB
/
test.sh
File metadata and controls
executable file
·48 lines (45 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash -e
for f in tests_ext/*.in; do
echo $f
echo
echo "#" SparseQMCext:
./sparseqmcext "$f" /tmp/out_sparseqmcext
echo
filename=$(basename $f)
fout=$(dirname $f)/${filename%.*}.out
if [[ -f "$fout" ]]; then
diff /tmp/out_sparseqmcext "$fout"
else
cp /tmp/out_sparseqmcext "$fout"
fi
rm -f /tmp/out_sparseqmcext
echo
echo
done
for f in tests2/*.in tests/*.in; do
echo $f
echo
echo "#" DenseQMC:
./denseqmc "$f" /tmp/out_denseqmc
echo
echo "#" SparseQMC:
./sparseqmc "$f" /tmp/out_sparseqmc
echo
echo "#" SparseQMCext:
./sparseqmc "$f" /tmp/out_sparseqmcext
echo
echo "#" Diff:
sha256sum /tmp/out_denseqmc /tmp/out_sparseqmc /tmp/out_sparseqmcext
diff /tmp/out_denseqmc /tmp/out_sparseqmc || exit -1
diff /tmp/out_denseqmc /tmp/out_sparseqmcext || exit -1
filename=$(basename $f)
fout=$(dirname $f)/${filename%.*}.out
if [[ -f "$fout" ]]; then
diff /tmp/out_denseqmc "$fout"
else
cp /tmp/out_denseqmc "$fout"
fi
rm -f /tmp/out_denseqmc /tmp/out_sparseqmc /tmp/out_sparseqmcext
echo
echo
done