#!/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-7fe32524aed69a44 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/api-7fe32524aed69a44"
else
    echo "PASS: /usr/lib/librsvg/ptest/api-7fe32524aed69a44"
fi
if ! /usr/lib/librsvg/ptest/bugs-fab4d84925fee62f 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/bugs-fab4d84925fee62f"
else
    echo "PASS: /usr/lib/librsvg/ptest/bugs-fab4d84925fee62f"
fi
if ! /usr/lib/librsvg/ptest/errors-fafadf2df4f1b044 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/errors-fafadf2df4f1b044"
else
    echo "PASS: /usr/lib/librsvg/ptest/errors-fafadf2df4f1b044"
fi
if ! /usr/lib/librsvg/ptest/filters-633bc739b1a0f636 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/filters-633bc739b1a0f636"
else
    echo "PASS: /usr/lib/librsvg/ptest/filters-633bc739b1a0f636"
fi
if ! /usr/lib/librsvg/ptest/geometries-1f1dca72a5963dd2 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/geometries-1f1dca72a5963dd2"
else
    echo "PASS: /usr/lib/librsvg/ptest/geometries-1f1dca72a5963dd2"
fi
if ! /usr/lib/librsvg/ptest/intrinsic_dimensions-c2e2e62f0d78149b 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/intrinsic_dimensions-c2e2e62f0d78149b"
else
    echo "PASS: /usr/lib/librsvg/ptest/intrinsic_dimensions-c2e2e62f0d78149b"
fi
if ! /usr/lib/librsvg/ptest/loading_crash-f69fb2f27e2feed2 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_crash-f69fb2f27e2feed2"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_crash-f69fb2f27e2feed2"
fi
if ! /usr/lib/librsvg/ptest/loading_disallowed-0944dffbd529e3c0 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_disallowed-0944dffbd529e3c0"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_disallowed-0944dffbd529e3c0"
fi
if ! /usr/lib/librsvg/ptest/primitive_geometries-bed91520155decf7 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitive_geometries-bed91520155decf7"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitive_geometries-bed91520155decf7"
fi
if ! /usr/lib/librsvg/ptest/primitives-ae4a540252e3a9bb 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitives-ae4a540252e3a9bb"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitives-ae4a540252e3a9bb"
fi
if ! /usr/lib/librsvg/ptest/reference-0fbd55ec6fb7f620 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/reference-0fbd55ec6fb7f620"
else
    echo "PASS: /usr/lib/librsvg/ptest/reference-0fbd55ec6fb7f620"
fi
if ! /usr/lib/librsvg/ptest/render_crash-6b27b91c926ea648 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/render_crash-6b27b91c926ea648"
else
    echo "PASS: /usr/lib/librsvg/ptest/render_crash-6b27b91c926ea648"
fi
if ! /usr/lib/librsvg/ptest/rsvg-4d0551b2f4ba6438 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg-4d0551b2f4ba6438"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg-4d0551b2f4ba6438"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-731bc51ea6ab3a22 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-731bc51ea6ab3a22"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-731bc51ea6ab3a22"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-97916db078be395d 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-97916db078be395d"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-97916db078be395d"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-a76f6ee92f12be52 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-a76f6ee92f12be52"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-a76f6ee92f12be52"
fi
if ! /usr/lib/librsvg/ptest/shapes-7c95f736a26cc96e 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/shapes-7c95f736a26cc96e"
else
    echo "PASS: /usr/lib/librsvg/ptest/shapes-7c95f736a26cc96e"
fi
if ! /usr/lib/librsvg/ptest/text-f4d303fa78bf8368 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/text-f4d303fa78bf8368"
else
    echo "PASS: /usr/lib/librsvg/ptest/text-f4d303fa78bf8368"
fi
exit $rc
