#!/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-7f23d79327f97784 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/api-7f23d79327f97784"
else
    echo "PASS: /usr/lib/librsvg/ptest/api-7f23d79327f97784"
fi
if ! /usr/lib/librsvg/ptest/bugs-36808f8a6ef29071 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/bugs-36808f8a6ef29071"
else
    echo "PASS: /usr/lib/librsvg/ptest/bugs-36808f8a6ef29071"
fi
if ! /usr/lib/librsvg/ptest/errors-ac753df282460a3e 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/errors-ac753df282460a3e"
else
    echo "PASS: /usr/lib/librsvg/ptest/errors-ac753df282460a3e"
fi
if ! /usr/lib/librsvg/ptest/filters-b9e89ff4773a27ae 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/filters-b9e89ff4773a27ae"
else
    echo "PASS: /usr/lib/librsvg/ptest/filters-b9e89ff4773a27ae"
fi
if ! /usr/lib/librsvg/ptest/geometries-35560e9affe2adc6 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/geometries-35560e9affe2adc6"
else
    echo "PASS: /usr/lib/librsvg/ptest/geometries-35560e9affe2adc6"
fi
if ! /usr/lib/librsvg/ptest/intrinsic_dimensions-96ec705ae526949d 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/intrinsic_dimensions-96ec705ae526949d"
else
    echo "PASS: /usr/lib/librsvg/ptest/intrinsic_dimensions-96ec705ae526949d"
fi
if ! /usr/lib/librsvg/ptest/loading_crash-c96cbcd91f4c5564 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_crash-c96cbcd91f4c5564"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_crash-c96cbcd91f4c5564"
fi
if ! /usr/lib/librsvg/ptest/loading_disallowed-d1518004e2a43fbd 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_disallowed-d1518004e2a43fbd"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_disallowed-d1518004e2a43fbd"
fi
if ! /usr/lib/librsvg/ptest/primitive_geometries-1a62dc14e5a06335 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitive_geometries-1a62dc14e5a06335"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitive_geometries-1a62dc14e5a06335"
fi
if ! /usr/lib/librsvg/ptest/primitives-f777181dc6eb264f 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitives-f777181dc6eb264f"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitives-f777181dc6eb264f"
fi
if ! /usr/lib/librsvg/ptest/reference-90b12002248299ab 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/reference-90b12002248299ab"
else
    echo "PASS: /usr/lib/librsvg/ptest/reference-90b12002248299ab"
fi
if ! /usr/lib/librsvg/ptest/render_crash-c78b7e90a844ca9d 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/render_crash-c78b7e90a844ca9d"
else
    echo "PASS: /usr/lib/librsvg/ptest/render_crash-c78b7e90a844ca9d"
fi
if ! /usr/lib/librsvg/ptest/rsvg-a0e4ac44e8cba40f 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg-a0e4ac44e8cba40f"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg-a0e4ac44e8cba40f"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-0addc90166ad7930 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-0addc90166ad7930"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-0addc90166ad7930"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-53aebe5e0f328c2b 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-53aebe5e0f328c2b"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-53aebe5e0f328c2b"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-a4df34447cc7f2b8 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-a4df34447cc7f2b8"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-a4df34447cc7f2b8"
fi
if ! /usr/lib/librsvg/ptest/shapes-e091f5555c652349 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/shapes-e091f5555c652349"
else
    echo "PASS: /usr/lib/librsvg/ptest/shapes-e091f5555c652349"
fi
if ! /usr/lib/librsvg/ptest/text-65e40bd5f7b181c8 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/text-65e40bd5f7b181c8"
else
    echo "PASS: /usr/lib/librsvg/ptest/text-65e40bd5f7b181c8"
fi
exit $rc
