#!/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-e192b3dc546facd2 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/api-e192b3dc546facd2"
else
    echo "PASS: /usr/lib/librsvg/ptest/api-e192b3dc546facd2"
fi
if ! /usr/lib/librsvg/ptest/bugs-83107ea0835a8acc 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/bugs-83107ea0835a8acc"
else
    echo "PASS: /usr/lib/librsvg/ptest/bugs-83107ea0835a8acc"
fi
if ! /usr/lib/librsvg/ptest/errors-62e399160131a019 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/errors-62e399160131a019"
else
    echo "PASS: /usr/lib/librsvg/ptest/errors-62e399160131a019"
fi
if ! /usr/lib/librsvg/ptest/filters-b5ab4deed13afec2 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/filters-b5ab4deed13afec2"
else
    echo "PASS: /usr/lib/librsvg/ptest/filters-b5ab4deed13afec2"
fi
if ! /usr/lib/librsvg/ptest/geometries-1e6f1d1bff62c7ed 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/geometries-1e6f1d1bff62c7ed"
else
    echo "PASS: /usr/lib/librsvg/ptest/geometries-1e6f1d1bff62c7ed"
fi
if ! /usr/lib/librsvg/ptest/intrinsic_dimensions-052dc0bd7def3147 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/intrinsic_dimensions-052dc0bd7def3147"
else
    echo "PASS: /usr/lib/librsvg/ptest/intrinsic_dimensions-052dc0bd7def3147"
fi
if ! /usr/lib/librsvg/ptest/loading_crash-7f47d6477bb479d8 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_crash-7f47d6477bb479d8"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_crash-7f47d6477bb479d8"
fi
if ! /usr/lib/librsvg/ptest/loading_disallowed-a86129b722b54f4f 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_disallowed-a86129b722b54f4f"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_disallowed-a86129b722b54f4f"
fi
if ! /usr/lib/librsvg/ptest/primitive_geometries-4cd0b9d8d5d6f288 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitive_geometries-4cd0b9d8d5d6f288"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitive_geometries-4cd0b9d8d5d6f288"
fi
if ! /usr/lib/librsvg/ptest/primitives-c4d8708a7512a19b 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitives-c4d8708a7512a19b"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitives-c4d8708a7512a19b"
fi
if ! /usr/lib/librsvg/ptest/reference-1407a9bf60444fa3 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/reference-1407a9bf60444fa3"
else
    echo "PASS: /usr/lib/librsvg/ptest/reference-1407a9bf60444fa3"
fi
if ! /usr/lib/librsvg/ptest/render_crash-45afd4e2b96828cd 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/render_crash-45afd4e2b96828cd"
else
    echo "PASS: /usr/lib/librsvg/ptest/render_crash-45afd4e2b96828cd"
fi
if ! /usr/lib/librsvg/ptest/rsvg-e28a86360475104c 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg-e28a86360475104c"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg-e28a86360475104c"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-3345b8831fe8fc26 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-3345b8831fe8fc26"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-3345b8831fe8fc26"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-3d7789fdb78f23ca 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-3d7789fdb78f23ca"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-3d7789fdb78f23ca"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-b790d90e32722520 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-b790d90e32722520"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-b790d90e32722520"
fi
if ! /usr/lib/librsvg/ptest/shapes-92d200b38366c019 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/shapes-92d200b38366c019"
else
    echo "PASS: /usr/lib/librsvg/ptest/shapes-92d200b38366c019"
fi
if ! /usr/lib/librsvg/ptest/text-07b388f591a5748a 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/text-07b388f591a5748a"
else
    echo "PASS: /usr/lib/librsvg/ptest/text-07b388f591a5748a"
fi
exit $rc
