#!/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-e48ab98bcf6e5747 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/api-e48ab98bcf6e5747"
else
    echo "PASS: /usr/lib/librsvg/ptest/api-e48ab98bcf6e5747"
fi
if ! /usr/lib/librsvg/ptest/bugs-03a70acfae4d4d5d 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/bugs-03a70acfae4d4d5d"
else
    echo "PASS: /usr/lib/librsvg/ptest/bugs-03a70acfae4d4d5d"
fi
if ! /usr/lib/librsvg/ptest/errors-2e730e16c6d341c8 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/errors-2e730e16c6d341c8"
else
    echo "PASS: /usr/lib/librsvg/ptest/errors-2e730e16c6d341c8"
fi
if ! /usr/lib/librsvg/ptest/filters-cb59e0c23a02c158 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/filters-cb59e0c23a02c158"
else
    echo "PASS: /usr/lib/librsvg/ptest/filters-cb59e0c23a02c158"
fi
if ! /usr/lib/librsvg/ptest/geometries-063dd0710bc37861 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/geometries-063dd0710bc37861"
else
    echo "PASS: /usr/lib/librsvg/ptest/geometries-063dd0710bc37861"
fi
if ! /usr/lib/librsvg/ptest/intrinsic_dimensions-0812fb01b19e3d20 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/intrinsic_dimensions-0812fb01b19e3d20"
else
    echo "PASS: /usr/lib/librsvg/ptest/intrinsic_dimensions-0812fb01b19e3d20"
fi
if ! /usr/lib/librsvg/ptest/loading_crash-19085bd138735aeb 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_crash-19085bd138735aeb"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_crash-19085bd138735aeb"
fi
if ! /usr/lib/librsvg/ptest/loading_disallowed-8c3a5bb92b796872 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_disallowed-8c3a5bb92b796872"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_disallowed-8c3a5bb92b796872"
fi
if ! /usr/lib/librsvg/ptest/primitive_geometries-416044a3e913a125 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitive_geometries-416044a3e913a125"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitive_geometries-416044a3e913a125"
fi
if ! /usr/lib/librsvg/ptest/primitives-70558c4c14726004 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitives-70558c4c14726004"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitives-70558c4c14726004"
fi
if ! /usr/lib/librsvg/ptest/reference-f16323bd7af3844b 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/reference-f16323bd7af3844b"
else
    echo "PASS: /usr/lib/librsvg/ptest/reference-f16323bd7af3844b"
fi
if ! /usr/lib/librsvg/ptest/render_crash-ebb97034fce2f476 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/render_crash-ebb97034fce2f476"
else
    echo "PASS: /usr/lib/librsvg/ptest/render_crash-ebb97034fce2f476"
fi
if ! /usr/lib/librsvg/ptest/rsvg-251c82d1663deec0 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg-251c82d1663deec0"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg-251c82d1663deec0"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-16b94574f464118f 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-16b94574f464118f"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-16b94574f464118f"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-408f44a513a74bae 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-408f44a513a74bae"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-408f44a513a74bae"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-7cea2bfc17393f7f 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-7cea2bfc17393f7f"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-7cea2bfc17393f7f"
fi
if ! /usr/lib/librsvg/ptest/shapes-e58e545b0fc44b79 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/shapes-e58e545b0fc44b79"
else
    echo "PASS: /usr/lib/librsvg/ptest/shapes-e58e545b0fc44b79"
fi
if ! /usr/lib/librsvg/ptest/text-bbb19888750330f1 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/text-bbb19888750330f1"
else
    echo "PASS: /usr/lib/librsvg/ptest/text-bbb19888750330f1"
fi
exit $rc
