#!/bin/sh
# Copyright © 2018-2019 Collabora Ltd
# SPDX-License-Identifier: BSD-3-Clause
# (See debian/copyright)

set -e
set -u

if [ -z "${G_TEST_SRCDIR-}" ]; then
    me="$(readlink -f "$0")"
    G_TEST_SRCDIR="${me%/*}"
fi

cd "$G_TEST_SRCDIR/.."

n=0
for shell_script in \
        tests/*.sh \
        tests/platform/*.t \
        tests/sdk/*.t \
        ; do
    n=$((n + 1))
    if bash -n "$shell_script" >&2; then
        echo "ok $n - $shell_script"
    else
        echo "not ok $n # TODO - $shell_script"
    fi
done

echo "1..$n"
