#!/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-7f61a20c110d18f5 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/api-7f61a20c110d18f5"
else
    echo "PASS: /usr/lib/librsvg/ptest/api-7f61a20c110d18f5"
fi
if ! /usr/lib/librsvg/ptest/bugs-b7dcdcd5f150b17d 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/bugs-b7dcdcd5f150b17d"
else
    echo "PASS: /usr/lib/librsvg/ptest/bugs-b7dcdcd5f150b17d"
fi
if ! /usr/lib/librsvg/ptest/errors-4ed3b589858eb93b 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/errors-4ed3b589858eb93b"
else
    echo "PASS: /usr/lib/librsvg/ptest/errors-4ed3b589858eb93b"
fi
if ! /usr/lib/librsvg/ptest/filters-117d0ce5fb280caf 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/filters-117d0ce5fb280caf"
else
    echo "PASS: /usr/lib/librsvg/ptest/filters-117d0ce5fb280caf"
fi
if ! /usr/lib/librsvg/ptest/geometries-fd52ace5f8264493 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/geometries-fd52ace5f8264493"
else
    echo "PASS: /usr/lib/librsvg/ptest/geometries-fd52ace5f8264493"
fi
if ! /usr/lib/librsvg/ptest/intrinsic_dimensions-b73e892e997ec716 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/intrinsic_dimensions-b73e892e997ec716"
else
    echo "PASS: /usr/lib/librsvg/ptest/intrinsic_dimensions-b73e892e997ec716"
fi
if ! /usr/lib/librsvg/ptest/loading_crash-e688c86d814abc47 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_crash-e688c86d814abc47"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_crash-e688c86d814abc47"
fi
if ! /usr/lib/librsvg/ptest/loading_disallowed-8a2d877905000f1b 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_disallowed-8a2d877905000f1b"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_disallowed-8a2d877905000f1b"
fi
if ! /usr/lib/librsvg/ptest/primitive_geometries-6c144d78bf1a7876 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitive_geometries-6c144d78bf1a7876"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitive_geometries-6c144d78bf1a7876"
fi
if ! /usr/lib/librsvg/ptest/primitives-532a93e2a4b0cfa9 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitives-532a93e2a4b0cfa9"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitives-532a93e2a4b0cfa9"
fi
if ! /usr/lib/librsvg/ptest/reference-3de24aa28c73f8db 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/reference-3de24aa28c73f8db"
else
    echo "PASS: /usr/lib/librsvg/ptest/reference-3de24aa28c73f8db"
fi
if ! /usr/lib/librsvg/ptest/render_crash-5bb5cc5e973b03ca 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/render_crash-5bb5cc5e973b03ca"
else
    echo "PASS: /usr/lib/librsvg/ptest/render_crash-5bb5cc5e973b03ca"
fi
if ! /usr/lib/librsvg/ptest/rsvg-7848484766aa001a 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg-7848484766aa001a"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg-7848484766aa001a"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-9ef77a579c167e97 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-9ef77a579c167e97"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-9ef77a579c167e97"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-defe07abd5070c11 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-defe07abd5070c11"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-defe07abd5070c11"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-f877533e2e656417 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-f877533e2e656417"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-f877533e2e656417"
fi
if ! /usr/lib/librsvg/ptest/shapes-e4153afcf39dd052 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/shapes-e4153afcf39dd052"
else
    echo "PASS: /usr/lib/librsvg/ptest/shapes-e4153afcf39dd052"
fi
if ! /usr/lib/librsvg/ptest/text-b86ccd4ce7bfa57d 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/text-b86ccd4ce7bfa57d"
else
    echo "PASS: /usr/lib/librsvg/ptest/text-b86ccd4ce7bfa57d"
fi
exit $rc
