#!/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-fe718ba668d4cc1b 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/api-fe718ba668d4cc1b"
else
    echo "PASS: /usr/lib/librsvg/ptest/api-fe718ba668d4cc1b"
fi
if ! /usr/lib/librsvg/ptest/bugs-f1a1e93afe1cdedd 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/bugs-f1a1e93afe1cdedd"
else
    echo "PASS: /usr/lib/librsvg/ptest/bugs-f1a1e93afe1cdedd"
fi
if ! /usr/lib/librsvg/ptest/errors-179ca000ee61d5be 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/errors-179ca000ee61d5be"
else
    echo "PASS: /usr/lib/librsvg/ptest/errors-179ca000ee61d5be"
fi
if ! /usr/lib/librsvg/ptest/filters-715e21ffc718a4eb 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/filters-715e21ffc718a4eb"
else
    echo "PASS: /usr/lib/librsvg/ptest/filters-715e21ffc718a4eb"
fi
if ! /usr/lib/librsvg/ptest/geometries-0e77b10328950b9e 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/geometries-0e77b10328950b9e"
else
    echo "PASS: /usr/lib/librsvg/ptest/geometries-0e77b10328950b9e"
fi
if ! /usr/lib/librsvg/ptest/intrinsic_dimensions-71cffe0c57f3d895 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/intrinsic_dimensions-71cffe0c57f3d895"
else
    echo "PASS: /usr/lib/librsvg/ptest/intrinsic_dimensions-71cffe0c57f3d895"
fi
if ! /usr/lib/librsvg/ptest/loading_crash-a650699f3c190cd8 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_crash-a650699f3c190cd8"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_crash-a650699f3c190cd8"
fi
if ! /usr/lib/librsvg/ptest/loading_disallowed-9d374a0be9da0995 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_disallowed-9d374a0be9da0995"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_disallowed-9d374a0be9da0995"
fi
if ! /usr/lib/librsvg/ptest/primitive_geometries-feceb2db958998f7 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitive_geometries-feceb2db958998f7"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitive_geometries-feceb2db958998f7"
fi
if ! /usr/lib/librsvg/ptest/primitives-6041452879461814 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitives-6041452879461814"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitives-6041452879461814"
fi
if ! /usr/lib/librsvg/ptest/reference-19c90df713af0a14 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/reference-19c90df713af0a14"
else
    echo "PASS: /usr/lib/librsvg/ptest/reference-19c90df713af0a14"
fi
if ! /usr/lib/librsvg/ptest/render_crash-86aeabd8f55e430c 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/render_crash-86aeabd8f55e430c"
else
    echo "PASS: /usr/lib/librsvg/ptest/render_crash-86aeabd8f55e430c"
fi
if ! /usr/lib/librsvg/ptest/rsvg-f833a5d8048d80d3 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg-f833a5d8048d80d3"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg-f833a5d8048d80d3"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-199825c285d128bc 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-199825c285d128bc"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-199825c285d128bc"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-89cffd8f7c8bb667 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-89cffd8f7c8bb667"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-89cffd8f7c8bb667"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-909d8b32b571e7ee 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-909d8b32b571e7ee"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-909d8b32b571e7ee"
fi
if ! /usr/lib/librsvg/ptest/shapes-8aacfa52f4946476 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/shapes-8aacfa52f4946476"
else
    echo "PASS: /usr/lib/librsvg/ptest/shapes-8aacfa52f4946476"
fi
if ! /usr/lib/librsvg/ptest/text-dc1b53ea63dfaf84 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/text-dc1b53ea63dfaf84"
else
    echo "PASS: /usr/lib/librsvg/ptest/text-dc1b53ea63dfaf84"
fi
exit $rc
