#!/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-95486284c67d24ff 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/api-95486284c67d24ff"
else
    echo "PASS: /usr/lib/librsvg/ptest/api-95486284c67d24ff"
fi
if ! /usr/lib/librsvg/ptest/bugs-dfc008684daeca1b 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/bugs-dfc008684daeca1b"
else
    echo "PASS: /usr/lib/librsvg/ptest/bugs-dfc008684daeca1b"
fi
if ! /usr/lib/librsvg/ptest/errors-c2e064b1e75221ee 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/errors-c2e064b1e75221ee"
else
    echo "PASS: /usr/lib/librsvg/ptest/errors-c2e064b1e75221ee"
fi
if ! /usr/lib/librsvg/ptest/filters-0ac9c7c2254f354a 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/filters-0ac9c7c2254f354a"
else
    echo "PASS: /usr/lib/librsvg/ptest/filters-0ac9c7c2254f354a"
fi
if ! /usr/lib/librsvg/ptest/geometries-ac0ccd5b7582f4cc 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/geometries-ac0ccd5b7582f4cc"
else
    echo "PASS: /usr/lib/librsvg/ptest/geometries-ac0ccd5b7582f4cc"
fi
if ! /usr/lib/librsvg/ptest/intrinsic_dimensions-ed556a9e9db73ed8 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/intrinsic_dimensions-ed556a9e9db73ed8"
else
    echo "PASS: /usr/lib/librsvg/ptest/intrinsic_dimensions-ed556a9e9db73ed8"
fi
if ! /usr/lib/librsvg/ptest/loading_crash-ea2a063109db0154 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_crash-ea2a063109db0154"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_crash-ea2a063109db0154"
fi
if ! /usr/lib/librsvg/ptest/loading_disallowed-e71b31e72fcf45f2 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_disallowed-e71b31e72fcf45f2"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_disallowed-e71b31e72fcf45f2"
fi
if ! /usr/lib/librsvg/ptest/primitive_geometries-86029fabf9e3cccc 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitive_geometries-86029fabf9e3cccc"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitive_geometries-86029fabf9e3cccc"
fi
if ! /usr/lib/librsvg/ptest/primitives-60690acd24d3d8ed 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitives-60690acd24d3d8ed"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitives-60690acd24d3d8ed"
fi
if ! /usr/lib/librsvg/ptest/reference-9eacfad5ae0a6eab 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/reference-9eacfad5ae0a6eab"
else
    echo "PASS: /usr/lib/librsvg/ptest/reference-9eacfad5ae0a6eab"
fi
if ! /usr/lib/librsvg/ptest/render_crash-e3e8794b41aeb052 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/render_crash-e3e8794b41aeb052"
else
    echo "PASS: /usr/lib/librsvg/ptest/render_crash-e3e8794b41aeb052"
fi
if ! /usr/lib/librsvg/ptest/rsvg-acd05302fa66cfe0 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg-acd05302fa66cfe0"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg-acd05302fa66cfe0"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-6e389a6465094122 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-6e389a6465094122"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-6e389a6465094122"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-ce715e05a6fec330 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-ce715e05a6fec330"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-ce715e05a6fec330"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-e2bde8e37124a49b 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-e2bde8e37124a49b"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-e2bde8e37124a49b"
fi
if ! /usr/lib/librsvg/ptest/shapes-9a36f128794a37ed 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/shapes-9a36f128794a37ed"
else
    echo "PASS: /usr/lib/librsvg/ptest/shapes-9a36f128794a37ed"
fi
if ! /usr/lib/librsvg/ptest/text-d6e3186494149443 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/text-d6e3186494149443"
else
    echo "PASS: /usr/lib/librsvg/ptest/text-d6e3186494149443"
fi
exit $rc
