#!/bin/sh

[ -n "$srcdir" ] || srcdir=$(pwd)
[ -n "$bindir" ] || bindir=$(dirname $(pwd))
PATH=$bindir:$PATH

run_applet_testcase ()
{
	local applet=$1
	local testcase=$2

	local status=0
	local RES=

	local uc_applet=$(echo $applet | tr a-z A-Z)
	local testname=$(basename $testcase)

	if grep -q "^# CONFIG_${uc_applet} is not set$" $bindir/.config; then
		echo UNTESTED: $testname
		return 0
	fi

	if grep -q "^# FEATURE: " $testcase; then
		local feature=`sed -ne 's/^# FEATURE: //p' $testcase`

		if grep -q "^# ${feature} is not set$" $bindir/.config; then
			echo UNTESTED: $testname
			return 0
		fi
	fi

	rm -rf tmp
	mkdir -p tmp
	pushd tmp >/dev/null

	d=$srcdir sh -x -e $testcase >.logfile.txt 2>&1

	if [ $? != 0 ] ; then
		echo FAIL: $testname
		if [ $verbose -gt 0 ]; then
			cat .logfile.txt
			#exit 1;
		fi;
		status=$?
	else
		echo PASS: $testname
		rm -f .logfile.txt
		status=$?
	fi

	popd >/dev/null
	rm -rf tmp

	return $status
}

run_applet_tests ()
{
	local applet=$1

	local status=0

	for testcase in $srcdir/$applet/*; do
		if [ "$testcase" = "$srcdir/$applet/CVS" ]; then
			continue
		fi

		if run_applet_testcase $applet $testcase; then
			:
		else
			status=1
		fi
	done

	return $status
}


status=0
verbose=0

if [ x"$1" = x"-v" ]; then
	verbose=1
	export VERBOSE=$verbose
	shift
fi

if [ $# -ne 0 ]; then
	applets=$(cd $srcdir ; for i in $@; do ls ${i}* ; done)
else
	applets=$(ls $srcdir)
fi

# Set up option flags so tests can be selective.

configfile=${bindir:-../../}/.config
export OPTIONFLAGS=:$(echo $(sed -nr 's/^CONFIG_(.*)=.*/\1/p' $configfile) | sed 's/ /:/')

for applet in $applets; do
	if [ "$applet" = "links" ]; then continue; fi
	if [ "$applet" != "CVS" -a -d "$srcdir/$applet" ]; then
		if run_applet_tests $applet; then
			:
		else
			status=1
		fi
	fi

	# Is this a new-style test?
	applet=$(echo "$applet" | sed -n 's/\.tests$//p')
	if [ ${#applet} -ne 0 ]
	then
		appcfg=`grep -i "^# CONFIG_$applet" $configfile`
		if [ -n "$appcfg" ]
		then
			echo "SKIPPED: $applet (is configured out)"
			continue
		fi
		# Setup environment for test.
		if [ -d links ]; then
			rm -f links/"$applet" 
		else
			mkdir links 2> /dev/null
		fi
		ln -s ${bindir:-../..}/busybox links/"$applet"
		PATH="$srcdir:$PATH" COMMAND="links/$applet" \
			"${srcdir:-.}/$applet".tests
		if [ $? -ne 0 ]; then status=1; fi
	fi

done
rm -f links/*
rmdir links
exit $status
