#!/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-5c85b32051ddcb91 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/api-5c85b32051ddcb91"
else
    echo "PASS: /usr/lib/librsvg/ptest/api-5c85b32051ddcb91"
fi
if ! /usr/lib/librsvg/ptest/bugs-6f85298c8b1e78f1 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/bugs-6f85298c8b1e78f1"
else
    echo "PASS: /usr/lib/librsvg/ptest/bugs-6f85298c8b1e78f1"
fi
if ! /usr/lib/librsvg/ptest/errors-cb042d2e524a798e 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/errors-cb042d2e524a798e"
else
    echo "PASS: /usr/lib/librsvg/ptest/errors-cb042d2e524a798e"
fi
if ! /usr/lib/librsvg/ptest/filters-0b858e4321b40126 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/filters-0b858e4321b40126"
else
    echo "PASS: /usr/lib/librsvg/ptest/filters-0b858e4321b40126"
fi
if ! /usr/lib/librsvg/ptest/geometries-87cb766b371559e8 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/geometries-87cb766b371559e8"
else
    echo "PASS: /usr/lib/librsvg/ptest/geometries-87cb766b371559e8"
fi
if ! /usr/lib/librsvg/ptest/intrinsic_dimensions-9d4098d517bcca47 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/intrinsic_dimensions-9d4098d517bcca47"
else
    echo "PASS: /usr/lib/librsvg/ptest/intrinsic_dimensions-9d4098d517bcca47"
fi
if ! /usr/lib/librsvg/ptest/loading_crash-d896056b8cd322a7 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_crash-d896056b8cd322a7"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_crash-d896056b8cd322a7"
fi
if ! /usr/lib/librsvg/ptest/loading_disallowed-87199d4c5db94c40 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_disallowed-87199d4c5db94c40"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_disallowed-87199d4c5db94c40"
fi
if ! /usr/lib/librsvg/ptest/primitive_geometries-bbc3d52ae04adeda 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitive_geometries-bbc3d52ae04adeda"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitive_geometries-bbc3d52ae04adeda"
fi
if ! /usr/lib/librsvg/ptest/primitives-486954127d7e6d09 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitives-486954127d7e6d09"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitives-486954127d7e6d09"
fi
if ! /usr/lib/librsvg/ptest/reference-8ca9f1f7ca60e270 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/reference-8ca9f1f7ca60e270"
else
    echo "PASS: /usr/lib/librsvg/ptest/reference-8ca9f1f7ca60e270"
fi
if ! /usr/lib/librsvg/ptest/render_crash-ab31f7a755286d49 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/render_crash-ab31f7a755286d49"
else
    echo "PASS: /usr/lib/librsvg/ptest/render_crash-ab31f7a755286d49"
fi
if ! /usr/lib/librsvg/ptest/rsvg-ce72da8edc8ab398 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg-ce72da8edc8ab398"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg-ce72da8edc8ab398"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-0c29d6926bbab99f 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-0c29d6926bbab99f"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-0c29d6926bbab99f"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-4f3f1d47c0f031db 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-4f3f1d47c0f031db"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-4f3f1d47c0f031db"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-e84ac9daf7ae5a41 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-e84ac9daf7ae5a41"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-e84ac9daf7ae5a41"
fi
if ! /usr/lib/librsvg/ptest/shapes-97993b9b091d86b4 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/shapes-97993b9b091d86b4"
else
    echo "PASS: /usr/lib/librsvg/ptest/shapes-97993b9b091d86b4"
fi
if ! /usr/lib/librsvg/ptest/text-4cd8f1d2b91408bf 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/text-4cd8f1d2b91408bf"
else
    echo "PASS: /usr/lib/librsvg/ptest/text-4cd8f1d2b91408bf"
fi
exit $rc
