#!/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-9bab63414d87f2ef 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/api-9bab63414d87f2ef"
else
    echo "PASS: /usr/lib/librsvg/ptest/api-9bab63414d87f2ef"
fi
if ! /usr/lib/librsvg/ptest/bugs-c7718bc15ca05361 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/bugs-c7718bc15ca05361"
else
    echo "PASS: /usr/lib/librsvg/ptest/bugs-c7718bc15ca05361"
fi
if ! /usr/lib/librsvg/ptest/errors-f66b4f4527416916 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/errors-f66b4f4527416916"
else
    echo "PASS: /usr/lib/librsvg/ptest/errors-f66b4f4527416916"
fi
if ! /usr/lib/librsvg/ptest/filters-c2b86df0e65f8310 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/filters-c2b86df0e65f8310"
else
    echo "PASS: /usr/lib/librsvg/ptest/filters-c2b86df0e65f8310"
fi
if ! /usr/lib/librsvg/ptest/geometries-fdb22669e69b42f2 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/geometries-fdb22669e69b42f2"
else
    echo "PASS: /usr/lib/librsvg/ptest/geometries-fdb22669e69b42f2"
fi
if ! /usr/lib/librsvg/ptest/intrinsic_dimensions-28a7169a70670a59 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/intrinsic_dimensions-28a7169a70670a59"
else
    echo "PASS: /usr/lib/librsvg/ptest/intrinsic_dimensions-28a7169a70670a59"
fi
if ! /usr/lib/librsvg/ptest/loading_crash-ebfc2eed0db71661 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_crash-ebfc2eed0db71661"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_crash-ebfc2eed0db71661"
fi
if ! /usr/lib/librsvg/ptest/loading_disallowed-f05b33cd4888d0fe 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_disallowed-f05b33cd4888d0fe"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_disallowed-f05b33cd4888d0fe"
fi
if ! /usr/lib/librsvg/ptest/primitive_geometries-27c4dfdb389488ae 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitive_geometries-27c4dfdb389488ae"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitive_geometries-27c4dfdb389488ae"
fi
if ! /usr/lib/librsvg/ptest/primitives-f6e16187af2524f3 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitives-f6e16187af2524f3"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitives-f6e16187af2524f3"
fi
if ! /usr/lib/librsvg/ptest/reference-5f1f735b8e8a6328 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/reference-5f1f735b8e8a6328"
else
    echo "PASS: /usr/lib/librsvg/ptest/reference-5f1f735b8e8a6328"
fi
if ! /usr/lib/librsvg/ptest/render_crash-61f37006c1dc3462 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/render_crash-61f37006c1dc3462"
else
    echo "PASS: /usr/lib/librsvg/ptest/render_crash-61f37006c1dc3462"
fi
if ! /usr/lib/librsvg/ptest/rsvg-162f788796e240a4 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg-162f788796e240a4"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg-162f788796e240a4"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-0052b71b0995d4fb 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-0052b71b0995d4fb"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-0052b71b0995d4fb"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-813108402f0a8599 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-813108402f0a8599"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-813108402f0a8599"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-9015d4ef9e16bf1d 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-9015d4ef9e16bf1d"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-9015d4ef9e16bf1d"
fi
if ! /usr/lib/librsvg/ptest/shapes-934dedbbd92874f8 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/shapes-934dedbbd92874f8"
else
    echo "PASS: /usr/lib/librsvg/ptest/shapes-934dedbbd92874f8"
fi
if ! /usr/lib/librsvg/ptest/text-85534257b6f1ff64 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/text-85534257b6f1ff64"
else
    echo "PASS: /usr/lib/librsvg/ptest/text-85534257b6f1ff64"
fi
exit $rc
