#!/usr/bin/perl
# Perform all regression tests
# Part of "NRG Ljubljana".
# Rok Zitko, rok.zitko@ijs.si, Mar 2007
# $Id$

use warnings;
use strict;

my @dirs = qw(d1 d1cos d1dmft d2 d2cos two1 s1);

my $passed = 0;
my $failed = 0;
my $untested = 0;

while (@dirs) {
    my $dir = pop(@dirs);
    print "Testing $dir\n";
    if (-e "$dir/Makefile") {
	my $ret = system("cd $dir ; make test");
	print "ret=$ret\n";
	if ($ret == 0) {
	    $passed += 1;
	} else {
	    $failed += 1;
	}
    } else {
	$untested += 1;
    }
}

print "$passed passed, $failed failed, $untested untested.\n";
