#!/usr/bin/perl
use Cwd;

$cwd = cwd();

my @test_modules = (
    'association.pl',
    'consumertest.pl',
    'servertest.pl',
    'cryptutil.pl',
    'linkparse.pl',   
    'stores.pl',
    );

my $failure = 0;
$perl = $ARGV[0];
$perl = 'perl' if $perl eq '';
for (@test_modules) {
    print "Running test $_...\n";

    $rc = system ($perl, "-Ilib", "t/$_");
    if($rc) {
        print "Failed. ($rc) $!\n";
        $failure = 1;
    }
    else {
        print "Success!\n";
    }
}

exit($failure);
