#!/bin/sh

# ptest-cargo appends the test binary invocations to this script.
# The integration tests run hyperfine from the tests/ directory and
# compare its output against the insta snapshots installed there.
cd "$(dirname "$0")"
export INSTA_UPDATE=no

echo ""
echo "## starting to run rust tests ##"
if [ -z "$rc" ]; then rc=0; fi
if ! /usr/lib/hyperfine/ptest/integration_tests-08c02fbe20ee3fd1 
then
    rc=1
    echo "FAIL: /usr/lib/hyperfine/ptest/integration_tests-08c02fbe20ee3fd1"
else
    echo "PASS: /usr/lib/hyperfine/ptest/integration_tests-08c02fbe20ee3fd1"
fi
if ! /usr/lib/hyperfine/ptest/common-60a5ea275844c6da 
then
    rc=1
    echo "FAIL: /usr/lib/hyperfine/ptest/common-60a5ea275844c6da"
else
    echo "PASS: /usr/lib/hyperfine/ptest/common-60a5ea275844c6da"
fi
if ! /usr/lib/hyperfine/ptest/hyperfine-bd2a8c6de78cdda0 
then
    rc=1
    echo "FAIL: /usr/lib/hyperfine/ptest/hyperfine-bd2a8c6de78cdda0"
else
    echo "PASS: /usr/lib/hyperfine/ptest/hyperfine-bd2a8c6de78cdda0"
fi
if ! /usr/lib/hyperfine/ptest/execution_order_tests-c0bc3fff8e10f8bf 
then
    rc=1
    echo "FAIL: /usr/lib/hyperfine/ptest/execution_order_tests-c0bc3fff8e10f8bf"
else
    echo "PASS: /usr/lib/hyperfine/ptest/execution_order_tests-c0bc3fff8e10f8bf"
fi
exit $rc
