#!/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-2a5490fddccd80f3 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/api-2a5490fddccd80f3"
else
    echo "PASS: /usr/lib/librsvg/ptest/api-2a5490fddccd80f3"
fi
if ! /usr/lib/librsvg/ptest/bugs-4bd3248e83df2ae9 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/bugs-4bd3248e83df2ae9"
else
    echo "PASS: /usr/lib/librsvg/ptest/bugs-4bd3248e83df2ae9"
fi
if ! /usr/lib/librsvg/ptest/errors-ed390ee2157ef38f 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/errors-ed390ee2157ef38f"
else
    echo "PASS: /usr/lib/librsvg/ptest/errors-ed390ee2157ef38f"
fi
if ! /usr/lib/librsvg/ptest/filters-eb4accb8cea080f9 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/filters-eb4accb8cea080f9"
else
    echo "PASS: /usr/lib/librsvg/ptest/filters-eb4accb8cea080f9"
fi
if ! /usr/lib/librsvg/ptest/geometries-3220bb5fe34d88dc 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/geometries-3220bb5fe34d88dc"
else
    echo "PASS: /usr/lib/librsvg/ptest/geometries-3220bb5fe34d88dc"
fi
if ! /usr/lib/librsvg/ptest/intrinsic_dimensions-36bb7e106da72a9b 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/intrinsic_dimensions-36bb7e106da72a9b"
else
    echo "PASS: /usr/lib/librsvg/ptest/intrinsic_dimensions-36bb7e106da72a9b"
fi
if ! /usr/lib/librsvg/ptest/loading_crash-3ee93b3e0cb8c035 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_crash-3ee93b3e0cb8c035"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_crash-3ee93b3e0cb8c035"
fi
if ! /usr/lib/librsvg/ptest/loading_disallowed-47701599248861ee 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_disallowed-47701599248861ee"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_disallowed-47701599248861ee"
fi
if ! /usr/lib/librsvg/ptest/primitive_geometries-7199308664312860 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitive_geometries-7199308664312860"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitive_geometries-7199308664312860"
fi
if ! /usr/lib/librsvg/ptest/primitives-ac800de23b4326d7 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitives-ac800de23b4326d7"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitives-ac800de23b4326d7"
fi
if ! /usr/lib/librsvg/ptest/reference-f4101536872350fb 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/reference-f4101536872350fb"
else
    echo "PASS: /usr/lib/librsvg/ptest/reference-f4101536872350fb"
fi
if ! /usr/lib/librsvg/ptest/render_crash-3a9281503366e680 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/render_crash-3a9281503366e680"
else
    echo "PASS: /usr/lib/librsvg/ptest/render_crash-3a9281503366e680"
fi
if ! /usr/lib/librsvg/ptest/rsvg-19358f36be842345 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg-19358f36be842345"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg-19358f36be842345"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-24d651443ba99690 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-24d651443ba99690"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-24d651443ba99690"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-31deb385d5ef1b05 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-31deb385d5ef1b05"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-31deb385d5ef1b05"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-62c73645421357b0 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-62c73645421357b0"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-62c73645421357b0"
fi
if ! /usr/lib/librsvg/ptest/shapes-4a25fc410c337a32 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/shapes-4a25fc410c337a32"
else
    echo "PASS: /usr/lib/librsvg/ptest/shapes-4a25fc410c337a32"
fi
if ! /usr/lib/librsvg/ptest/text-529abcea98f9f07e 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/text-529abcea98f9f07e"
else
    echo "PASS: /usr/lib/librsvg/ptest/text-529abcea98f9f07e"
fi
exit $rc
