#!/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-033a6e33c3ce4daa 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/api-033a6e33c3ce4daa"
else
    echo "PASS: /usr/lib/librsvg/ptest/api-033a6e33c3ce4daa"
fi
if ! /usr/lib/librsvg/ptest/bugs-d665364d9ae07693 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/bugs-d665364d9ae07693"
else
    echo "PASS: /usr/lib/librsvg/ptest/bugs-d665364d9ae07693"
fi
if ! /usr/lib/librsvg/ptest/errors-c9672edaaadf912c 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/errors-c9672edaaadf912c"
else
    echo "PASS: /usr/lib/librsvg/ptest/errors-c9672edaaadf912c"
fi
if ! /usr/lib/librsvg/ptest/filters-5124188768860895 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/filters-5124188768860895"
else
    echo "PASS: /usr/lib/librsvg/ptest/filters-5124188768860895"
fi
if ! /usr/lib/librsvg/ptest/geometries-e60ee5817c0138b2 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/geometries-e60ee5817c0138b2"
else
    echo "PASS: /usr/lib/librsvg/ptest/geometries-e60ee5817c0138b2"
fi
if ! /usr/lib/librsvg/ptest/intrinsic_dimensions-536b7393c5f98653 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/intrinsic_dimensions-536b7393c5f98653"
else
    echo "PASS: /usr/lib/librsvg/ptest/intrinsic_dimensions-536b7393c5f98653"
fi
if ! /usr/lib/librsvg/ptest/loading_crash-b787dddba9aa0373 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_crash-b787dddba9aa0373"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_crash-b787dddba9aa0373"
fi
if ! /usr/lib/librsvg/ptest/loading_disallowed-6b6862c526884a83 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_disallowed-6b6862c526884a83"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_disallowed-6b6862c526884a83"
fi
if ! /usr/lib/librsvg/ptest/primitive_geometries-a7e89d7ac00e68e2 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitive_geometries-a7e89d7ac00e68e2"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitive_geometries-a7e89d7ac00e68e2"
fi
if ! /usr/lib/librsvg/ptest/primitives-ce23d34501b1b6a5 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitives-ce23d34501b1b6a5"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitives-ce23d34501b1b6a5"
fi
if ! /usr/lib/librsvg/ptest/reference-51c070c891cf6881 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/reference-51c070c891cf6881"
else
    echo "PASS: /usr/lib/librsvg/ptest/reference-51c070c891cf6881"
fi
if ! /usr/lib/librsvg/ptest/render_crash-da39380c7d78f22d 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/render_crash-da39380c7d78f22d"
else
    echo "PASS: /usr/lib/librsvg/ptest/render_crash-da39380c7d78f22d"
fi
if ! /usr/lib/librsvg/ptest/rsvg-1c5700202cb76208 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg-1c5700202cb76208"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg-1c5700202cb76208"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-0e1d548d4fedb0be 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-0e1d548d4fedb0be"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-0e1d548d4fedb0be"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-3b142b5a44f5c941 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-3b142b5a44f5c941"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-3b142b5a44f5c941"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-696ff2661b900876 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-696ff2661b900876"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-696ff2661b900876"
fi
if ! /usr/lib/librsvg/ptest/shapes-8a1da150f2c26ae4 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/shapes-8a1da150f2c26ae4"
else
    echo "PASS: /usr/lib/librsvg/ptest/shapes-8a1da150f2c26ae4"
fi
if ! /usr/lib/librsvg/ptest/text-9a7dd74a9bbd4fec 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/text-9a7dd74a9bbd4fec"
else
    echo "PASS: /usr/lib/librsvg/ptest/text-9a7dd74a9bbd4fec"
fi
exit $rc
