#!/bin/bash

# ################### #
# Run all test suites #
# ################### #

JVM=java
TEST=org.junit.runner.JUnitCore

# Loop over all data structure directories and run their tests

for dir in $(ls -d */); do
  dirFile=${dir%%/*} # Remove end slash from dir
  echo "======================="
  echo "*** Testing: $dirFile ***"
  echo "======================="
  testSuffix="Test"
  testFile="$dirFile$testSuffix"
  cd $dir && $JVM $TEST $testFile && cd ..
done

#!/bin/bash

# ################### #
# Run all test suites #
# ################### #

JVM=java
TEST=org.junit.runner.JUnitCore
testSuffix="Test"

for dir in $(ls -d */); do
  dirFile=${dir%%/*} # Remove end slash from dir
  echo "======================="
  echo "*** Testing: $dirFile ***"
  echo "======================="
  testFile="$dirFile$testSuffix"
  cd $dir && $JVC *.java && $JVM $TEST $testFile && cd ..
done

Recompile all tests and class files in global test script.
Recompile all tests and class files in global test script.
