#!/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-1b8af49090c4cae4 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/api-1b8af49090c4cae4"
else
    echo "PASS: /usr/lib/librsvg/ptest/api-1b8af49090c4cae4"
fi
if ! /usr/lib/librsvg/ptest/bugs-449895d8e7ab5cf7 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/bugs-449895d8e7ab5cf7"
else
    echo "PASS: /usr/lib/librsvg/ptest/bugs-449895d8e7ab5cf7"
fi
if ! /usr/lib/librsvg/ptest/errors-1e3e67de9ce0064f 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/errors-1e3e67de9ce0064f"
else
    echo "PASS: /usr/lib/librsvg/ptest/errors-1e3e67de9ce0064f"
fi
if ! /usr/lib/librsvg/ptest/filters-59c9b2bba65d4f59 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/filters-59c9b2bba65d4f59"
else
    echo "PASS: /usr/lib/librsvg/ptest/filters-59c9b2bba65d4f59"
fi
if ! /usr/lib/librsvg/ptest/geometries-ef139c241e810ed3 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/geometries-ef139c241e810ed3"
else
    echo "PASS: /usr/lib/librsvg/ptest/geometries-ef139c241e810ed3"
fi
if ! /usr/lib/librsvg/ptest/intrinsic_dimensions-90991cd0e8c98497 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/intrinsic_dimensions-90991cd0e8c98497"
else
    echo "PASS: /usr/lib/librsvg/ptest/intrinsic_dimensions-90991cd0e8c98497"
fi
if ! /usr/lib/librsvg/ptest/loading_crash-73ff78ec5ca40fd8 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_crash-73ff78ec5ca40fd8"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_crash-73ff78ec5ca40fd8"
fi
if ! /usr/lib/librsvg/ptest/loading_disallowed-c4f7b469b20c5182 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_disallowed-c4f7b469b20c5182"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_disallowed-c4f7b469b20c5182"
fi
if ! /usr/lib/librsvg/ptest/primitive_geometries-5a9db2983e868f8f 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitive_geometries-5a9db2983e868f8f"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitive_geometries-5a9db2983e868f8f"
fi
if ! /usr/lib/librsvg/ptest/primitives-511f02ef89085bfe 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitives-511f02ef89085bfe"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitives-511f02ef89085bfe"
fi
if ! /usr/lib/librsvg/ptest/reference-d51e9eb3da842c4c 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/reference-d51e9eb3da842c4c"
else
    echo "PASS: /usr/lib/librsvg/ptest/reference-d51e9eb3da842c4c"
fi
if ! /usr/lib/librsvg/ptest/render_crash-ab8b73a5c9561621 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/render_crash-ab8b73a5c9561621"
else
    echo "PASS: /usr/lib/librsvg/ptest/render_crash-ab8b73a5c9561621"
fi
if ! /usr/lib/librsvg/ptest/rsvg-f27fb716dc80f02b 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg-f27fb716dc80f02b"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg-f27fb716dc80f02b"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-0b57b9191b36b689 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-0b57b9191b36b689"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-0b57b9191b36b689"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-e0abc7923730a6a0 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-e0abc7923730a6a0"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-e0abc7923730a6a0"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-ff1986ba517a3c92 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-ff1986ba517a3c92"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-ff1986ba517a3c92"
fi
if ! /usr/lib/librsvg/ptest/shapes-66009b888cbd2cc9 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/shapes-66009b888cbd2cc9"
else
    echo "PASS: /usr/lib/librsvg/ptest/shapes-66009b888cbd2cc9"
fi
if ! /usr/lib/librsvg/ptest/text-d18704d37674fc7e 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/text-d18704d37674fc7e"
else
    echo "PASS: /usr/lib/librsvg/ptest/text-d18704d37674fc7e"
fi
exit $rc
