#!/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-553146b1a7dd08b8 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/api-553146b1a7dd08b8"
else
    echo "PASS: /usr/lib/librsvg/ptest/api-553146b1a7dd08b8"
fi
if ! /usr/lib/librsvg/ptest/bugs-da993f80c651be45 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/bugs-da993f80c651be45"
else
    echo "PASS: /usr/lib/librsvg/ptest/bugs-da993f80c651be45"
fi
if ! /usr/lib/librsvg/ptest/errors-3e9ee637cf62e71c 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/errors-3e9ee637cf62e71c"
else
    echo "PASS: /usr/lib/librsvg/ptest/errors-3e9ee637cf62e71c"
fi
if ! /usr/lib/librsvg/ptest/filters-be777184de29219b 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/filters-be777184de29219b"
else
    echo "PASS: /usr/lib/librsvg/ptest/filters-be777184de29219b"
fi
if ! /usr/lib/librsvg/ptest/geometries-c75f41df8a84fc50 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/geometries-c75f41df8a84fc50"
else
    echo "PASS: /usr/lib/librsvg/ptest/geometries-c75f41df8a84fc50"
fi
if ! /usr/lib/librsvg/ptest/intrinsic_dimensions-181aa08527810b46 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/intrinsic_dimensions-181aa08527810b46"
else
    echo "PASS: /usr/lib/librsvg/ptest/intrinsic_dimensions-181aa08527810b46"
fi
if ! /usr/lib/librsvg/ptest/loading_crash-82f984297a5b7815 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_crash-82f984297a5b7815"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_crash-82f984297a5b7815"
fi
if ! /usr/lib/librsvg/ptest/loading_disallowed-93da25fcc0e7cb9c 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_disallowed-93da25fcc0e7cb9c"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_disallowed-93da25fcc0e7cb9c"
fi
if ! /usr/lib/librsvg/ptest/primitive_geometries-fefd8b9c20e5cc68 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitive_geometries-fefd8b9c20e5cc68"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitive_geometries-fefd8b9c20e5cc68"
fi
if ! /usr/lib/librsvg/ptest/primitives-39a344933716f7bc 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitives-39a344933716f7bc"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitives-39a344933716f7bc"
fi
if ! /usr/lib/librsvg/ptest/reference-607b99e6295c6e04 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/reference-607b99e6295c6e04"
else
    echo "PASS: /usr/lib/librsvg/ptest/reference-607b99e6295c6e04"
fi
if ! /usr/lib/librsvg/ptest/render_crash-ce542ccf024c7493 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/render_crash-ce542ccf024c7493"
else
    echo "PASS: /usr/lib/librsvg/ptest/render_crash-ce542ccf024c7493"
fi
if ! /usr/lib/librsvg/ptest/rsvg-8e1a647618ba7917 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg-8e1a647618ba7917"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg-8e1a647618ba7917"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-08b1cd8224b032f0 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-08b1cd8224b032f0"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-08b1cd8224b032f0"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-09b513812a613426 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-09b513812a613426"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-09b513812a613426"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-49d076410c370f2e 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-49d076410c370f2e"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-49d076410c370f2e"
fi
if ! /usr/lib/librsvg/ptest/shapes-269e0ed0b39af5f5 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/shapes-269e0ed0b39af5f5"
else
    echo "PASS: /usr/lib/librsvg/ptest/shapes-269e0ed0b39af5f5"
fi
if ! /usr/lib/librsvg/ptest/text-a08dd3a82982e62d 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/text-a08dd3a82982e62d"
else
    echo "PASS: /usr/lib/librsvg/ptest/text-a08dd3a82982e62d"
fi
exit $rc
