#!/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-e508c099f7a218da 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/api-e508c099f7a218da"
else
    echo "PASS: /usr/lib/librsvg/ptest/api-e508c099f7a218da"
fi
if ! /usr/lib/librsvg/ptest/bugs-958b79abd1fde0fa 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/bugs-958b79abd1fde0fa"
else
    echo "PASS: /usr/lib/librsvg/ptest/bugs-958b79abd1fde0fa"
fi
if ! /usr/lib/librsvg/ptest/errors-f8bd3d36dce2f5db 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/errors-f8bd3d36dce2f5db"
else
    echo "PASS: /usr/lib/librsvg/ptest/errors-f8bd3d36dce2f5db"
fi
if ! /usr/lib/librsvg/ptest/filters-05645d4acfc2026a 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/filters-05645d4acfc2026a"
else
    echo "PASS: /usr/lib/librsvg/ptest/filters-05645d4acfc2026a"
fi
if ! /usr/lib/librsvg/ptest/geometries-e7c31efb0ed2759c 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/geometries-e7c31efb0ed2759c"
else
    echo "PASS: /usr/lib/librsvg/ptest/geometries-e7c31efb0ed2759c"
fi
if ! /usr/lib/librsvg/ptest/intrinsic_dimensions-c9b2ac845b20ce72 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/intrinsic_dimensions-c9b2ac845b20ce72"
else
    echo "PASS: /usr/lib/librsvg/ptest/intrinsic_dimensions-c9b2ac845b20ce72"
fi
if ! /usr/lib/librsvg/ptest/loading_crash-12992d07b5973c37 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_crash-12992d07b5973c37"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_crash-12992d07b5973c37"
fi
if ! /usr/lib/librsvg/ptest/loading_disallowed-672325acd3aacf47 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_disallowed-672325acd3aacf47"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_disallowed-672325acd3aacf47"
fi
if ! /usr/lib/librsvg/ptest/primitive_geometries-2e9bc39c58b87e9a 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitive_geometries-2e9bc39c58b87e9a"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitive_geometries-2e9bc39c58b87e9a"
fi
if ! /usr/lib/librsvg/ptest/primitives-5a867c5b04496b1f 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitives-5a867c5b04496b1f"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitives-5a867c5b04496b1f"
fi
if ! /usr/lib/librsvg/ptest/reference-08c334a63eab0c6b 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/reference-08c334a63eab0c6b"
else
    echo "PASS: /usr/lib/librsvg/ptest/reference-08c334a63eab0c6b"
fi
if ! /usr/lib/librsvg/ptest/render_crash-5ff0a8b245252231 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/render_crash-5ff0a8b245252231"
else
    echo "PASS: /usr/lib/librsvg/ptest/render_crash-5ff0a8b245252231"
fi
if ! /usr/lib/librsvg/ptest/rsvg-b48c18465f56ac99 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg-b48c18465f56ac99"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg-b48c18465f56ac99"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-19037afdb27a82ab 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-19037afdb27a82ab"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-19037afdb27a82ab"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-29777b738b4a4ed7 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-29777b738b4a4ed7"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-29777b738b4a4ed7"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-72089c3f058be3a1 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-72089c3f058be3a1"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-72089c3f058be3a1"
fi
if ! /usr/lib/librsvg/ptest/shapes-dcd7bcb96c96b7c3 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/shapes-dcd7bcb96c96b7c3"
else
    echo "PASS: /usr/lib/librsvg/ptest/shapes-dcd7bcb96c96b7c3"
fi
if ! /usr/lib/librsvg/ptest/text-9a3f8c9a8e62fab3 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/text-9a3f8c9a8e62fab3"
else
    echo "PASS: /usr/lib/librsvg/ptest/text-9a3f8c9a8e62fab3"
fi
exit $rc
