#!/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-caf0670888e44776 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/api-caf0670888e44776"
else
    echo "PASS: /usr/lib/librsvg/ptest/api-caf0670888e44776"
fi
if ! /usr/lib/librsvg/ptest/bugs-8607fcf582bf0403 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/bugs-8607fcf582bf0403"
else
    echo "PASS: /usr/lib/librsvg/ptest/bugs-8607fcf582bf0403"
fi
if ! /usr/lib/librsvg/ptest/errors-d52bd462d5133f37 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/errors-d52bd462d5133f37"
else
    echo "PASS: /usr/lib/librsvg/ptest/errors-d52bd462d5133f37"
fi
if ! /usr/lib/librsvg/ptest/filters-950e28964c38b154 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/filters-950e28964c38b154"
else
    echo "PASS: /usr/lib/librsvg/ptest/filters-950e28964c38b154"
fi
if ! /usr/lib/librsvg/ptest/geometries-12d5f17c229481a6 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/geometries-12d5f17c229481a6"
else
    echo "PASS: /usr/lib/librsvg/ptest/geometries-12d5f17c229481a6"
fi
if ! /usr/lib/librsvg/ptest/intrinsic_dimensions-2a8ce607c9ef7532 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/intrinsic_dimensions-2a8ce607c9ef7532"
else
    echo "PASS: /usr/lib/librsvg/ptest/intrinsic_dimensions-2a8ce607c9ef7532"
fi
if ! /usr/lib/librsvg/ptest/loading_crash-64526dde1825b5c1 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_crash-64526dde1825b5c1"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_crash-64526dde1825b5c1"
fi
if ! /usr/lib/librsvg/ptest/loading_disallowed-ff0cedcab15a7c2d 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_disallowed-ff0cedcab15a7c2d"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_disallowed-ff0cedcab15a7c2d"
fi
if ! /usr/lib/librsvg/ptest/primitive_geometries-9d4cd3ea122045dd 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitive_geometries-9d4cd3ea122045dd"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitive_geometries-9d4cd3ea122045dd"
fi
if ! /usr/lib/librsvg/ptest/primitives-19210a6dd01205cd 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitives-19210a6dd01205cd"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitives-19210a6dd01205cd"
fi
if ! /usr/lib/librsvg/ptest/reference-3c7e3d33268ce45b 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/reference-3c7e3d33268ce45b"
else
    echo "PASS: /usr/lib/librsvg/ptest/reference-3c7e3d33268ce45b"
fi
if ! /usr/lib/librsvg/ptest/render_crash-67842aa3aace519b 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/render_crash-67842aa3aace519b"
else
    echo "PASS: /usr/lib/librsvg/ptest/render_crash-67842aa3aace519b"
fi
if ! /usr/lib/librsvg/ptest/rsvg-0017ff1b0413c378 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg-0017ff1b0413c378"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg-0017ff1b0413c378"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-0ab719f636d5b234 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-0ab719f636d5b234"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-0ab719f636d5b234"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-3431301c8adda5b7 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-3431301c8adda5b7"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-3431301c8adda5b7"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-b362ed721ba87ba6 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-b362ed721ba87ba6"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-b362ed721ba87ba6"
fi
if ! /usr/lib/librsvg/ptest/shapes-a52aae903bc40154 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/shapes-a52aae903bc40154"
else
    echo "PASS: /usr/lib/librsvg/ptest/shapes-a52aae903bc40154"
fi
if ! /usr/lib/librsvg/ptest/text-c6286eec476f0fb7 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/text-c6286eec476f0fb7"
else
    echo "PASS: /usr/lib/librsvg/ptest/text-c6286eec476f0fb7"
fi
exit $rc
