#!/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-e23c54d67354869f 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/api-e23c54d67354869f"
else
    echo "PASS: /usr/lib/librsvg/ptest/api-e23c54d67354869f"
fi
if ! /usr/lib/librsvg/ptest/bugs-8db8f117995b6eb8 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/bugs-8db8f117995b6eb8"
else
    echo "PASS: /usr/lib/librsvg/ptest/bugs-8db8f117995b6eb8"
fi
if ! /usr/lib/librsvg/ptest/errors-d5873db5445e70ce 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/errors-d5873db5445e70ce"
else
    echo "PASS: /usr/lib/librsvg/ptest/errors-d5873db5445e70ce"
fi
if ! /usr/lib/librsvg/ptest/filters-4385fd1797e0de01 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/filters-4385fd1797e0de01"
else
    echo "PASS: /usr/lib/librsvg/ptest/filters-4385fd1797e0de01"
fi
if ! /usr/lib/librsvg/ptest/geometries-2fb65abc4e0cacef 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/geometries-2fb65abc4e0cacef"
else
    echo "PASS: /usr/lib/librsvg/ptest/geometries-2fb65abc4e0cacef"
fi
if ! /usr/lib/librsvg/ptest/intrinsic_dimensions-b24986f69e655176 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/intrinsic_dimensions-b24986f69e655176"
else
    echo "PASS: /usr/lib/librsvg/ptest/intrinsic_dimensions-b24986f69e655176"
fi
if ! /usr/lib/librsvg/ptest/loading_crash-c8585bae387a55f7 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_crash-c8585bae387a55f7"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_crash-c8585bae387a55f7"
fi
if ! /usr/lib/librsvg/ptest/loading_disallowed-7cd4651b05715ed8 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_disallowed-7cd4651b05715ed8"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_disallowed-7cd4651b05715ed8"
fi
if ! /usr/lib/librsvg/ptest/primitive_geometries-0a740a50ea8932a6 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitive_geometries-0a740a50ea8932a6"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitive_geometries-0a740a50ea8932a6"
fi
if ! /usr/lib/librsvg/ptest/primitives-36fa6d860f626ed9 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitives-36fa6d860f626ed9"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitives-36fa6d860f626ed9"
fi
if ! /usr/lib/librsvg/ptest/reference-180d56acb2851e4c 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/reference-180d56acb2851e4c"
else
    echo "PASS: /usr/lib/librsvg/ptest/reference-180d56acb2851e4c"
fi
if ! /usr/lib/librsvg/ptest/render_crash-fcd40e5c59a1f2e9 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/render_crash-fcd40e5c59a1f2e9"
else
    echo "PASS: /usr/lib/librsvg/ptest/render_crash-fcd40e5c59a1f2e9"
fi
if ! /usr/lib/librsvg/ptest/rsvg-36404380bf15ae86 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg-36404380bf15ae86"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg-36404380bf15ae86"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-17791045667bd186 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-17791045667bd186"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-17791045667bd186"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-a10f0438ae4022d7 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-a10f0438ae4022d7"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-a10f0438ae4022d7"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-cbd1d46c324ba8dc 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-cbd1d46c324ba8dc"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-cbd1d46c324ba8dc"
fi
if ! /usr/lib/librsvg/ptest/shapes-b1bdfe157759768b 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/shapes-b1bdfe157759768b"
else
    echo "PASS: /usr/lib/librsvg/ptest/shapes-b1bdfe157759768b"
fi
if ! /usr/lib/librsvg/ptest/text-af826b98901ed7b2 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/text-af826b98901ed7b2"
else
    echo "PASS: /usr/lib/librsvg/ptest/text-af826b98901ed7b2"
fi
exit $rc
