mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 13:58:34 +00:00
jenkins: Fix CRIT test to skip non-criu images and provide cumulative output
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
@@ -4,25 +4,42 @@ source `dirname $0`/criu-lib.sh
|
||||
prep
|
||||
./test/zdtm.py run --all -f best -x maps04 -x cgroup02 --norst --keep always || fail
|
||||
|
||||
FAIL_LIST=""
|
||||
images_list=$(find "test/dump/" -name '*.img')
|
||||
crit="./crit"
|
||||
|
||||
function note()
|
||||
{
|
||||
FAIL_LIST="${FAIL_LIST}\n$*"
|
||||
}
|
||||
|
||||
for x in $images_list
|
||||
do
|
||||
[[ "$(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"
|
||||
|
||||
$crit decode -o "$x"".json" < $x || fail
|
||||
$crit encode -i "$x"".json" > "$x"".json.img" || fail
|
||||
cmp "$x" "${x}.json.img" || _exit $x
|
||||
$crit decode -o "$x"".json" < "$x" || note "dec $x"
|
||||
$crit encode -i "$x"".json" > "${x}.json.img" || note "enc $x"
|
||||
cmp "$x" "${x}.json.img" || note "cmp $x"
|
||||
rm -f "${x}.json.img"
|
||||
|
||||
$crit decode -o "$x"".json" --pretty < $x || fail
|
||||
$crit encode -i "$x"".json" > "$x"".json.img" || fail
|
||||
cmp "$x" "${x}.json.img" || fail
|
||||
$crit decode -o "$x"".json" --pretty < "$x" || note "show $x"
|
||||
$crit encode -i "$x"".json" > "${x}.json.img" || note "enc2 $x"
|
||||
cmp "$x" "${x}.json.img" || note "cmp2 $x"
|
||||
rm -f "${x}.json.img"
|
||||
done
|
||||
|
||||
echo "PASS"
|
||||
exit 0
|
||||
if [ -z "$FAIL_LIST" ]; then
|
||||
echo "PASS"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo -e "$FAIL_LIST"
|
||||
echo "FAIL"
|
||||
exit 1
|
||||
|
Reference in New Issue
Block a user