#!/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-7c86a202fd69b340 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/api-7c86a202fd69b340"
else
    echo "PASS: /usr/lib/librsvg/ptest/api-7c86a202fd69b340"
fi
if ! /usr/lib/librsvg/ptest/bugs-bc0e1fc5ce836d5d 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/bugs-bc0e1fc5ce836d5d"
else
    echo "PASS: /usr/lib/librsvg/ptest/bugs-bc0e1fc5ce836d5d"
fi
if ! /usr/lib/librsvg/ptest/errors-3f9e2aef0b089822 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/errors-3f9e2aef0b089822"
else
    echo "PASS: /usr/lib/librsvg/ptest/errors-3f9e2aef0b089822"
fi
if ! /usr/lib/librsvg/ptest/filters-96e29f91ecdba26a 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/filters-96e29f91ecdba26a"
else
    echo "PASS: /usr/lib/librsvg/ptest/filters-96e29f91ecdba26a"
fi
if ! /usr/lib/librsvg/ptest/geometries-f5fceb11aeb48e53 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/geometries-f5fceb11aeb48e53"
else
    echo "PASS: /usr/lib/librsvg/ptest/geometries-f5fceb11aeb48e53"
fi
if ! /usr/lib/librsvg/ptest/intrinsic_dimensions-6c3767f357c59b68 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/intrinsic_dimensions-6c3767f357c59b68"
else
    echo "PASS: /usr/lib/librsvg/ptest/intrinsic_dimensions-6c3767f357c59b68"
fi
if ! /usr/lib/librsvg/ptest/loading_crash-cb0f36cc2a072f93 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_crash-cb0f36cc2a072f93"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_crash-cb0f36cc2a072f93"
fi
if ! /usr/lib/librsvg/ptest/loading_disallowed-b104175e7c740749 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_disallowed-b104175e7c740749"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_disallowed-b104175e7c740749"
fi
if ! /usr/lib/librsvg/ptest/primitive_geometries-5c4d92dd62e766e6 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitive_geometries-5c4d92dd62e766e6"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitive_geometries-5c4d92dd62e766e6"
fi
if ! /usr/lib/librsvg/ptest/primitives-5eee3c33f48d5685 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitives-5eee3c33f48d5685"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitives-5eee3c33f48d5685"
fi
if ! /usr/lib/librsvg/ptest/reference-0dbaf306d8c242fe 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/reference-0dbaf306d8c242fe"
else
    echo "PASS: /usr/lib/librsvg/ptest/reference-0dbaf306d8c242fe"
fi
if ! /usr/lib/librsvg/ptest/render_crash-8ba400762fcb3416 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/render_crash-8ba400762fcb3416"
else
    echo "PASS: /usr/lib/librsvg/ptest/render_crash-8ba400762fcb3416"
fi
if ! /usr/lib/librsvg/ptest/rsvg-a01f417005a77cce 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg-a01f417005a77cce"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg-a01f417005a77cce"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-1f71809107db91c0 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-1f71809107db91c0"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-1f71809107db91c0"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-27be8cd3626035dd 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-27be8cd3626035dd"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-27be8cd3626035dd"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-59da541fa704959e 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-59da541fa704959e"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-59da541fa704959e"
fi
if ! /usr/lib/librsvg/ptest/shapes-5d37c70f0a250b8a 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/shapes-5d37c70f0a250b8a"
else
    echo "PASS: /usr/lib/librsvg/ptest/shapes-5d37c70f0a250b8a"
fi
if ! /usr/lib/librsvg/ptest/text-3f44ea93f884b47c 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/text-3f44ea93f884b47c"
else
    echo "PASS: /usr/lib/librsvg/ptest/text-3f44ea93f884b47c"
fi
exit $rc
