Commit 2d11d377 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

Improve both Makefile's, notably show full version

Show full version so when inspecting a lot file you know what it's for.

Also, in asdf-tools improve test-basic and implement a test-all-basic.
parent e0f92418
......@@ -36,6 +36,7 @@ version := $(shell cat "version.lisp-expr")
#$(info $$version is [${version}])
version := $(patsubst "%",%,$(version))
#$(info $$version is [${version}])
fullversion := $(shell git describe --tags --match "[0-9][.][0-9]*" 2> /dev/null || echo $(version))
## grep for #+/#- features in the test/ directory to see plenty of disabled tests on some platforms
## NOT SUPPORTED BY OUR AUTOMATED TESTS:
......@@ -85,7 +86,7 @@ all_lisp := $(header_lisp) $(driver_lisp) $(defsystem_lisp)
print-% : ; @echo $* = $($*)
# Making ASDF itself should be our first, default, target:
build/asdf.lisp: $(all_lisp)
build/asdf.lisp: show-version $(all_lisp)
mkdir -p build
rm -f $@
cat $(all_lisp) > $@
......@@ -191,6 +192,9 @@ u: test-upgrade
test-clean-load: build/asdf.lisp
./test/run-tests.sh -c ${l}
show-version:
@echo "Building and testing asdf $(fullversion)"
# test-glob has been replaced by t, and lisp by l, easier to type
test-lisp: build/asdf.lisp
@cd test; ./run-tests.sh ${l} ${t}
......@@ -276,7 +280,7 @@ TODO:
release: TODO test-all test-on-other-machines-too debian-changelog debian-package send-mail-to-mailing-lists
.PHONY: install archive push doc website clean mrproper \
.PHONY: install archive push doc website clean mrproper show-version \
test-forward-references test test-lisp test-upgrade test-forward-references \
test-all test-all-lisps test-all-no-upgrade \
debian-package release \
......
......@@ -60,7 +60,7 @@ build/asdf-tools build/asdf-tools.exe: build_asdf_tools
# The text below was automaticaly generated by
# make -f Makefile-lisp-scripting --silent makefile-targets
# then manually inserted here to provide for completion:
.PHONY: archive build-asdf build-asdf-tools bump bump-version check-all-results check-all-scripts-results check-all-upgrade-results clean debian-package doc ext-clear ext-init ext-reset ext-update extract extract-all-tagged-asdf extract-tagged-asdf fix-local-git-tags fix-remote-git-tags git-all-committed-p help install install-asdf link-archive load make-and-publish-archive make-archive makefile-targets merge-master-into-release publish-archive publish-debian-package push re show-commands t test test-all test-all-clean-load test-all-no-stop test-all-no-upgrade test-all-no-upgrade-no-stop test-all-scripts test-all-scripts-no-stop test-all-upgrade test-all-upgrade-no-stop test-ascii test-basic test-clean-load test-load-systems test-scripts test-upgrade u wc website
.PHONY: archive build-asdf build-asdf-tools bump bump-version check-all-results check-all-scripts-results check-all-upgrade-results clean debian-package doc ext-clear ext-init ext-reset ext-update extract extract-all-tagged-asdf extract-tagged-asdf fix-local-git-tags fix-remote-git-tags git-all-committed-p help install install-asdf link-archive load make-and-publish-archive make-archive makefile-targets merge-master-into-release publish-archive publish-debian-package push re show-commands show-version t test test-all test-all-basic test-all-clean-load test-all-no-stop test-all-no-upgrade test-all-no-upgrade-no-stop test-all-scripts test-all-scripts-no-stop test-all-upgrade test-all-upgrade-no-stop test-ascii test-basic test-clean-load test-load-systems test-scripts test-upgrade u wc website
archive build-asdf build-asdf-tools bump bump-version check-all-results check-all-scripts-results check-all-upgrade-results clean debian-package doc ext-clear ext-init ext-reset ext-update extract extract-all-tagged-asdf extract-tagged-asdf fix-local-git-tags fix-remote-git-tags git-all-committed-p help install install-asdf link-archive load make-and-publish-archive make-archive makefile-targets merge-master-into-release publish-archive publish-debian-package push re show-commands t test test-all test-all-clean-load test-all-no-stop test-all-no-upgrade test-all-no-upgrade-no-stop test-all-scripts test-all-scripts-no-stop test-all-upgrade test-all-upgrade-no-stop test-ascii test-basic test-clean-load test-load-systems test-scripts test-upgrade u wc website: force
archive build-asdf build-asdf-tools bump bump-version check-all-results check-all-scripts-results check-all-upgrade-results clean debian-package doc ext-clear ext-init ext-reset ext-update extract extract-all-tagged-asdf extract-tagged-asdf fix-local-git-tags fix-remote-git-tags git-all-committed-p help install install-asdf link-archive load make-and-publish-archive make-archive makefile-targets merge-master-into-release publish-archive publish-debian-package push re show-commands show-version t test test-all test-all-basic test-all-clean-load test-all-no-stop test-all-no-upgrade test-all-no-upgrade-no-stop test-all-scripts test-all-scripts-no-stop test-all-upgrade test-all-upgrade-no-stop test-ascii test-basic test-clean-load test-load-systems test-scripts test-upgrade u wc website: force
${MAKE_SCRIPT} l='$l' L='$L' u='$u' U='$U' v='$v' s='$s' t='$t' $@
......@@ -21,6 +21,6 @@
(:file "test-basic" :depends-on ("test-environment"))
(:file "test-scripts" :depends-on ("test-environment"))
(:file "test-upgrade" :depends-on ("test-environment" "git"))
(:file "test-all" :depends-on ("test-environment"))
(:file "test-all" :depends-on ("test-basic"))
(:file "installation" :depends-on ("test-environment"))
(:file "release" :depends-on ("version" "test-environment" "git"))))
......@@ -48,10 +48,10 @@ The UNIX-y name will be downcased, and any % prefix will be dropped."
ext-init ext-clear ext-reset ext-update ;; extension
git-all-committed-p
bump-version bump ;; version
test-load-systems test-clean-load test-basic test-ascii %load install-asdf ;; test-basic
test-load-systems test-clean-load test-basic test-ascii %load install-asdf show-version ;; test-basic
test %t test-scripts ;; test-scripts
test-upgrade u extract-tagged-asdf extract-all-tagged-asdf extract ;; test-upgrade
test-all-clean-load test-all-scripts test-all-no-upgrade test-all-upgrade ;; test-all
test-all-basic test-all-clean-load test-all-scripts test-all-no-upgrade test-all-upgrade ;; test-all
test-all test-all-scripts-no-stop test-all-upgrade-no-stop
test-all-no-upgrade-no-stop test-all-no-stop
check-all-scripts-results check-all-upgrade-results check-all-results
......
......@@ -13,6 +13,19 @@
(defmacro with-all-lisps ((lisp-var lisps &key muffle-failures) &body body)
`(call-with-all-lisps (lambda (,lisp-var) ,@body) :lisps ,lisps :muffle-failures ,muffle-failures))
(deftestcmd test-all-basic (lisps systems)
"basic test: doc, clean-load, load-systems"
(without-stopping ()
(show-version)
(doc)
(test-ascii)
(test-all-clean-load lisps)
(test-all-load-systems lisps systems)))
(deftestcmd test-all-load-systems (lisps systems)
(with-systems-test (systems)
(with-all-lisps (l lisps) (test-load-systems l systems))))
(deftestcmd test-all-clean-load (lisps)
"test-clean-load on all lisps"
(with-all-lisps (l lisps) (test-clean-load l)))
......@@ -22,8 +35,8 @@
(with-all-lisps (l lisps) (test-scripts l)))
(deftestcmd test-all-no-upgrade ()
"test-basic, and test-all-script"
(test-basic) (test-all-scripts))
"test-all-basic, and test-all-script"
(test-all-basic) (test-all-scripts))
(deftestcmd test-all-upgrade (upgrade-lisps)
"test-upgrade on all lisps"
......@@ -44,16 +57,14 @@
(deftestcmd test-all-no-upgrade-no-stop ()
"all tests but upgrade on all lisps, no stop"
(without-stopping ()
(doc) (test-load-systems)
(test-all-clean-load)
(test-all-basic)
(test-all-scripts-no-stop)
(check-all-scripts-results)))
(deftestcmd test-all-no-stop () ;; TODO: pass arguments!
"all tests on all lisps, no stop"
(without-stopping ()
(doc) (test-load-systems)
(test-all-clean-load)
(test-all-basic)
(test-all-scripts-no-stop)
(test-all-upgrade-no-stop)
(check-all-results)))
......
......@@ -12,9 +12,22 @@ compilation errors and to interactively debug ASDF."
',(system-source-files :asdf/defsystem :monolithic t)))
:lisp lisp :debugger t :output :interactive)))
(defmacro with-systems-test ((systems) &body body)
`(call-with-systems-test ,systems (lambda () ,@body)))
(defun call-with-systems-test (systems thunk)
(if systems
(funcall thunk)
(format t "Skipping system loading test.
To enable the system loading test,
export ASDF_TEST_SYSTEMS=\"some systems\"
or pass s=\"some systems\" to your make command
and this test with make sure those systems can be loaded.~%")))
(deftestcmd test-load-systems (lisp systems)
"test loading of your favorite systems
Use your preferred Lisp implementation"
(with-systems-test (systems)
(with-asdf-dir ()
(let* ((log (newlogfile "systems" lisp)))
(log! log "Loading all these systems on ~(~A~):~{~% ~A~}~%~%" lisp systems)
......@@ -22,7 +35,7 @@ Use your preferred Lisp implementation"
"loading the systems"
`((load "test/script-support.lisp")
(asdf-test::with-test () (asdf-test::test-load-systems ,@systems)))
:lisp lisp :log log))))
:lisp lisp :log log)))))
(deftestcmd test-clean-load (lisp log)
"test that asdf load cleanly
......@@ -57,6 +70,7 @@ Use your preferred lisp implementation and check that asdf is loaded without any
(deftestcmd test-basic (lisp systems)
"basic test: doc, clean-load, load-systems"
(without-stopping ()
(show-version)
(doc)
(test-ascii)
(test-clean-load lisp)
......@@ -67,3 +81,7 @@ Use your preferred lisp implementation and check that asdf is loaded without any
(success-if
(loop for c across (read-file-string (pn "build/asdf.lisp"))
always (<= 0 (char-code c) 127))))
(deftestcmd show-version ()
(format t "Building and testing asdf ~A~%" (version-from-tag)))
......@@ -85,6 +85,6 @@ Ran ~D tests, ~D passed, ~D failed~
(deftestcmd test (lisp test-scripts)
"run all normal tests but upgrade tests
Use the preferred lisp implementation"
(without-stopping () (doc) (test-clean-load lisp) (test-scripts lisp test-scripts)))
(without-stopping () (test-basic lisp) (test-scripts lisp test-scripts)))
(defalias %t test)
......@@ -2,7 +2,7 @@
;;; Extracting version information
(defparameter *version-tag-glob* "[0-9][.][0-9]*")
(defparameter *version-tag-glob* "[0-9][.][0-9]*") ;; NB: it's a glob, not regex
(defun version-from-tag (&optional commit)
;; run-program issue: :output :line closes the fd, which causes the program to die in error.
......@@ -144,3 +144,4 @@
(git `(commit -a -m ("Bump version to ",v)))
(git `(tag ,v))
v))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment