#!/bin/bash

DIR=$(dirname $0)

tests=( $DIR/unsupported-ops $DIR/invalid-filters $DIR/valid-filters )
exit_code=0

function start_tests ()
{
	for bin in ${tests[@]};
	do
		if [ ! -e $bin ]; then
			echo -e "$bin not found, passing"
			continue
		fi

		./$bin
		# Test must return 0 to pass.
		if [ $? -ne 0 ]; then
			exit_code=1
			break
		fi
	done
}

start_tests

exit $exit_code
