From: Jeronimo Pellegrini
Subject: Automated portability tests?
Date: 
Message-ID: <focfr2$lgb$1@aioe.org>
Hi.

I was wondering if there is some test framework that will allow me
to call different Lisp implementations. That would help a lot to ensure
the portability of libraries.

I have hacked a terribly ugly Perl script for this, but I am really not
happy with it. It works with lisp-unit.

J.

P.S.:An even nicer thing would be a service (via telnet, http, or
whatever) that would run a library's test suite remotely on several
Lisp implementations. You write the library, the tests, make a package,
submit, and get a report -- similar to a build daemon.

[1] The script:

#!/usr/bin/perl -w
#
# Runs a file in several Common Lisp implementations and grep for
# lisp-unit results.
#

use strict;

my $cmd;

# do-tests.lisp loadslisp-unit, the library to be tested, the tests, and
# runs all tests:
my $TEST_FILE="do-tests.lisp";

# detailed output goes here:
my $TEST_RESULTS="test-results.txt";

# customizable:
my @IMPLEMENTATIONS=("GCL_ANSI=1 gclcvs -batch -load $TEST_FILE",
                     "cmucl -batch < $TEST_FILE",
                     "sbcl < $TEST_FILE",
                     "clisp --silent -ansi $TEST_FILE",
                     "/home/jeronimo/pkg/ABCL/j/abcl < $TEST_FILE",
                     "/usr/lib/ecl/ecl-original < $TEST_FILE",
                     "/home/jeronimo/pkg/xcl/x/x < $TEST_FILE",
                     "/home/jeronimo/pkg/poplog/v15.61/pop/v15.61/bin/poplog.sh clisp < $TEST_FILE");

# clean file:
open (RESULTS,">$TEST_RESULTS");
close (RESULTS);

foreach my $lisp (@IMPLEMENTATIONS) {
	# need to open the file all the time so the system($cmd) call
        # below appends in the right order. :-(
        open (RESULTS,">>$TEST_RESULTS");
        print RESULTS  "\n";
        print RESULTS "=====================================\n";
        print RESULTS "Lisp Implementation: $lisp\n";
        print RESULTS "-------------------------------------\n";
        close (RESULTS);
        $cmd = "$lisp >> $TEST_RESULTS";
        print "$cmd \n";
        system($cmd);
}

print "\n\nResults:\n";
$cmd = "grep -E \"Lisp Implementation:|=============|-----------|assertions passed\" $TEST_RESULTS";
system($cmd);

print "\n\nSumarized results:\n";
$cmd = "grep -E \"Lisp Implementation:|=============|-----------|TOTAL.*assertions passed\" $TEST_RESULTS";
system($cmd);

exit 0;