#!/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-e4104ba760fa7340 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/api-e4104ba760fa7340"
else
    echo "PASS: /usr/lib/librsvg/ptest/api-e4104ba760fa7340"
fi
if ! /usr/lib/librsvg/ptest/bugs-8455dcbb1e7d3b55 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/bugs-8455dcbb1e7d3b55"
else
    echo "PASS: /usr/lib/librsvg/ptest/bugs-8455dcbb1e7d3b55"
fi
if ! /usr/lib/librsvg/ptest/errors-67db8e6f19270b2e 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/errors-67db8e6f19270b2e"
else
    echo "PASS: /usr/lib/librsvg/ptest/errors-67db8e6f19270b2e"
fi
if ! /usr/lib/librsvg/ptest/filters-8f9b77b36559907d 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/filters-8f9b77b36559907d"
else
    echo "PASS: /usr/lib/librsvg/ptest/filters-8f9b77b36559907d"
fi
if ! /usr/lib/librsvg/ptest/geometries-4291ede0f49e3b38 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/geometries-4291ede0f49e3b38"
else
    echo "PASS: /usr/lib/librsvg/ptest/geometries-4291ede0f49e3b38"
fi
if ! /usr/lib/librsvg/ptest/intrinsic_dimensions-bbfd8b4de387f891 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/intrinsic_dimensions-bbfd8b4de387f891"
else
    echo "PASS: /usr/lib/librsvg/ptest/intrinsic_dimensions-bbfd8b4de387f891"
fi
if ! /usr/lib/librsvg/ptest/loading_crash-f0fed05b608761fa 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_crash-f0fed05b608761fa"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_crash-f0fed05b608761fa"
fi
if ! /usr/lib/librsvg/ptest/loading_disallowed-9a34563eec6263d8 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_disallowed-9a34563eec6263d8"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_disallowed-9a34563eec6263d8"
fi
if ! /usr/lib/librsvg/ptest/primitive_geometries-eaa72e0dbd942965 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitive_geometries-eaa72e0dbd942965"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitive_geometries-eaa72e0dbd942965"
fi
if ! /usr/lib/librsvg/ptest/primitives-f167173699ab7599 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitives-f167173699ab7599"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitives-f167173699ab7599"
fi
if ! /usr/lib/librsvg/ptest/reference-affbe9295f0492aa 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/reference-affbe9295f0492aa"
else
    echo "PASS: /usr/lib/librsvg/ptest/reference-affbe9295f0492aa"
fi
if ! /usr/lib/librsvg/ptest/render_crash-ed34eabb0f6a23b7 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/render_crash-ed34eabb0f6a23b7"
else
    echo "PASS: /usr/lib/librsvg/ptest/render_crash-ed34eabb0f6a23b7"
fi
if ! /usr/lib/librsvg/ptest/rsvg-a34f834fa8c9f741 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg-a34f834fa8c9f741"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg-a34f834fa8c9f741"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-1765faa6b66535e4 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-1765faa6b66535e4"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-1765faa6b66535e4"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-71ebd41e8f5e32ec 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-71ebd41e8f5e32ec"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-71ebd41e8f5e32ec"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-e2e5aff6e35cb5eb 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-e2e5aff6e35cb5eb"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-e2e5aff6e35cb5eb"
fi
if ! /usr/lib/librsvg/ptest/shapes-289748d8ed0a1dc2 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/shapes-289748d8ed0a1dc2"
else
    echo "PASS: /usr/lib/librsvg/ptest/shapes-289748d8ed0a1dc2"
fi
if ! /usr/lib/librsvg/ptest/text-839faf4054966e32 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/text-839faf4054966e32"
else
    echo "PASS: /usr/lib/librsvg/ptest/text-839faf4054966e32"
fi
exit $rc
