#!/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-4f914238c6ab48f9 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/api-4f914238c6ab48f9"
else
    echo "PASS: /usr/lib/librsvg/ptest/api-4f914238c6ab48f9"
fi
if ! /usr/lib/librsvg/ptest/bugs-1efcff80f3c8f675 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/bugs-1efcff80f3c8f675"
else
    echo "PASS: /usr/lib/librsvg/ptest/bugs-1efcff80f3c8f675"
fi
if ! /usr/lib/librsvg/ptest/errors-166aed4c6f90b59c 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/errors-166aed4c6f90b59c"
else
    echo "PASS: /usr/lib/librsvg/ptest/errors-166aed4c6f90b59c"
fi
if ! /usr/lib/librsvg/ptest/filters-61294d828fa51f41 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/filters-61294d828fa51f41"
else
    echo "PASS: /usr/lib/librsvg/ptest/filters-61294d828fa51f41"
fi
if ! /usr/lib/librsvg/ptest/geometries-17b75f06406a9e40 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/geometries-17b75f06406a9e40"
else
    echo "PASS: /usr/lib/librsvg/ptest/geometries-17b75f06406a9e40"
fi
if ! /usr/lib/librsvg/ptest/intrinsic_dimensions-c2bdfcc83eca1a3a 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/intrinsic_dimensions-c2bdfcc83eca1a3a"
else
    echo "PASS: /usr/lib/librsvg/ptest/intrinsic_dimensions-c2bdfcc83eca1a3a"
fi
if ! /usr/lib/librsvg/ptest/loading_crash-6871096fde74ba03 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_crash-6871096fde74ba03"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_crash-6871096fde74ba03"
fi
if ! /usr/lib/librsvg/ptest/loading_disallowed-f1f09409fffd9b22 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_disallowed-f1f09409fffd9b22"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_disallowed-f1f09409fffd9b22"
fi
if ! /usr/lib/librsvg/ptest/primitive_geometries-b0a7abd222c1317f 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitive_geometries-b0a7abd222c1317f"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitive_geometries-b0a7abd222c1317f"
fi
if ! /usr/lib/librsvg/ptest/primitives-a13cb8c25f21a24a 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitives-a13cb8c25f21a24a"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitives-a13cb8c25f21a24a"
fi
if ! /usr/lib/librsvg/ptest/reference-b84f9ef3d32bb9a1 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/reference-b84f9ef3d32bb9a1"
else
    echo "PASS: /usr/lib/librsvg/ptest/reference-b84f9ef3d32bb9a1"
fi
if ! /usr/lib/librsvg/ptest/render_crash-bfa42ca4efdae779 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/render_crash-bfa42ca4efdae779"
else
    echo "PASS: /usr/lib/librsvg/ptest/render_crash-bfa42ca4efdae779"
fi
if ! /usr/lib/librsvg/ptest/rsvg-2c4fc5fc8f86528c 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg-2c4fc5fc8f86528c"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg-2c4fc5fc8f86528c"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-02a6ca6333e67216 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-02a6ca6333e67216"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-02a6ca6333e67216"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-632cd9e2c60a0d26 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-632cd9e2c60a0d26"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-632cd9e2c60a0d26"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-ebc0ef88e287d1dc 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-ebc0ef88e287d1dc"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-ebc0ef88e287d1dc"
fi
if ! /usr/lib/librsvg/ptest/shapes-23dcbfde5d20bd2d 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/shapes-23dcbfde5d20bd2d"
else
    echo "PASS: /usr/lib/librsvg/ptest/shapes-23dcbfde5d20bd2d"
fi
if ! /usr/lib/librsvg/ptest/text-24673ed96e12d2ad 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/text-24673ed96e12d2ad"
else
    echo "PASS: /usr/lib/librsvg/ptest/text-24673ed96e12d2ad"
fi
exit $rc
