#!/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-02ac8281ea1f860e 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/api-02ac8281ea1f860e"
else
    echo "PASS: /usr/lib/librsvg/ptest/api-02ac8281ea1f860e"
fi
if ! /usr/lib/librsvg/ptest/bugs-d2433d096e2c6cf2 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/bugs-d2433d096e2c6cf2"
else
    echo "PASS: /usr/lib/librsvg/ptest/bugs-d2433d096e2c6cf2"
fi
if ! /usr/lib/librsvg/ptest/errors-8ec8a37439689ba8 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/errors-8ec8a37439689ba8"
else
    echo "PASS: /usr/lib/librsvg/ptest/errors-8ec8a37439689ba8"
fi
if ! /usr/lib/librsvg/ptest/filters-25e94fd362e2b2bc 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/filters-25e94fd362e2b2bc"
else
    echo "PASS: /usr/lib/librsvg/ptest/filters-25e94fd362e2b2bc"
fi
if ! /usr/lib/librsvg/ptest/geometries-4e6d6cd99f70eae3 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/geometries-4e6d6cd99f70eae3"
else
    echo "PASS: /usr/lib/librsvg/ptest/geometries-4e6d6cd99f70eae3"
fi
if ! /usr/lib/librsvg/ptest/intrinsic_dimensions-915ba9599e684eb3 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/intrinsic_dimensions-915ba9599e684eb3"
else
    echo "PASS: /usr/lib/librsvg/ptest/intrinsic_dimensions-915ba9599e684eb3"
fi
if ! /usr/lib/librsvg/ptest/loading_crash-6bcbd7281960c799 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_crash-6bcbd7281960c799"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_crash-6bcbd7281960c799"
fi
if ! /usr/lib/librsvg/ptest/loading_disallowed-d27ce26953a0fe1c 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_disallowed-d27ce26953a0fe1c"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_disallowed-d27ce26953a0fe1c"
fi
if ! /usr/lib/librsvg/ptest/primitive_geometries-d2e4c16c66aad148 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitive_geometries-d2e4c16c66aad148"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitive_geometries-d2e4c16c66aad148"
fi
if ! /usr/lib/librsvg/ptest/primitives-321824a811b33e27 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitives-321824a811b33e27"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitives-321824a811b33e27"
fi
if ! /usr/lib/librsvg/ptest/reference-4d57cbbaabb1c36f 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/reference-4d57cbbaabb1c36f"
else
    echo "PASS: /usr/lib/librsvg/ptest/reference-4d57cbbaabb1c36f"
fi
if ! /usr/lib/librsvg/ptest/render_crash-fc98d04087fee782 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/render_crash-fc98d04087fee782"
else
    echo "PASS: /usr/lib/librsvg/ptest/render_crash-fc98d04087fee782"
fi
if ! /usr/lib/librsvg/ptest/rsvg-b95e62f855046362 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg-b95e62f855046362"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg-b95e62f855046362"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-14ed67943626cde9 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-14ed67943626cde9"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-14ed67943626cde9"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-2905ac08b13dc90b 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-2905ac08b13dc90b"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-2905ac08b13dc90b"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-843f198dde396572 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-843f198dde396572"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-843f198dde396572"
fi
if ! /usr/lib/librsvg/ptest/shapes-91eec05975e611bd 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/shapes-91eec05975e611bd"
else
    echo "PASS: /usr/lib/librsvg/ptest/shapes-91eec05975e611bd"
fi
if ! /usr/lib/librsvg/ptest/text-a4339416b378926a 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/text-a4339416b378926a"
else
    echo "PASS: /usr/lib/librsvg/ptest/text-a4339416b378926a"
fi
exit $rc
