#!/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-3ca87d63843d6812 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/api-3ca87d63843d6812"
else
    echo "PASS: /usr/lib/librsvg/ptest/api-3ca87d63843d6812"
fi
if ! /usr/lib/librsvg/ptest/bugs-42f22c5726511d7b 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/bugs-42f22c5726511d7b"
else
    echo "PASS: /usr/lib/librsvg/ptest/bugs-42f22c5726511d7b"
fi
if ! /usr/lib/librsvg/ptest/errors-27016ada8e5053af 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/errors-27016ada8e5053af"
else
    echo "PASS: /usr/lib/librsvg/ptest/errors-27016ada8e5053af"
fi
if ! /usr/lib/librsvg/ptest/filters-01efe69329e871ea 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/filters-01efe69329e871ea"
else
    echo "PASS: /usr/lib/librsvg/ptest/filters-01efe69329e871ea"
fi
if ! /usr/lib/librsvg/ptest/geometries-6d413284adeb78aa 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/geometries-6d413284adeb78aa"
else
    echo "PASS: /usr/lib/librsvg/ptest/geometries-6d413284adeb78aa"
fi
if ! /usr/lib/librsvg/ptest/intrinsic_dimensions-b0b7ef7e4013d696 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/intrinsic_dimensions-b0b7ef7e4013d696"
else
    echo "PASS: /usr/lib/librsvg/ptest/intrinsic_dimensions-b0b7ef7e4013d696"
fi
if ! /usr/lib/librsvg/ptest/loading_crash-f3bf17ff09c67148 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_crash-f3bf17ff09c67148"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_crash-f3bf17ff09c67148"
fi
if ! /usr/lib/librsvg/ptest/loading_disallowed-a2ba31d778e3c9d2 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_disallowed-a2ba31d778e3c9d2"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_disallowed-a2ba31d778e3c9d2"
fi
if ! /usr/lib/librsvg/ptest/primitive_geometries-3b3806be70c332f9 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitive_geometries-3b3806be70c332f9"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitive_geometries-3b3806be70c332f9"
fi
if ! /usr/lib/librsvg/ptest/primitives-2b83d9586f0d20b8 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitives-2b83d9586f0d20b8"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitives-2b83d9586f0d20b8"
fi
if ! /usr/lib/librsvg/ptest/reference-563d08541b6470cd 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/reference-563d08541b6470cd"
else
    echo "PASS: /usr/lib/librsvg/ptest/reference-563d08541b6470cd"
fi
if ! /usr/lib/librsvg/ptest/render_crash-9c1bfc0ead3940d0 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/render_crash-9c1bfc0ead3940d0"
else
    echo "PASS: /usr/lib/librsvg/ptest/render_crash-9c1bfc0ead3940d0"
fi
if ! /usr/lib/librsvg/ptest/rsvg-beb7a6ebcf2cbd05 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg-beb7a6ebcf2cbd05"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg-beb7a6ebcf2cbd05"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-34d2967436c23f8b 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-34d2967436c23f8b"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-34d2967436c23f8b"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-8e562027ee393140 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-8e562027ee393140"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-8e562027ee393140"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-9337fd61ca2c4152 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-9337fd61ca2c4152"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-9337fd61ca2c4152"
fi
if ! /usr/lib/librsvg/ptest/shapes-ed839ca22277f179 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/shapes-ed839ca22277f179"
else
    echo "PASS: /usr/lib/librsvg/ptest/shapes-ed839ca22277f179"
fi
if ! /usr/lib/librsvg/ptest/text-ddadbaad21ed2a18 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/text-ddadbaad21ed2a18"
else
    echo "PASS: /usr/lib/librsvg/ptest/text-ddadbaad21ed2a18"
fi
exit $rc
