#!/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/lib64/librsvg/ptest/api-77df5fc404d758f9 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/api-77df5fc404d758f9"
else
    echo "PASS: /usr/lib64/librsvg/ptest/api-77df5fc404d758f9"
fi
if ! /usr/lib64/librsvg/ptest/bugs-afa0ee076716e6ec 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/bugs-afa0ee076716e6ec"
else
    echo "PASS: /usr/lib64/librsvg/ptest/bugs-afa0ee076716e6ec"
fi
if ! /usr/lib64/librsvg/ptest/errors-30a6dc0b54e77cd0 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/errors-30a6dc0b54e77cd0"
else
    echo "PASS: /usr/lib64/librsvg/ptest/errors-30a6dc0b54e77cd0"
fi
if ! /usr/lib64/librsvg/ptest/filters-096c7fe5c1bf7c47 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/filters-096c7fe5c1bf7c47"
else
    echo "PASS: /usr/lib64/librsvg/ptest/filters-096c7fe5c1bf7c47"
fi
if ! /usr/lib64/librsvg/ptest/geometries-7758158ce15eb56f 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/geometries-7758158ce15eb56f"
else
    echo "PASS: /usr/lib64/librsvg/ptest/geometries-7758158ce15eb56f"
fi
if ! /usr/lib64/librsvg/ptest/intrinsic_dimensions-a724f3d2a5091bee 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/intrinsic_dimensions-a724f3d2a5091bee"
else
    echo "PASS: /usr/lib64/librsvg/ptest/intrinsic_dimensions-a724f3d2a5091bee"
fi
if ! /usr/lib64/librsvg/ptest/loading_crash-141436f6a8230135 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/loading_crash-141436f6a8230135"
else
    echo "PASS: /usr/lib64/librsvg/ptest/loading_crash-141436f6a8230135"
fi
if ! /usr/lib64/librsvg/ptest/loading_disallowed-6d02b847ae013a4c 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/loading_disallowed-6d02b847ae013a4c"
else
    echo "PASS: /usr/lib64/librsvg/ptest/loading_disallowed-6d02b847ae013a4c"
fi
if ! /usr/lib64/librsvg/ptest/primitive_geometries-1317e635fd6dfcd9 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/primitive_geometries-1317e635fd6dfcd9"
else
    echo "PASS: /usr/lib64/librsvg/ptest/primitive_geometries-1317e635fd6dfcd9"
fi
if ! /usr/lib64/librsvg/ptest/primitives-dd3b45bd17fdcde2 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/primitives-dd3b45bd17fdcde2"
else
    echo "PASS: /usr/lib64/librsvg/ptest/primitives-dd3b45bd17fdcde2"
fi
if ! /usr/lib64/librsvg/ptest/reference-7648cec0ecb9d064 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/reference-7648cec0ecb9d064"
else
    echo "PASS: /usr/lib64/librsvg/ptest/reference-7648cec0ecb9d064"
fi
if ! /usr/lib64/librsvg/ptest/render_crash-e648b354a64b64cc 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/render_crash-e648b354a64b64cc"
else
    echo "PASS: /usr/lib64/librsvg/ptest/render_crash-e648b354a64b64cc"
fi
if ! /usr/lib64/librsvg/ptest/rsvg-daf32326360a0102 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/rsvg-daf32326360a0102"
else
    echo "PASS: /usr/lib64/librsvg/ptest/rsvg-daf32326360a0102"
fi
if ! /usr/lib64/librsvg/ptest/rsvg_convert-2c41fec09c3c7f8e 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/rsvg_convert-2c41fec09c3c7f8e"
else
    echo "PASS: /usr/lib64/librsvg/ptest/rsvg_convert-2c41fec09c3c7f8e"
fi
if ! /usr/lib64/librsvg/ptest/rsvg_convert-a32eb2900bab6226 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/rsvg_convert-a32eb2900bab6226"
else
    echo "PASS: /usr/lib64/librsvg/ptest/rsvg_convert-a32eb2900bab6226"
fi
if ! /usr/lib64/librsvg/ptest/rsvg_convert-e49c8363082c6aea 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/rsvg_convert-e49c8363082c6aea"
else
    echo "PASS: /usr/lib64/librsvg/ptest/rsvg_convert-e49c8363082c6aea"
fi
if ! /usr/lib64/librsvg/ptest/shapes-2f1173c2cb0dc90c 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/shapes-2f1173c2cb0dc90c"
else
    echo "PASS: /usr/lib64/librsvg/ptest/shapes-2f1173c2cb0dc90c"
fi
if ! /usr/lib64/librsvg/ptest/text-2c4c842abec89e8a 
then
    rc=1
    echo "FAIL: /usr/lib64/librsvg/ptest/text-2c4c842abec89e8a"
else
    echo "PASS: /usr/lib64/librsvg/ptest/text-2c4c842abec89e8a"
fi
exit $rc
