#!/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/primitives-1bf3a1ae2992dff3 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/primitives-1bf3a1ae2992dff3"
else
    echo "PASS: /usr/lib64/librsvg/ptest/primitives-1bf3a1ae2992dff3"
fi
if ! /usr/lib64/librsvg/ptest/errors-2ea556c6710cb8f7 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/errors-2ea556c6710cb8f7"
else
    echo "PASS: /usr/lib64/librsvg/ptest/errors-2ea556c6710cb8f7"
fi
if ! /usr/lib64/librsvg/ptest/loading_crash-3125470a76b184f4 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/loading_crash-3125470a76b184f4"
else
    echo "PASS: /usr/lib64/librsvg/ptest/loading_crash-3125470a76b184f4"
fi
if ! /usr/lib64/librsvg/ptest/loading_disallowed-3db84e704ad278cb 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/loading_disallowed-3db84e704ad278cb"
else
    echo "PASS: /usr/lib64/librsvg/ptest/loading_disallowed-3db84e704ad278cb"
fi
if ! /usr/lib64/librsvg/ptest/rsvg-45b038891846d91b 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/rsvg-45b038891846d91b"
else
    echo "PASS: /usr/lib64/librsvg/ptest/rsvg-45b038891846d91b"
fi
if ! /usr/lib64/librsvg/ptest/filters-5a311aa47ae80418 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/filters-5a311aa47ae80418"
else
    echo "PASS: /usr/lib64/librsvg/ptest/filters-5a311aa47ae80418"
fi
if ! /usr/lib64/librsvg/ptest/text-5f20c62512bd1767 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/text-5f20c62512bd1767"
else
    echo "PASS: /usr/lib64/librsvg/ptest/text-5f20c62512bd1767"
fi
if ! /usr/lib64/librsvg/ptest/intrinsic_dimensions-6886891e04663d11 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/intrinsic_dimensions-6886891e04663d11"
else
    echo "PASS: /usr/lib64/librsvg/ptest/intrinsic_dimensions-6886891e04663d11"
fi
if ! /usr/lib64/librsvg/ptest/api-8df3d669b29998f9 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/api-8df3d669b29998f9"
else
    echo "PASS: /usr/lib64/librsvg/ptest/api-8df3d669b29998f9"
fi
if ! /usr/lib64/librsvg/ptest/geometries-a00a9a79b34ecfbb 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/geometries-a00a9a79b34ecfbb"
else
    echo "PASS: /usr/lib64/librsvg/ptest/geometries-a00a9a79b34ecfbb"
fi
if ! /usr/lib64/librsvg/ptest/bugs-acba641c9d9f7c82 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/bugs-acba641c9d9f7c82"
else
    echo "PASS: /usr/lib64/librsvg/ptest/bugs-acba641c9d9f7c82"
fi
if ! /usr/lib64/librsvg/ptest/primitive_geometries-cbfad989b9684e1f 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/primitive_geometries-cbfad989b9684e1f"
else
    echo "PASS: /usr/lib64/librsvg/ptest/primitive_geometries-cbfad989b9684e1f"
fi
if ! /usr/lib64/librsvg/ptest/reference-cf60c029090e1a47 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/reference-cf60c029090e1a47"
else
    echo "PASS: /usr/lib64/librsvg/ptest/reference-cf60c029090e1a47"
fi
if ! /usr/lib64/librsvg/ptest/render_crash-d4eb1d830b75e7ab 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/render_crash-d4eb1d830b75e7ab"
else
    echo "PASS: /usr/lib64/librsvg/ptest/render_crash-d4eb1d830b75e7ab"
fi
if ! /usr/lib64/librsvg/ptest/shapes-de964fc54c31027a 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/shapes-de964fc54c31027a"
else
    echo "PASS: /usr/lib64/librsvg/ptest/shapes-de964fc54c31027a"
fi
if ! /usr/lib64/librsvg/ptest/rsvg_convert-02458caf7643b7ee 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/rsvg_convert-02458caf7643b7ee"
else
    echo "PASS: /usr/lib64/librsvg/ptest/rsvg_convert-02458caf7643b7ee"
fi
if ! /usr/lib64/librsvg/ptest/rsvg_convert-b8dedc5899922413 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/rsvg_convert-b8dedc5899922413"
else
    echo "PASS: /usr/lib64/librsvg/ptest/rsvg_convert-b8dedc5899922413"
fi
if ! /usr/lib64/librsvg/ptest/rsvg_convert-f0e8a687122d4872 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/rsvg_convert-f0e8a687122d4872"
else
    echo "PASS: /usr/lib64/librsvg/ptest/rsvg_convert-f0e8a687122d4872"
fi
exit $rc
