#!/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-4ff0481cae10595d 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/api-4ff0481cae10595d"
else
    echo "PASS: /usr/lib/librsvg/ptest/api-4ff0481cae10595d"
fi
if ! /usr/lib/librsvg/ptest/bugs-55df40482bd92dda 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/bugs-55df40482bd92dda"
else
    echo "PASS: /usr/lib/librsvg/ptest/bugs-55df40482bd92dda"
fi
if ! /usr/lib/librsvg/ptest/errors-b7b81f075036e999 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/errors-b7b81f075036e999"
else
    echo "PASS: /usr/lib/librsvg/ptest/errors-b7b81f075036e999"
fi
if ! /usr/lib/librsvg/ptest/filters-d077421515302552 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/filters-d077421515302552"
else
    echo "PASS: /usr/lib/librsvg/ptest/filters-d077421515302552"
fi
if ! /usr/lib/librsvg/ptest/geometries-dfaf766f2a11a2fb 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/geometries-dfaf766f2a11a2fb"
else
    echo "PASS: /usr/lib/librsvg/ptest/geometries-dfaf766f2a11a2fb"
fi
if ! /usr/lib/librsvg/ptest/intrinsic_dimensions-6b4149e0233a52ea 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/intrinsic_dimensions-6b4149e0233a52ea"
else
    echo "PASS: /usr/lib/librsvg/ptest/intrinsic_dimensions-6b4149e0233a52ea"
fi
if ! /usr/lib/librsvg/ptest/loading_crash-b55bae7a213de01c 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_crash-b55bae7a213de01c"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_crash-b55bae7a213de01c"
fi
if ! /usr/lib/librsvg/ptest/loading_disallowed-7c0913f7eb856835 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_disallowed-7c0913f7eb856835"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_disallowed-7c0913f7eb856835"
fi
if ! /usr/lib/librsvg/ptest/primitive_geometries-796eb2927702a5f3 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitive_geometries-796eb2927702a5f3"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitive_geometries-796eb2927702a5f3"
fi
if ! /usr/lib/librsvg/ptest/primitives-04871954f675cb5a 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitives-04871954f675cb5a"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitives-04871954f675cb5a"
fi
if ! /usr/lib/librsvg/ptest/reference-73ec675e01b4018a 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/reference-73ec675e01b4018a"
else
    echo "PASS: /usr/lib/librsvg/ptest/reference-73ec675e01b4018a"
fi
if ! /usr/lib/librsvg/ptest/render_crash-9f0e3d8d9912dfaa 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/render_crash-9f0e3d8d9912dfaa"
else
    echo "PASS: /usr/lib/librsvg/ptest/render_crash-9f0e3d8d9912dfaa"
fi
if ! /usr/lib/librsvg/ptest/rsvg-77ea6f3a3fa45c6a 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg-77ea6f3a3fa45c6a"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg-77ea6f3a3fa45c6a"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-0319562a22fac45b 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-0319562a22fac45b"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-0319562a22fac45b"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-5cd5e296f4c540b2 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-5cd5e296f4c540b2"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-5cd5e296f4c540b2"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-d33bdaa303119310 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-d33bdaa303119310"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-d33bdaa303119310"
fi
if ! /usr/lib/librsvg/ptest/shapes-2e94ec0d6f180894 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/shapes-2e94ec0d6f180894"
else
    echo "PASS: /usr/lib/librsvg/ptest/shapes-2e94ec0d6f180894"
fi
if ! /usr/lib/librsvg/ptest/text-a51b0bbc08af04fb 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/text-a51b0bbc08af04fb"
else
    echo "PASS: /usr/lib/librsvg/ptest/text-a51b0bbc08af04fb"
fi
exit $rc
