Skip to content
Snippets Groups Projects
Commit a01eb723 authored by Simon McVittie's avatar Simon McVittie
Browse files

tests: Adjust QA checks for per-directory meson.build


Now that G_TEST_SRCDIR is what Autotools would call
"${top_srcdir}/tests/", we need to look one level up for the root of
the source tree.

Fixes: 09925ab2 "build: Split into subdirectories"
Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 008d38ed
No related branches found
No related tags found
No related merge requests found
......@@ -28,20 +28,19 @@ set -u
if [ -z "${G_TEST_SRCDIR-}" ]; then
me="$(readlink -f "$0")"
srcdir="${me%/*}"
G_TEST_SRCDIR="${srcdir%/*}"
G_TEST_SRCDIR="${me%/*}"
fi
cd "$G_TEST_SRCDIR"
cd "$G_TEST_SRCDIR/.."
export MYPYPATH="${PYTHONPATH:="$(pwd)"}"
i=0
for script in \
"${G_TEST_SRCDIR}"/*.py \
"${G_TEST_SRCDIR}"/pressure-vessel-test-ui \
"${G_TEST_SRCDIR}"/sysroot/*.py \
"${G_TEST_SRCDIR}"/tests/*.py \
./*.py \
./pressure-vessel-test-ui \
./sysroot/*.py \
./tests/*.py \
; do
i=$((i + 1))
if [ "x${MYPY:="$(command -v mypy || echo false)"}" = xfalse ]; then
......
......@@ -28,11 +28,10 @@ set -u
if [ -z "${G_TEST_SRCDIR-}" ]; then
me="$(readlink -f "$0")"
srcdir="${me%/*}"
G_TEST_SRCDIR="${srcdir%/*}"
G_TEST_SRCDIR="${me%/*}"
fi
cd "$G_TEST_SRCDIR"
cd "$G_TEST_SRCDIR/.."
if [ "x${PYCODESTYLE:=pycodestyle}" = xfalse ] || \
[ -z "$(command -v "$PYCODESTYLE")" ]; then
......@@ -48,10 +47,10 @@ echo "1..1"
if "${PYCODESTYLE}" \
--ignore=E402,W503 \
"$G_TEST_SRCDIR"/*.py \
"${G_TEST_SRCDIR}"/pressure-vessel-test-ui \
"${G_TEST_SRCDIR}"/sysroot/*.py \
"${G_TEST_SRCDIR}"/tests/*.py \
./*.py \
./pressure-vessel-test-ui \
./sysroot/*.py \
./tests/*.py \
>&2; then
echo "ok 1 - $PYCODESTYLE reported no issues"
else
......
......@@ -28,20 +28,19 @@ set -u
if [ -z "${G_TEST_SRCDIR-}" ]; then
me="$(readlink -f "$0")"
srcdir="${me%/*}"
G_TEST_SRCDIR="${srcdir%/*}"
G_TEST_SRCDIR="${me%/*}"
fi
cd "$G_TEST_SRCDIR"
cd "$G_TEST_SRCDIR/.."
if [ "x${PYFLAKES:=pyflakes3}" = xfalse ] || \
[ -z "$(command -v "$PYFLAKES")" ]; then
echo "1..0 # SKIP pyflakes3 not found"
elif "${PYFLAKES}" \
"${G_TEST_SRCDIR}"/*.py \
"${G_TEST_SRCDIR}"/pressure-vessel-test-ui \
"${G_TEST_SRCDIR}"/sysroot/*.py \
"${G_TEST_SRCDIR}"/tests/*.py \
./*.py \
./pressure-vessel-test-ui \
./sysroot/*.py \
./tests/*.py \
>&2; then
echo "1..1"
echo "ok 1 - $PYFLAKES reported no issues"
......
......@@ -28,19 +28,18 @@ fi
if [ -z "${G_TEST_SRCDIR-}" ]; then
me="$(readlink -f "$0")"
srcdir="${me%/*}"
G_TEST_SRCDIR="${srcdir%/*}"
G_TEST_SRCDIR="${me%/*}"
fi
cd "$G_TEST_SRCDIR"
cd "$G_TEST_SRCDIR/.."
n=0
for shell_script in \
pressure-vessel-unruntime \
pressure-vessel-unruntime-scout \
pressure-vessel-unruntime-test-ui \
pressure-vessel-locale-gen \
tests/*.sh \
./pressure-vessel-unruntime \
./pressure-vessel-unruntime-scout \
./pressure-vessel-unruntime-test-ui \
./pressure-vessel-locale-gen \
./tests/*.sh \
; do
n=$((n + 1))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment