#!/bin/bash

fails=("test_gradingtable_extension_due_date" "test_gradingtable_extension_date_calculation_for_lateness" "test_group_submissions_submit_for_marking")

# Seed random generator
RANDOM=$$$(date +%s)

# Loop loop loop loop loop loop ...
while [ 1 ]
do
    # Get random expression...
    selectedfail=${fails[$RANDOM % ${#fails[*]}]}

    # Write to Shell
    echo -n "."
    echo ./vendor/bin/phpunit --stop-on-failure --filter $selectedfail >> results.log
    ./vendor/bin/phpunit --stop-on-failure --filter $selectedfail >> results.log
done
