181
if ! type "$command" ; then
227
if ! type "$command" > /dev/null ; then
182
228
echo "lisp implementation not found: $command" >&2
186
ASDFDIR="$(cd .. ; /bin/pwd)"
187
export CL_SOURCE_REGISTRY="${ASDFDIR}"
188
export ASDF_OUTPUT_TRANSLATIONS="(:output-translations (\"${ASDFDIR}\" (\"${ASDFDIR}/tmp/fasls\" :implementation)) :ignore-inherited-configuration)"
232
ASDFDIR="$(cd $(dirname $0)/.. ; /bin/pwd)"
191
command="$command $flags"
234
cmd="$command $flags"
192
236
if [ -z "${DEBUG_ASDF_TEST}" ] ; then
193
command="$command $nodebug"
197
241
create_config () {
198
mkdir -p ../tmp/test-source-registry-conf.d ../tmp/test-asdf-output-translations-conf.d
243
mkdir -p build/results/ build/test-source-registry-conf.d build/test-asdf-output-translations-conf.d
246
if [ -n "$ASDF_UPGRADE_TEST_TAGS" ] ; then
247
echo $ASDF_UPGRADE_TEST_TAGS ; return
249
# REQUIRE is a magic tag meaning whatever your implementation provides, if anything
251
# 1.85 (2004-05-16) is the last release by Daniel Barlow (not 1.37, which is the README revision!)
252
# 1.97 (2006-05-14) is the last release before Gary King takes over
253
# 1.369 (2009-10-27) is the last release by Gary King
255
# 2.000 to 2.019 and 2.20 to 2.26 and beyond are Faré's "stable" ASDF 2 releases
256
# 2.26.61 is the last single-file, single-package ASDF.
257
# 2.27 and beyond are Faré's "stable" ASDF 3 pre-releases
259
# 2.000 (2010-05-31) was the first ASDF 2 release
260
# 2.008 (2010-09-10) was a somewhat stable ASDF 2 release
261
# 2.011 (2010-11-28) was used by CLISP 2.49, Debian squeeze, Ubuntu 10.04 LTS
262
# 2.014.6 (2011-04-06) was used by Quicklisp in 2011
263
# 2.019 (2011-11-27) was stable
264
# 2.20 (2012-01-18) was in CCL 1.8, Ubuntu 12.04 LTS
265
# 2.22 (2012-06-12) was used by debian wheezy
266
# 2.26 (2012-10-30) was used by Quicklisp
267
# 2.27 (2013-02-01) is the first ASDF 3 pre-release
268
# 2.32 (2013-03-05) is the first really stable ASDF 3 pre-release
270
echo REQUIRE 1.85 1.97 1.369
273
echo 2.000 2.008 2.011 2.014.6 2.019 2.20 2.22 2.26
275
git tag -l '2.3[2-9]'
278
if [ -n "$ASDF_UPGRADE_TEST_METHODS" ] ; then
279
echo $ASDF_UPGRADE_TEST_METHODS ; return
282
'load-asdf-lisp'load-asdf-lisp-clean
283
'load-asdf-lisp'load-asdf-system
284
'load-asdf-lisp'compile-load-asdf
285
'load-asdf-lisp'load-asdf-fasl
287
'load-asdf-lisp-and-test-uiop'load-asdf-fasl
290
extract_tagged_asdf () {
294
if [ REQUIRE = "$tag" ] ; then return 0 ; fi
295
file=build/asdf-${tag}.lisp ;
296
if [ ! -f $file ] ; then
298
1.*|2.0*|2.2[0-6]|2.26.61)
299
git show ${tag}:asdf.lisp > $file ;;
300
2.2[7-9]*|2.[3-9]*|3.*)
301
mkdir -p build/old/build
302
git archive ${tag} | (cd build/old/ ; tar xf -)
304
mv build/old/build/asdf.lisp build/asdf-${tag}.lisp
307
echo "Don't know how to extract asdf.lisp for version $tag"
313
extract_all_tagged_asdf () {
314
for i in `upgrade_tags` ; do
315
extract_tagged_asdf $i
318
valid_upgrade_test_p () {
319
case "${1}:${2}:${3}" in
320
# It's damn slow. Also, for some reason, we punt on anything earlier than 2.25,
321
# and only need to test it once, below for 2.24.
322
abcl:1.*|abcl:2.00[0-9]:*|abcl:201[0-9]:*|abcl:2.2[0-3]:*) : ;;
323
# Skip allegro modern on 1.x -- fails for rpgoldman on his mac (!)
324
allegromodern:1.*) : ;;
325
# ccl fasl numbering broke loading of old asdf 2.0
327
# my old ubuntu clisp 2.44.1 is wired in
328
# with an antique ASDF 1.374 from CLC that can't be downgraded.
329
# 2.00[0-7] use UID, which fails on that CLISP and was removed afterwards.
330
# Note that for the longest time, CLISP has included 2.011 in its distribution.
331
# Since we punt on the upgrade, let's only do the test once, for 2.26.
332
clisp:2.00[0-7]:*|clisp:1.*|clisp:2.0[01]*|clisp:2.2[0-5]:*) : ;;
333
# Skip, CMUCL has problems before 2.014.7 due to source-registry upgrade.
334
# Weird unidentified problems before 2.018, so we punt equally for everything before,
335
# and only need to test it once: above, for 2.017.
336
cmucl:1.*|cmucl:2.00*|cmucl:2.01[0-6]:*) : ;;
337
# Skip many ECL tests, for various ASDF issues
338
ecl*:1.*|ecl*:2.0[01]*|ecl*:2.20:*) : ;;
339
# GCL 2.6 is only supported with ASDF 2.27, so skip earlier versions
340
gcl:1.*|gcl:2.0*|gcl:2.2[0-6]*) : ;;
341
# MKCL is only supported starting with 2.24, so skip earlier versions
342
mkcl:1.*|mkcl:2.0[01]*|mkcl:2.2[0-3]:*) : ;;
343
# XCL support starts with ASDF 2.014.2
344
# — It also dies during upgrade trying to show the backtrace.
345
xcl:1.*|xcl:2.00*|xcl:2.01[0-4]:*|xcl:*) : ;;
350
run_upgrade_tests () {
352
mkdir -p build/results/
353
rm -f build/*.*f* uiop/*.*f* test/*.*f* ## Remove stale FASLs from ASDF 1.x, especially when different implementations have same name
354
ASDF_OUTPUT_TRANSLATIONS="(:output-translations (\"${ASDFDIR}\" (\"${ASDFDIR}/build/fasls/\" :implementation \"asdf/\")) (t (\"${ASDFDIR}/build/fasls/\" :implementation \"root/\")) :ignore-inherited-configuration)"
355
su=test/script-support.lisp
356
for tag in `upgrade_tags` ; do
357
for method in `upgrade_methods` ; do
358
if valid_upgrade_test_p $lisp $tag $method ; then
359
echo "Testing ASDF upgrade from ${tag} using method $method"
360
extract_tagged_asdf $tag
362
"'(#.(load\"$su\")#.(in-package :asdf-test)#.(test-upgrade $method \"$tag\"))" ||
363
{ echo "upgrade FAILED for $lisp from $tag using method $method" ;
364
echo "you can retry just that test with:" ;
365
echo ASDF_UPGRADE_TEST_TAGS=\"$tag\" ASDF_UPGRADE_TEST_METHODS=\"$method\" ./test/run-tests.sh -u $lisp ;
366
echo "or more interactively (and maybe with rlwrap or in emacs), start with:"
368
echo "then copy/paste:"
369
echo "(load\"$su\") (asdf-test::da) (test-upgrade $method \"$tag\")"
371
fi ; done ; done 2>&1 | tee build/results/${lisp}-upgrade.text
376
echo failure > ../build/results/status
377
thedate=`date "+%Y-%m-%d"`
378
do_tests "$@" 2>&1 | \
379
tee "../build/results/${lisp}.text" "../build/results/${lisp}-${thedate}.save"
380
read a < ../build/results/status
382
if [ success = "$a" ] ; then ## exit code
385
echo "To view full results and failures, try the following command:" >&2
386
echo " less -p ABORTED build/results/${lisp}.text" >&2
202
rm -rf ../tmp/test-source-registry-conf.d ../tmp/test-asdf-output-translations-conf.d
391
rm -rf ../build/test-source-registry-conf.d ../build/test-asdf-output-translations-conf.d
395
gcl|cmucl) return 0 ;; # These are hopeless
398
mkdir -p build/results/
399
nop=build/results/${lisp}-nop.text
400
load=build/results/${lisp}-load.text
402
'(or #.(load "test/script-support.lisp" :verbose nil :print nil) #.(asdf-test::exit-lisp 0))' \
405
'(or #.(load "test/script-support.lisp" :verbose nil :print nil) #.(asdf-test::verbose nil) #.(load "build/asdf.lisp" :verbose nil) #.(asdf/image:quit 0))' \
407
if diff $nop $load ; then
408
echo "GOOD: Loading ASDF on $lisp produces no message" >&2 ; return 0
410
echo "BAD: Loading ASDF on $lisp produces messages" >&2 ; return 1
413
test_load_systems () {
415
gcl) return 0 ;; # This one is hopeless
418
mkdir -p build/results/
419
echo "Loading all these systems: $*"
421
"(or #.(load \"test/script-support.lisp\") #.(asdf-test::with-test () (asdf-test::test-load-systems $*)))" \
422
2>&1 | tee build/results/${lisp}-systems.text
424
test_interactively () {
426
mkdir -p build/results/
427
rlwrap $cmd $eval "(or #.(load \"test/script-support.lisp\") #.(asdf-test::interactive-test '($*)))"
205
if [ -z "$command" ] ; then
430
if [ -z "$cmd" ] ; then
206
431
echo "Error: cannot find or do not know how to run Lisp named $lisp"
432
elif [ -n "$test_interactively" ] ; then
433
test_interactively "$@"
434
elif [ -n "$clean_load" ] ; then
436
elif [ -n "$load_systems" ] ; then
437
test_load_systems "$@"
438
elif [ -n "$upgrade" ] ; then
440
elif [ -n "$extract_all" ] ; then
441
extract_all_tagged_asdf
209
mkdir -p ../tmp/results
210
echo failure > ../tmp/results/status
211
thedate=`date "+%Y-%m-%d"`
212
do_tests "$command" "$eval" 2>&1 | \
213
tee "../tmp/results/${lisp}.text" "../tmp/results/${lisp}-${thedate}.save"
214
read a < ../tmp/results/status
216
[ success = "$a" ] ## exit code
444
fi ; exit # NB: "; exit" makes it robust wrt the script being modified while running.