#!/bin/sh
export CARGO_MANIFEST_DIR="$(cd "$(dirname "$0")" && pwd)"
cd $CARGO_MANIFEST_DIR

ln -sf `which rsvg-convert` ./rsvg-convert

./api_test/bin/api

if [ $? = 0 ]; then
  echo PASS: /usr/lib/librsvg/ptest/api_test/bin/api
  rc=0
else
  echo FAIL: /usr/lib/librsvg/ptest/api_test/bin/api
  rc=1
fi

# rust tests are appended here by ptest-cargo class

echo ""
echo "## starting to run rust tests ##"
if [ -z "$rc" ]; then rc=0; fi
if ! /usr/lib/librsvg/ptest/api-027012f7b4281a52 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/api-027012f7b4281a52"
else
    echo "PASS: /usr/lib/librsvg/ptest/api-027012f7b4281a52"
fi
if ! /usr/lib/librsvg/ptest/bugs-09519f74196b3236 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/bugs-09519f74196b3236"
else
    echo "PASS: /usr/lib/librsvg/ptest/bugs-09519f74196b3236"
fi
if ! /usr/lib/librsvg/ptest/errors-e0cf3d7c0c4efbb7 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/errors-e0cf3d7c0c4efbb7"
else
    echo "PASS: /usr/lib/librsvg/ptest/errors-e0cf3d7c0c4efbb7"
fi
if ! /usr/lib/librsvg/ptest/filters-3e4235eb818f2c62 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/filters-3e4235eb818f2c62"
else
    echo "PASS: /usr/lib/librsvg/ptest/filters-3e4235eb818f2c62"
fi
if ! /usr/lib/librsvg/ptest/geometries-7ac570d7b5326c2c 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/geometries-7ac570d7b5326c2c"
else
    echo "PASS: /usr/lib/librsvg/ptest/geometries-7ac570d7b5326c2c"
fi
if ! /usr/lib/librsvg/ptest/intrinsic_dimensions-a45785373bedfb9d 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/intrinsic_dimensions-a45785373bedfb9d"
else
    echo "PASS: /usr/lib/librsvg/ptest/intrinsic_dimensions-a45785373bedfb9d"
fi
if ! /usr/lib/librsvg/ptest/loading_crash-927abe7cc2c0db82 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_crash-927abe7cc2c0db82"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_crash-927abe7cc2c0db82"
fi
if ! /usr/lib/librsvg/ptest/loading_disallowed-3051576355e6670c 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_disallowed-3051576355e6670c"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_disallowed-3051576355e6670c"
fi
if ! /usr/lib/librsvg/ptest/primitive_geometries-6d3be593a9c2ff99 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitive_geometries-6d3be593a9c2ff99"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitive_geometries-6d3be593a9c2ff99"
fi
if ! /usr/lib/librsvg/ptest/primitives-7f5cb524d3c54609 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitives-7f5cb524d3c54609"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitives-7f5cb524d3c54609"
fi
if ! /usr/lib/librsvg/ptest/reference-c0d3ae4aedf56e06 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/reference-c0d3ae4aedf56e06"
else
    echo "PASS: /usr/lib/librsvg/ptest/reference-c0d3ae4aedf56e06"
fi
if ! /usr/lib/librsvg/ptest/render_crash-05169953753a7705 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/render_crash-05169953753a7705"
else
    echo "PASS: /usr/lib/librsvg/ptest/render_crash-05169953753a7705"
fi
if ! /usr/lib/librsvg/ptest/rsvg-9501c80a15d0aafb 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg-9501c80a15d0aafb"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg-9501c80a15d0aafb"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-4399f4fdae71294c 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-4399f4fdae71294c"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-4399f4fdae71294c"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-bcbaa958dd78a893 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-bcbaa958dd78a893"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-bcbaa958dd78a893"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-cf23a6e87e16ac02 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-cf23a6e87e16ac02"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-cf23a6e87e16ac02"
fi
if ! /usr/lib/librsvg/ptest/shapes-fd1fbd6108c51702 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/shapes-fd1fbd6108c51702"
else
    echo "PASS: /usr/lib/librsvg/ptest/shapes-fd1fbd6108c51702"
fi
if ! /usr/lib/librsvg/ptest/text-2491dbd786a18138 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/text-2491dbd786a18138"
else
    echo "PASS: /usr/lib/librsvg/ptest/text-2491dbd786a18138"
fi
exit $rc
