#!/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-34d253a09f71837e 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/api-34d253a09f71837e"
else
    echo "PASS: /usr/lib/librsvg/ptest/api-34d253a09f71837e"
fi
if ! /usr/lib/librsvg/ptest/bugs-af0fae61be1e4422 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/bugs-af0fae61be1e4422"
else
    echo "PASS: /usr/lib/librsvg/ptest/bugs-af0fae61be1e4422"
fi
if ! /usr/lib/librsvg/ptest/errors-72ba768b45577a31 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/errors-72ba768b45577a31"
else
    echo "PASS: /usr/lib/librsvg/ptest/errors-72ba768b45577a31"
fi
if ! /usr/lib/librsvg/ptest/filters-fb41f21b522787ea 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/filters-fb41f21b522787ea"
else
    echo "PASS: /usr/lib/librsvg/ptest/filters-fb41f21b522787ea"
fi
if ! /usr/lib/librsvg/ptest/geometries-7942ba907d508e65 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/geometries-7942ba907d508e65"
else
    echo "PASS: /usr/lib/librsvg/ptest/geometries-7942ba907d508e65"
fi
if ! /usr/lib/librsvg/ptest/intrinsic_dimensions-84cf4c71373a92df 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/intrinsic_dimensions-84cf4c71373a92df"
else
    echo "PASS: /usr/lib/librsvg/ptest/intrinsic_dimensions-84cf4c71373a92df"
fi
if ! /usr/lib/librsvg/ptest/loading_crash-f3d13fbf281c464d 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_crash-f3d13fbf281c464d"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_crash-f3d13fbf281c464d"
fi
if ! /usr/lib/librsvg/ptest/loading_disallowed-c709c6b8a4f1a2e4 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_disallowed-c709c6b8a4f1a2e4"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_disallowed-c709c6b8a4f1a2e4"
fi
if ! /usr/lib/librsvg/ptest/primitive_geometries-4fd362db03275362 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitive_geometries-4fd362db03275362"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitive_geometries-4fd362db03275362"
fi
if ! /usr/lib/librsvg/ptest/primitives-98cd52b1036b49bd 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitives-98cd52b1036b49bd"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitives-98cd52b1036b49bd"
fi
if ! /usr/lib/librsvg/ptest/reference-03015e61d652e7af 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/reference-03015e61d652e7af"
else
    echo "PASS: /usr/lib/librsvg/ptest/reference-03015e61d652e7af"
fi
if ! /usr/lib/librsvg/ptest/render_crash-50ed012c8c8f8f02 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/render_crash-50ed012c8c8f8f02"
else
    echo "PASS: /usr/lib/librsvg/ptest/render_crash-50ed012c8c8f8f02"
fi
if ! /usr/lib/librsvg/ptest/rsvg-dce1659706aa523e 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg-dce1659706aa523e"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg-dce1659706aa523e"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-5a1980a594bb5efc 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-5a1980a594bb5efc"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-5a1980a594bb5efc"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-e7aea6907fac61ec 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-e7aea6907fac61ec"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-e7aea6907fac61ec"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-f8daf3f6d11c27ea 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-f8daf3f6d11c27ea"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-f8daf3f6d11c27ea"
fi
if ! /usr/lib/librsvg/ptest/shapes-75865d09bf18232f 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/shapes-75865d09bf18232f"
else
    echo "PASS: /usr/lib/librsvg/ptest/shapes-75865d09bf18232f"
fi
if ! /usr/lib/librsvg/ptest/text-6347f144ccba07ff 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/text-6347f144ccba07ff"
else
    echo "PASS: /usr/lib/librsvg/ptest/text-6347f144ccba07ff"
fi
exit $rc
