#!/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-cf96c64bc749f584 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/api-cf96c64bc749f584"
else
    echo "PASS: /usr/lib/librsvg/ptest/api-cf96c64bc749f584"
fi
if ! /usr/lib/librsvg/ptest/bugs-776dceefad3a7d60 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/bugs-776dceefad3a7d60"
else
    echo "PASS: /usr/lib/librsvg/ptest/bugs-776dceefad3a7d60"
fi
if ! /usr/lib/librsvg/ptest/errors-2dca812abda451ba 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/errors-2dca812abda451ba"
else
    echo "PASS: /usr/lib/librsvg/ptest/errors-2dca812abda451ba"
fi
if ! /usr/lib/librsvg/ptest/filters-9f7c46a52ac57674 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/filters-9f7c46a52ac57674"
else
    echo "PASS: /usr/lib/librsvg/ptest/filters-9f7c46a52ac57674"
fi
if ! /usr/lib/librsvg/ptest/geometries-e7b4df759c735af5 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/geometries-e7b4df759c735af5"
else
    echo "PASS: /usr/lib/librsvg/ptest/geometries-e7b4df759c735af5"
fi
if ! /usr/lib/librsvg/ptest/intrinsic_dimensions-9e8bbfc84349baa8 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/intrinsic_dimensions-9e8bbfc84349baa8"
else
    echo "PASS: /usr/lib/librsvg/ptest/intrinsic_dimensions-9e8bbfc84349baa8"
fi
if ! /usr/lib/librsvg/ptest/loading_crash-8a3ea6408f9b47ba 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_crash-8a3ea6408f9b47ba"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_crash-8a3ea6408f9b47ba"
fi
if ! /usr/lib/librsvg/ptest/loading_disallowed-f4a2c423f4f0b7fc 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_disallowed-f4a2c423f4f0b7fc"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_disallowed-f4a2c423f4f0b7fc"
fi
if ! /usr/lib/librsvg/ptest/primitive_geometries-78fd54cfd37ac716 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitive_geometries-78fd54cfd37ac716"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitive_geometries-78fd54cfd37ac716"
fi
if ! /usr/lib/librsvg/ptest/primitives-499fe7e108306322 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitives-499fe7e108306322"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitives-499fe7e108306322"
fi
if ! /usr/lib/librsvg/ptest/reference-223b9609c75622af 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/reference-223b9609c75622af"
else
    echo "PASS: /usr/lib/librsvg/ptest/reference-223b9609c75622af"
fi
if ! /usr/lib/librsvg/ptest/render_crash-f7a00500c495b0cc 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/render_crash-f7a00500c495b0cc"
else
    echo "PASS: /usr/lib/librsvg/ptest/render_crash-f7a00500c495b0cc"
fi
if ! /usr/lib/librsvg/ptest/rsvg-c28561a126f24d97 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg-c28561a126f24d97"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg-c28561a126f24d97"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-1bea1fb919350d94 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-1bea1fb919350d94"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-1bea1fb919350d94"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-7683e1d53e8b1a7b 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-7683e1d53e8b1a7b"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-7683e1d53e8b1a7b"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-8e13e7a2ee7cb30e 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-8e13e7a2ee7cb30e"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-8e13e7a2ee7cb30e"
fi
if ! /usr/lib/librsvg/ptest/shapes-ce47f32a5f4c20c6 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/shapes-ce47f32a5f4c20c6"
else
    echo "PASS: /usr/lib/librsvg/ptest/shapes-ce47f32a5f4c20c6"
fi
if ! /usr/lib/librsvg/ptest/text-ecc0af96a275ce49 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/text-ecc0af96a275ce49"
else
    echo "PASS: /usr/lib/librsvg/ptest/text-ecc0af96a275ce49"
fi
exit $rc
