xref: /OK3568_Linux_fs/yocto/meta-openembedded/meta-oe/recipes-support/libgpiod/files/run-ptest (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1#!/bin/sh
2
3testbins="gpiod-test gpio-tools-test gpiod-cxx-test gpiod_py_test.py"
4
5ptestdir=$(dirname "$(readlink -f "$0")")
6cd $ptestdir/tests
7
8for testbin in $testbins; do
9	if test -e ./$testbin; then
10		./$testbin > ./$testbin.out 2>&1
11		if [ $? -ne 0 ]; then
12			echo "FAIL: $testbin"
13		else
14			echo "PASS: $testbin"
15		fi
16	else
17		echo "SKIP: $testbin"
18	fi
19done
20