#!/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-4e8424aaba111094 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/api-4e8424aaba111094"
else
    echo "PASS: /usr/lib/librsvg/ptest/api-4e8424aaba111094"
fi
if ! /usr/lib/librsvg/ptest/bugs-60a7773cc71c979a 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/bugs-60a7773cc71c979a"
else
    echo "PASS: /usr/lib/librsvg/ptest/bugs-60a7773cc71c979a"
fi
if ! /usr/lib/librsvg/ptest/errors-1ce7894203e6d4a5 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/errors-1ce7894203e6d4a5"
else
    echo "PASS: /usr/lib/librsvg/ptest/errors-1ce7894203e6d4a5"
fi
if ! /usr/lib/librsvg/ptest/filters-0ee3444dc4b78b59 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/filters-0ee3444dc4b78b59"
else
    echo "PASS: /usr/lib/librsvg/ptest/filters-0ee3444dc4b78b59"
fi
if ! /usr/lib/librsvg/ptest/geometries-014c918b90440649 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/geometries-014c918b90440649"
else
    echo "PASS: /usr/lib/librsvg/ptest/geometries-014c918b90440649"
fi
if ! /usr/lib/librsvg/ptest/intrinsic_dimensions-861d27611785fae4 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/intrinsic_dimensions-861d27611785fae4"
else
    echo "PASS: /usr/lib/librsvg/ptest/intrinsic_dimensions-861d27611785fae4"
fi
if ! /usr/lib/librsvg/ptest/loading_crash-01f9d0e0ccdc0e55 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_crash-01f9d0e0ccdc0e55"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_crash-01f9d0e0ccdc0e55"
fi
if ! /usr/lib/librsvg/ptest/loading_disallowed-f7224c46f9d71b91 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/loading_disallowed-f7224c46f9d71b91"
else
    echo "PASS: /usr/lib/librsvg/ptest/loading_disallowed-f7224c46f9d71b91"
fi
if ! /usr/lib/librsvg/ptest/primitive_geometries-7aca847ddc897c8b 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitive_geometries-7aca847ddc897c8b"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitive_geometries-7aca847ddc897c8b"
fi
if ! /usr/lib/librsvg/ptest/primitives-42e45b801ab6d713 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/primitives-42e45b801ab6d713"
else
    echo "PASS: /usr/lib/librsvg/ptest/primitives-42e45b801ab6d713"
fi
if ! /usr/lib/librsvg/ptest/reference-76f926f15e9b6551 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/reference-76f926f15e9b6551"
else
    echo "PASS: /usr/lib/librsvg/ptest/reference-76f926f15e9b6551"
fi
if ! /usr/lib/librsvg/ptest/render_crash-3755ba9ece08b347 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/render_crash-3755ba9ece08b347"
else
    echo "PASS: /usr/lib/librsvg/ptest/render_crash-3755ba9ece08b347"
fi
if ! /usr/lib/librsvg/ptest/rsvg-769ebba78211e72f 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg-769ebba78211e72f"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg-769ebba78211e72f"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-31ddd9d69d796e6c 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-31ddd9d69d796e6c"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-31ddd9d69d796e6c"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-3587e8430e6d2308 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-3587e8430e6d2308"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-3587e8430e6d2308"
fi
if ! /usr/lib/librsvg/ptest/rsvg_convert-fe8ae22157f7718f 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/rsvg_convert-fe8ae22157f7718f"
else
    echo "PASS: /usr/lib/librsvg/ptest/rsvg_convert-fe8ae22157f7718f"
fi
if ! /usr/lib/librsvg/ptest/shapes-0b7f9c294add463f 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/shapes-0b7f9c294add463f"
else
    echo "PASS: /usr/lib/librsvg/ptest/shapes-0b7f9c294add463f"
fi
if ! /usr/lib/librsvg/ptest/text-ac2c2518b75263aa 
then
    rc=1
    echo "FAIL: /usr/lib/librsvg/ptest/text-ac2c2518b75263aa"
else
    echo "PASS: /usr/lib/librsvg/ptest/text-ac2c2518b75263aa"
fi
exit $rc
