#!/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-9ae213b27364771f 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/api-9ae213b27364771f"
else
    echo "PASS: /usr/lib/librsvg/ptest/api-9ae213b27364771f"
fi
if ! /usr/lib/librsvg/ptest/bugs-d1588bf1eaecdc36 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/bugs-d1588bf1eaecdc36"
else
    echo "PASS: /usr/lib/librsvg/ptest/bugs-d1588bf1eaecdc36"
fi
if ! /usr/lib/librsvg/ptest/errors-0aafb3295e125042 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/errors-0aafb3295e125042"
else
    echo "PASS: /usr/lib/librsvg/ptest/errors-0aafb3295e125042"
fi
if ! /usr/lib/librsvg/ptest/filters-8f8645f8f68e77aa 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/filters-8f8645f8f68e77aa"
else
    echo "PASS: /usr/lib/librsvg/ptest/filters-8f8645f8f68e77aa"
fi
if ! /usr/lib/librsvg/ptest/geometries-664b63094f70cb2c 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/geometries-664b63094f70cb2c"
else
    echo "PASS: /usr/lib/librsvg/ptest/geometries-664b63094f70cb2c"
fi
if ! /usr/lib/librsvg/ptest/intrinsic_dimensions-478a5dd637bbb7a4 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/intrinsic_dimensions-478a5dd637bbb7a4"
else
    echo "PASS: /usr/lib/librsvg/ptest/intrinsic_dimensions-478a5dd637bbb7a4"
fi
if ! /usr/lib/librsvg/ptest/loading_crash-1b100bbdef6d9637 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_crash-1b100bbdef6d9637"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_crash-1b100bbdef6d9637"
fi
if ! /usr/lib/librsvg/ptest/loading_disallowed-3b23dbf3b890af12 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_disallowed-3b23dbf3b890af12"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_disallowed-3b23dbf3b890af12"
fi
if ! /usr/lib/librsvg/ptest/primitive_geometries-74987e100d1b08f7 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitive_geometries-74987e100d1b08f7"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitive_geometries-74987e100d1b08f7"
fi
if ! /usr/lib/librsvg/ptest/primitives-1f15f5c59cf3971c 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitives-1f15f5c59cf3971c"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitives-1f15f5c59cf3971c"
fi
if ! /usr/lib/librsvg/ptest/reference-e5aa402df77345b6 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/reference-e5aa402df77345b6"
else
    echo "PASS: /usr/lib/librsvg/ptest/reference-e5aa402df77345b6"
fi
if ! /usr/lib/librsvg/ptest/render_crash-99ab3b5fe35bf031 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/render_crash-99ab3b5fe35bf031"
else
    echo "PASS: /usr/lib/librsvg/ptest/render_crash-99ab3b5fe35bf031"
fi
if ! /usr/lib/librsvg/ptest/rsvg-7702d32cc1699382 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg-7702d32cc1699382"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg-7702d32cc1699382"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-46fcdbd63dc9a0c8 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-46fcdbd63dc9a0c8"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-46fcdbd63dc9a0c8"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-4df5efac4ae42d09 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-4df5efac4ae42d09"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-4df5efac4ae42d09"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-b43221106446fa59 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-b43221106446fa59"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-b43221106446fa59"
fi
if ! /usr/lib/librsvg/ptest/shapes-e314ab1cc38c9ee9 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/shapes-e314ab1cc38c9ee9"
else
    echo "PASS: /usr/lib/librsvg/ptest/shapes-e314ab1cc38c9ee9"
fi
if ! /usr/lib/librsvg/ptest/text-41e93baa79b0ff7d 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/text-41e93baa79b0ff7d"
else
    echo "PASS: /usr/lib/librsvg/ptest/text-41e93baa79b0ff7d"
fi
exit $rc
