#!/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-0551d2de6589b3a9 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/api-0551d2de6589b3a9"
else
    echo "PASS: /usr/lib/librsvg/ptest/api-0551d2de6589b3a9"
fi
if ! /usr/lib/librsvg/ptest/bugs-3878284a3f70ebe3 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/bugs-3878284a3f70ebe3"
else
    echo "PASS: /usr/lib/librsvg/ptest/bugs-3878284a3f70ebe3"
fi
if ! /usr/lib/librsvg/ptest/errors-43b356a152886b7e 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/errors-43b356a152886b7e"
else
    echo "PASS: /usr/lib/librsvg/ptest/errors-43b356a152886b7e"
fi
if ! /usr/lib/librsvg/ptest/filters-011e2298929895bb 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/filters-011e2298929895bb"
else
    echo "PASS: /usr/lib/librsvg/ptest/filters-011e2298929895bb"
fi
if ! /usr/lib/librsvg/ptest/geometries-44f95e1421f1438f 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/geometries-44f95e1421f1438f"
else
    echo "PASS: /usr/lib/librsvg/ptest/geometries-44f95e1421f1438f"
fi
if ! /usr/lib/librsvg/ptest/intrinsic_dimensions-c54650dfb329775f 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/intrinsic_dimensions-c54650dfb329775f"
else
    echo "PASS: /usr/lib/librsvg/ptest/intrinsic_dimensions-c54650dfb329775f"
fi
if ! /usr/lib/librsvg/ptest/loading_crash-112d769527c5c98f 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_crash-112d769527c5c98f"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_crash-112d769527c5c98f"
fi
if ! /usr/lib/librsvg/ptest/loading_disallowed-3aaf32cf9223cf72 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_disallowed-3aaf32cf9223cf72"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_disallowed-3aaf32cf9223cf72"
fi
if ! /usr/lib/librsvg/ptest/primitive_geometries-238b9b9e2912f1eb 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitive_geometries-238b9b9e2912f1eb"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitive_geometries-238b9b9e2912f1eb"
fi
if ! /usr/lib/librsvg/ptest/primitives-2cdbb5ad550d1857 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitives-2cdbb5ad550d1857"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitives-2cdbb5ad550d1857"
fi
if ! /usr/lib/librsvg/ptest/reference-5cd54ac6b2bfc958 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/reference-5cd54ac6b2bfc958"
else
    echo "PASS: /usr/lib/librsvg/ptest/reference-5cd54ac6b2bfc958"
fi
if ! /usr/lib/librsvg/ptest/render_crash-37a69b2775917cad 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/render_crash-37a69b2775917cad"
else
    echo "PASS: /usr/lib/librsvg/ptest/render_crash-37a69b2775917cad"
fi
if ! /usr/lib/librsvg/ptest/rsvg-f8a5ddadf5dce173 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg-f8a5ddadf5dce173"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg-f8a5ddadf5dce173"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-6a16ab2ec48777ad 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-6a16ab2ec48777ad"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-6a16ab2ec48777ad"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-7c36dc5559e454a5 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-7c36dc5559e454a5"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-7c36dc5559e454a5"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-bba4bbe1e07cf4f7 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-bba4bbe1e07cf4f7"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-bba4bbe1e07cf4f7"
fi
if ! /usr/lib/librsvg/ptest/shapes-11248362b676b2fa 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/shapes-11248362b676b2fa"
else
    echo "PASS: /usr/lib/librsvg/ptest/shapes-11248362b676b2fa"
fi
if ! /usr/lib/librsvg/ptest/text-f0c7c828a421f197 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/text-f0c7c828a421f197"
else
    echo "PASS: /usr/lib/librsvg/ptest/text-f0c7c828a421f197"
fi
exit $rc
