#!/bin/sh
set -e

TEST=$1
if [ "x$TEST" = "x" ]; then
  TEST=common
fi

top_dir=`pwd`
for test_dir in tests/$TEST; do
  if [ -d $test_dir ]; then
    echo "running tests in $test_dir"
    cd $test_dir
    ./run_all.sh
    cd $top_dir
  fi
done
