avoid spurious deletion of slashing test vectors (#12)
Slashing tests tarball and output is deleted by unpack script even when it didn't change. Hardened the logic to avoid that.
This commit is contained in:
parent
fee2e3d12d
commit
186d992345
|
@ -74,7 +74,7 @@ done
|
|||
# delete tarballs and unpacked data from old versions
|
||||
for tpath in tarballs/slashing-*; do
|
||||
tdir="$(basename "$tpath")"
|
||||
if [[ ! " ${VERSIONS[@]} " =~ " $tdir " ]]; then
|
||||
if [[ ! " slashing-${VERSIONS[@]} " =~ " $tdir " ]]; then
|
||||
rm -rf "$tpath"
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -75,12 +75,18 @@ done
|
|||
|
||||
# delete tarballs and unpacked data from old versions
|
||||
for tpath in tarballs/*; do
|
||||
if [[ "$tpath" == "tarballs/slashing-"* ]]; then
|
||||
continue # avoid interfering with slashing interchange tests
|
||||
fi
|
||||
tdir="$(basename "$tpath")"
|
||||
if [[ ! " ${VERSIONS[@]} " =~ " $tdir " ]]; then
|
||||
rm -rf "$tpath"
|
||||
fi
|
||||
done
|
||||
for tpath in tests-*; do
|
||||
if [[ "$tpath" == "tests-slashing-"* ]]; then
|
||||
continue # avoid interfering with slashing interchange tests
|
||||
fi
|
||||
tver="$(echo "$tpath" | sed -e's/^tests-//')"
|
||||
if [[ ! " ${VERSIONS[@]} " =~ " $tver " ]]; then
|
||||
rm -rf "$tpath"
|
||||
|
|
Loading…
Reference in New Issue