#NOTE the lava_test_shell_action fills in the proper interpreter path
# above during target deployment

shift
ODIR=$1
shift
TEST=$*
export LAVA_RESULT_DIR=${ODIR}
{
	$TEST
	echo $? > ${ODIR}/return_code
} 2>&1 | while read line; do
	echo "$line"
	echo "$line" >> ${ODIR}/stdout.log
done
