#!/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/errors-05aae6409573af56 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/errors-05aae6409573af56"
else
    echo "PASS: /usr/lib/librsvg/ptest/errors-05aae6409573af56"
fi
if ! /usr/lib/librsvg/ptest/api-09c591371806f63b 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/api-09c591371806f63b"
else
    echo "PASS: /usr/lib/librsvg/ptest/api-09c591371806f63b"
fi
if ! /usr/lib/librsvg/ptest/primitive_geometries-268c4243b6d58d28 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitive_geometries-268c4243b6d58d28"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitive_geometries-268c4243b6d58d28"
fi
if ! /usr/lib/librsvg/ptest/filters-30fc6b5afc696532 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/filters-30fc6b5afc696532"
else
    echo "PASS: /usr/lib/librsvg/ptest/filters-30fc6b5afc696532"
fi
if ! /usr/lib/librsvg/ptest/primitives-4301dbf85fb521cb 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitives-4301dbf85fb521cb"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitives-4301dbf85fb521cb"
fi
if ! /usr/lib/librsvg/ptest/reference-5224a258906ead70 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/reference-5224a258906ead70"
else
    echo "PASS: /usr/lib/librsvg/ptest/reference-5224a258906ead70"
fi
if ! /usr/lib/librsvg/ptest/intrinsic_dimensions-6c16559ad1495b07 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/intrinsic_dimensions-6c16559ad1495b07"
else
    echo "PASS: /usr/lib/librsvg/ptest/intrinsic_dimensions-6c16559ad1495b07"
fi
if ! /usr/lib/librsvg/ptest/bugs-841de72a9e39e86a 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/bugs-841de72a9e39e86a"
else
    echo "PASS: /usr/lib/librsvg/ptest/bugs-841de72a9e39e86a"
fi
if ! /usr/lib/librsvg/ptest/rsvg-863b4e42994581ba 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg-863b4e42994581ba"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg-863b4e42994581ba"
fi
if ! /usr/lib/librsvg/ptest/shapes-8bf7a6cbe56eadc2 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/shapes-8bf7a6cbe56eadc2"
else
    echo "PASS: /usr/lib/librsvg/ptest/shapes-8bf7a6cbe56eadc2"
fi
if ! /usr/lib/librsvg/ptest/geometries-9ffc1a7f86c986e6 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/geometries-9ffc1a7f86c986e6"
else
    echo "PASS: /usr/lib/librsvg/ptest/geometries-9ffc1a7f86c986e6"
fi
if ! /usr/lib/librsvg/ptest/loading_crash-a538e73251b1f414 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_crash-a538e73251b1f414"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_crash-a538e73251b1f414"
fi
if ! /usr/lib/librsvg/ptest/text-b52e3880d2e69223 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/text-b52e3880d2e69223"
else
    echo "PASS: /usr/lib/librsvg/ptest/text-b52e3880d2e69223"
fi
if ! /usr/lib/librsvg/ptest/render_crash-b8d431d2ebdb2331 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/render_crash-b8d431d2ebdb2331"
else
    echo "PASS: /usr/lib/librsvg/ptest/render_crash-b8d431d2ebdb2331"
fi
if ! /usr/lib/librsvg/ptest/loading_disallowed-f39584d80685da7a 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_disallowed-f39584d80685da7a"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_disallowed-f39584d80685da7a"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-c82fde12ad63f326 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-c82fde12ad63f326"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-c82fde12ad63f326"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-d9b3791148b8a1f3 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-d9b3791148b8a1f3"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-d9b3791148b8a1f3"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-f73a0d0eb894b4ed 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-f73a0d0eb894b4ed"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-f73a0d0eb894b4ed"
fi
exit $rc
