#!/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-09f65f7f1b94f01f 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/api-09f65f7f1b94f01f"
else
    echo "PASS: /usr/lib/librsvg/ptest/api-09f65f7f1b94f01f"
fi
if ! /usr/lib/librsvg/ptest/bugs-f2c9e45c1c9d2bd4 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/bugs-f2c9e45c1c9d2bd4"
else
    echo "PASS: /usr/lib/librsvg/ptest/bugs-f2c9e45c1c9d2bd4"
fi
if ! /usr/lib/librsvg/ptest/errors-55820e23618ae9f5 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/errors-55820e23618ae9f5"
else
    echo "PASS: /usr/lib/librsvg/ptest/errors-55820e23618ae9f5"
fi
if ! /usr/lib/librsvg/ptest/filters-1ea536cdc03010d1 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/filters-1ea536cdc03010d1"
else
    echo "PASS: /usr/lib/librsvg/ptest/filters-1ea536cdc03010d1"
fi
if ! /usr/lib/librsvg/ptest/geometries-e689c4542c79a7fd 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/geometries-e689c4542c79a7fd"
else
    echo "PASS: /usr/lib/librsvg/ptest/geometries-e689c4542c79a7fd"
fi
if ! /usr/lib/librsvg/ptest/intrinsic_dimensions-4fa0b24b7f4170ac 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/intrinsic_dimensions-4fa0b24b7f4170ac"
else
    echo "PASS: /usr/lib/librsvg/ptest/intrinsic_dimensions-4fa0b24b7f4170ac"
fi
if ! /usr/lib/librsvg/ptest/loading_crash-89c973029b35ffb4 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_crash-89c973029b35ffb4"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_crash-89c973029b35ffb4"
fi
if ! /usr/lib/librsvg/ptest/loading_disallowed-1d5dfcbdec2e9ad6 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_disallowed-1d5dfcbdec2e9ad6"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_disallowed-1d5dfcbdec2e9ad6"
fi
if ! /usr/lib/librsvg/ptest/primitive_geometries-ab5f97815495167e 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitive_geometries-ab5f97815495167e"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitive_geometries-ab5f97815495167e"
fi
if ! /usr/lib/librsvg/ptest/primitives-aa837a1e856706ac 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitives-aa837a1e856706ac"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitives-aa837a1e856706ac"
fi
if ! /usr/lib/librsvg/ptest/reference-2003f0dd24ccb982 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/reference-2003f0dd24ccb982"
else
    echo "PASS: /usr/lib/librsvg/ptest/reference-2003f0dd24ccb982"
fi
if ! /usr/lib/librsvg/ptest/render_crash-aa6600da6cc9c5e5 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/render_crash-aa6600da6cc9c5e5"
else
    echo "PASS: /usr/lib/librsvg/ptest/render_crash-aa6600da6cc9c5e5"
fi
if ! /usr/lib/librsvg/ptest/rsvg-c98cbc749141d959 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg-c98cbc749141d959"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg-c98cbc749141d959"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-153acb6896a76ad8 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-153acb6896a76ad8"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-153acb6896a76ad8"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-40dee5d129ddd9d7 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-40dee5d129ddd9d7"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-40dee5d129ddd9d7"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-d42ce767869843d1 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-d42ce767869843d1"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-d42ce767869843d1"
fi
if ! /usr/lib/librsvg/ptest/shapes-f1906f96cbb97d2d 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/shapes-f1906f96cbb97d2d"
else
    echo "PASS: /usr/lib/librsvg/ptest/shapes-f1906f96cbb97d2d"
fi
if ! /usr/lib/librsvg/ptest/text-7d0663f836fc91b5 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/text-7d0663f836fc91b5"
else
    echo "PASS: /usr/lib/librsvg/ptest/text-7d0663f836fc91b5"
fi
exit $rc
