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