Commit 16dccd5c authored by Pavel Emelyanov's avatar Pavel Emelyanov

jenkins: Fix CRIT test to skip non-criu images and provide cumulative output

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 2c747325
...@@ -4,25 +4,42 @@ source `dirname $0`/criu-lib.sh ...@@ -4,25 +4,42 @@ source `dirname $0`/criu-lib.sh
prep prep
./test/zdtm.py run --all -f best -x maps04 -x cgroup02 --norst --keep always || fail ./test/zdtm.py run --all -f best -x maps04 -x cgroup02 --norst --keep always || fail
FAIL_LIST=""
images_list=$(find "test/dump/" -name '*.img') images_list=$(find "test/dump/" -name '*.img')
crit="./crit" crit="./crit"
function note()
{
FAIL_LIST="${FAIL_LIST}\n$*"
}
for x in $images_list for x in $images_list
do do
[[ "$(basename $x)" == pages* ]] && continue [[ "$(basename $x)" == pages* ]] && continue
[[ "$(basename $x)" == route* ]] && continue
[[ "$(basename $x)" == ifaddr* ]] && continue
[[ "$(basename $x)" == iptables* ]] && continue
[[ "$(basename $x)" == ip6tables* ]] && continue
[[ "$(basename $x)" == *tar.gz* ]] && continue
echo "Check $x" echo "Check $x"
$crit decode -o "$x"".json" < $x || fail $crit decode -o "$x"".json" < "$x" || note "dec $x"
$crit encode -i "$x"".json" > "$x"".json.img" || fail $crit encode -i "$x"".json" > "${x}.json.img" || note "enc $x"
cmp "$x" "${x}.json.img" || _exit $x cmp "$x" "${x}.json.img" || note "cmp $x"
rm -f "${x}.json.img" rm -f "${x}.json.img"
$crit decode -o "$x"".json" --pretty < $x || fail $crit decode -o "$x"".json" --pretty < "$x" || note "show $x"
$crit encode -i "$x"".json" > "$x"".json.img" || fail $crit encode -i "$x"".json" > "${x}.json.img" || note "enc2 $x"
cmp "$x" "${x}.json.img" || fail cmp "$x" "${x}.json.img" || note "cmp2 $x"
rm -f "${x}.json.img" rm -f "${x}.json.img"
done done
echo "PASS" if [ -z "$FAIL_LIST" ]; then
exit 0 echo "PASS"
exit 0
fi
echo -e "$FAIL_LIST"
echo "FAIL"
exit 1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment