#!/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-d13d869ce1554072 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/api-d13d869ce1554072"
else
    echo "PASS: /usr/lib/librsvg/ptest/api-d13d869ce1554072"
fi
if ! /usr/lib/librsvg/ptest/bugs-164faa20d2ade168 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/bugs-164faa20d2ade168"
else
    echo "PASS: /usr/lib/librsvg/ptest/bugs-164faa20d2ade168"
fi
if ! /usr/lib/librsvg/ptest/errors-494859a75616201b 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/errors-494859a75616201b"
else
    echo "PASS: /usr/lib/librsvg/ptest/errors-494859a75616201b"
fi
if ! /usr/lib/librsvg/ptest/filters-c8f5ada5fd1df305 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/filters-c8f5ada5fd1df305"
else
    echo "PASS: /usr/lib/librsvg/ptest/filters-c8f5ada5fd1df305"
fi
if ! /usr/lib/librsvg/ptest/geometries-a81b84d07d2dfa3f 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/geometries-a81b84d07d2dfa3f"
else
    echo "PASS: /usr/lib/librsvg/ptest/geometries-a81b84d07d2dfa3f"
fi
if ! /usr/lib/librsvg/ptest/intrinsic_dimensions-b8421b38ab700679 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/intrinsic_dimensions-b8421b38ab700679"
else
    echo "PASS: /usr/lib/librsvg/ptest/intrinsic_dimensions-b8421b38ab700679"
fi
if ! /usr/lib/librsvg/ptest/loading_crash-1deed65460f0cc4a 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_crash-1deed65460f0cc4a"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_crash-1deed65460f0cc4a"
fi
if ! /usr/lib/librsvg/ptest/loading_disallowed-dc4cdf052d0b11b2 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_disallowed-dc4cdf052d0b11b2"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_disallowed-dc4cdf052d0b11b2"
fi
if ! /usr/lib/librsvg/ptest/primitive_geometries-5230732c66fefeee 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitive_geometries-5230732c66fefeee"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitive_geometries-5230732c66fefeee"
fi
if ! /usr/lib/librsvg/ptest/primitives-ae7632dd1fff630c 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitives-ae7632dd1fff630c"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitives-ae7632dd1fff630c"
fi
if ! /usr/lib/librsvg/ptest/reference-95469ce2143da3b7 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/reference-95469ce2143da3b7"
else
    echo "PASS: /usr/lib/librsvg/ptest/reference-95469ce2143da3b7"
fi
if ! /usr/lib/librsvg/ptest/render_crash-5beebf4759f7e0f1 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/render_crash-5beebf4759f7e0f1"
else
    echo "PASS: /usr/lib/librsvg/ptest/render_crash-5beebf4759f7e0f1"
fi
if ! /usr/lib/librsvg/ptest/rsvg-a24167f6fb94fcc3 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg-a24167f6fb94fcc3"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg-a24167f6fb94fcc3"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-863de064d9879873 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-863de064d9879873"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-863de064d9879873"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-a36d208174458de8 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-a36d208174458de8"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-a36d208174458de8"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-b25032455179da7c 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-b25032455179da7c"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-b25032455179da7c"
fi
if ! /usr/lib/librsvg/ptest/shapes-04796a29a714d52e 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/shapes-04796a29a714d52e"
else
    echo "PASS: /usr/lib/librsvg/ptest/shapes-04796a29a714d52e"
fi
if ! /usr/lib/librsvg/ptest/text-aa0f677df839931c 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/text-aa0f677df839931c"
else
    echo "PASS: /usr/lib/librsvg/ptest/text-aa0f677df839931c"
fi
exit $rc
