#!/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/lib64/librsvg/ptest/api-ea467e92e4cfadd7 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/api-ea467e92e4cfadd7"
else
    echo "PASS: /usr/lib64/librsvg/ptest/api-ea467e92e4cfadd7"
fi
if ! /usr/lib64/librsvg/ptest/bugs-e9ff0ab62735feb3 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/bugs-e9ff0ab62735feb3"
else
    echo "PASS: /usr/lib64/librsvg/ptest/bugs-e9ff0ab62735feb3"
fi
if ! /usr/lib64/librsvg/ptest/errors-b72062a6d9565587 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/errors-b72062a6d9565587"
else
    echo "PASS: /usr/lib64/librsvg/ptest/errors-b72062a6d9565587"
fi
if ! /usr/lib64/librsvg/ptest/filters-9cb18ff52422234b 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/filters-9cb18ff52422234b"
else
    echo "PASS: /usr/lib64/librsvg/ptest/filters-9cb18ff52422234b"
fi
if ! /usr/lib64/librsvg/ptest/geometries-65d5e891b18be8c9 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/geometries-65d5e891b18be8c9"
else
    echo "PASS: /usr/lib64/librsvg/ptest/geometries-65d5e891b18be8c9"
fi
if ! /usr/lib64/librsvg/ptest/intrinsic_dimensions-7b6c3ac83c90e4fc 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/intrinsic_dimensions-7b6c3ac83c90e4fc"
else
    echo "PASS: /usr/lib64/librsvg/ptest/intrinsic_dimensions-7b6c3ac83c90e4fc"
fi
if ! /usr/lib64/librsvg/ptest/loading_crash-e2a8b20a1c259af9 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/loading_crash-e2a8b20a1c259af9"
else
    echo "PASS: /usr/lib64/librsvg/ptest/loading_crash-e2a8b20a1c259af9"
fi
if ! /usr/lib64/librsvg/ptest/loading_disallowed-7fa2a434f8cb6b65 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/loading_disallowed-7fa2a434f8cb6b65"
else
    echo "PASS: /usr/lib64/librsvg/ptest/loading_disallowed-7fa2a434f8cb6b65"
fi
if ! /usr/lib64/librsvg/ptest/primitive_geometries-5b92f1fa7726cc0e 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/primitive_geometries-5b92f1fa7726cc0e"
else
    echo "PASS: /usr/lib64/librsvg/ptest/primitive_geometries-5b92f1fa7726cc0e"
fi
if ! /usr/lib64/librsvg/ptest/primitives-5c1612f63123fd96 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/primitives-5c1612f63123fd96"
else
    echo "PASS: /usr/lib64/librsvg/ptest/primitives-5c1612f63123fd96"
fi
if ! /usr/lib64/librsvg/ptest/reference-f70ef443c6dc5532 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/reference-f70ef443c6dc5532"
else
    echo "PASS: /usr/lib64/librsvg/ptest/reference-f70ef443c6dc5532"
fi
if ! /usr/lib64/librsvg/ptest/render_crash-4d49370f74eda96f 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/render_crash-4d49370f74eda96f"
else
    echo "PASS: /usr/lib64/librsvg/ptest/render_crash-4d49370f74eda96f"
fi
if ! /usr/lib64/librsvg/ptest/rsvg-2e32ba23ac030060 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/rsvg-2e32ba23ac030060"
else
    echo "PASS: /usr/lib64/librsvg/ptest/rsvg-2e32ba23ac030060"
fi
if ! /usr/lib64/librsvg/ptest/rsvg_convert-9605dec5da1d52c4 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/rsvg_convert-9605dec5da1d52c4"
else
    echo "PASS: /usr/lib64/librsvg/ptest/rsvg_convert-9605dec5da1d52c4"
fi
if ! /usr/lib64/librsvg/ptest/rsvg_convert-96c1986b09e03ddd 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/rsvg_convert-96c1986b09e03ddd"
else
    echo "PASS: /usr/lib64/librsvg/ptest/rsvg_convert-96c1986b09e03ddd"
fi
if ! /usr/lib64/librsvg/ptest/rsvg_convert-f95404fb77358ab9 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/rsvg_convert-f95404fb77358ab9"
else
    echo "PASS: /usr/lib64/librsvg/ptest/rsvg_convert-f95404fb77358ab9"
fi
if ! /usr/lib64/librsvg/ptest/shapes-684cc1da852dd100 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/shapes-684cc1da852dd100"
else
    echo "PASS: /usr/lib64/librsvg/ptest/shapes-684cc1da852dd100"
fi
if ! /usr/lib64/librsvg/ptest/text-86cbef6b7fcb5654 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/text-86cbef6b7fcb5654"
else
    echo "PASS: /usr/lib64/librsvg/ptest/text-86cbef6b7fcb5654"
fi
exit $rc
