#!/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-c740c1f3635ac91c 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/api-c740c1f3635ac91c"
else
    echo "PASS: /usr/lib/librsvg/ptest/api-c740c1f3635ac91c"
fi
if ! /usr/lib/librsvg/ptest/bugs-e64c97f7bcbfb52a 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/bugs-e64c97f7bcbfb52a"
else
    echo "PASS: /usr/lib/librsvg/ptest/bugs-e64c97f7bcbfb52a"
fi
if ! /usr/lib/librsvg/ptest/errors-7b1b065993471d89 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/errors-7b1b065993471d89"
else
    echo "PASS: /usr/lib/librsvg/ptest/errors-7b1b065993471d89"
fi
if ! /usr/lib/librsvg/ptest/filters-d40b439d1e40fbd2 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/filters-d40b439d1e40fbd2"
else
    echo "PASS: /usr/lib/librsvg/ptest/filters-d40b439d1e40fbd2"
fi
if ! /usr/lib/librsvg/ptest/geometries-bf0e890ef297fdcd 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/geometries-bf0e890ef297fdcd"
else
    echo "PASS: /usr/lib/librsvg/ptest/geometries-bf0e890ef297fdcd"
fi
if ! /usr/lib/librsvg/ptest/intrinsic_dimensions-c3ee051b018bfaf0 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/intrinsic_dimensions-c3ee051b018bfaf0"
else
    echo "PASS: /usr/lib/librsvg/ptest/intrinsic_dimensions-c3ee051b018bfaf0"
fi
if ! /usr/lib/librsvg/ptest/loading_crash-b21f85d38e96798e 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_crash-b21f85d38e96798e"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_crash-b21f85d38e96798e"
fi
if ! /usr/lib/librsvg/ptest/loading_disallowed-6f1fd3e219d296c1 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_disallowed-6f1fd3e219d296c1"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_disallowed-6f1fd3e219d296c1"
fi
if ! /usr/lib/librsvg/ptest/primitive_geometries-c231bc30be72085c 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitive_geometries-c231bc30be72085c"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitive_geometries-c231bc30be72085c"
fi
if ! /usr/lib/librsvg/ptest/primitives-869ba973b7d2847f 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitives-869ba973b7d2847f"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitives-869ba973b7d2847f"
fi
if ! /usr/lib/librsvg/ptest/reference-e81a13747e8280f6 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/reference-e81a13747e8280f6"
else
    echo "PASS: /usr/lib/librsvg/ptest/reference-e81a13747e8280f6"
fi
if ! /usr/lib/librsvg/ptest/render_crash-efc2d16d2409259d 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/render_crash-efc2d16d2409259d"
else
    echo "PASS: /usr/lib/librsvg/ptest/render_crash-efc2d16d2409259d"
fi
if ! /usr/lib/librsvg/ptest/rsvg-0185743f48f9c360 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg-0185743f48f9c360"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg-0185743f48f9c360"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-085944d128e57a14 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-085944d128e57a14"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-085944d128e57a14"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-58a5cd68d6fadea5 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-58a5cd68d6fadea5"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-58a5cd68d6fadea5"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-ae914f695dfff97f 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-ae914f695dfff97f"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-ae914f695dfff97f"
fi
if ! /usr/lib/librsvg/ptest/shapes-629490ad2d55177f 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/shapes-629490ad2d55177f"
else
    echo "PASS: /usr/lib/librsvg/ptest/shapes-629490ad2d55177f"
fi
if ! /usr/lib/librsvg/ptest/text-a5c602cd6e47be68 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/text-a5c602cd6e47be68"
else
    echo "PASS: /usr/lib/librsvg/ptest/text-a5c602cd6e47be68"
fi
exit $rc
