#!/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-5668a0a349592a8e 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/api-5668a0a349592a8e"
else
    echo "PASS: /usr/lib/librsvg/ptest/api-5668a0a349592a8e"
fi
if ! /usr/lib/librsvg/ptest/bugs-4741d13ed1600a5d 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/bugs-4741d13ed1600a5d"
else
    echo "PASS: /usr/lib/librsvg/ptest/bugs-4741d13ed1600a5d"
fi
if ! /usr/lib/librsvg/ptest/errors-5e63fa7b9168dc63 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/errors-5e63fa7b9168dc63"
else
    echo "PASS: /usr/lib/librsvg/ptest/errors-5e63fa7b9168dc63"
fi
if ! /usr/lib/librsvg/ptest/filters-64efbfcf3bd98397 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/filters-64efbfcf3bd98397"
else
    echo "PASS: /usr/lib/librsvg/ptest/filters-64efbfcf3bd98397"
fi
if ! /usr/lib/librsvg/ptest/geometries-63ec2afa9f27e356 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/geometries-63ec2afa9f27e356"
else
    echo "PASS: /usr/lib/librsvg/ptest/geometries-63ec2afa9f27e356"
fi
if ! /usr/lib/librsvg/ptest/intrinsic_dimensions-4f62ea8b96d8df46 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/intrinsic_dimensions-4f62ea8b96d8df46"
else
    echo "PASS: /usr/lib/librsvg/ptest/intrinsic_dimensions-4f62ea8b96d8df46"
fi
if ! /usr/lib/librsvg/ptest/loading_crash-6da7271a158d0564 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_crash-6da7271a158d0564"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_crash-6da7271a158d0564"
fi
if ! /usr/lib/librsvg/ptest/loading_disallowed-ecb20a34f2ba9c0b 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_disallowed-ecb20a34f2ba9c0b"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_disallowed-ecb20a34f2ba9c0b"
fi
if ! /usr/lib/librsvg/ptest/primitive_geometries-dbf95febabbe1488 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitive_geometries-dbf95febabbe1488"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitive_geometries-dbf95febabbe1488"
fi
if ! /usr/lib/librsvg/ptest/primitives-fee79b5473c9a1cd 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitives-fee79b5473c9a1cd"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitives-fee79b5473c9a1cd"
fi
if ! /usr/lib/librsvg/ptest/reference-bd365ce7377cc305 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/reference-bd365ce7377cc305"
else
    echo "PASS: /usr/lib/librsvg/ptest/reference-bd365ce7377cc305"
fi
if ! /usr/lib/librsvg/ptest/render_crash-45e5162b3d31f290 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/render_crash-45e5162b3d31f290"
else
    echo "PASS: /usr/lib/librsvg/ptest/render_crash-45e5162b3d31f290"
fi
if ! /usr/lib/librsvg/ptest/rsvg-5fd77b2d8170d903 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg-5fd77b2d8170d903"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg-5fd77b2d8170d903"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-4cf9b2fbb279b830 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-4cf9b2fbb279b830"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-4cf9b2fbb279b830"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-5c53d32bd72d5a8c 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-5c53d32bd72d5a8c"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-5c53d32bd72d5a8c"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-ba2403dfde9d74ab 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-ba2403dfde9d74ab"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-ba2403dfde9d74ab"
fi
if ! /usr/lib/librsvg/ptest/shapes-e980434ee97be058 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/shapes-e980434ee97be058"
else
    echo "PASS: /usr/lib/librsvg/ptest/shapes-e980434ee97be058"
fi
if ! /usr/lib/librsvg/ptest/text-22ad927802acb1aa 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/text-22ad927802acb1aa"
else
    echo "PASS: /usr/lib/librsvg/ptest/text-22ad927802acb1aa"
fi
exit $rc
