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") ...@@ -36,6 +36,7 @@ version := $(shell cat "version.lisp-expr")
#$(info $$version is [${version}]) #$(info $$version is [${version}])
version := $(patsubst "%",%,$(version)) version := $(patsubst "%",%,$(version))
#$(info $$version is [${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 ## grep for #+/#- features in the test/ directory to see plenty of disabled tests on some platforms
## NOT SUPPORTED BY OUR AUTOMATED TESTS: ## NOT SUPPORTED BY OUR AUTOMATED TESTS:
...@@ -85,7 +86,7 @@ all_lisp := $(header_lisp) $(driver_lisp) $(defsystem_lisp) ...@@ -85,7 +86,7 @@ all_lisp := $(header_lisp) $(driver_lisp) $(defsystem_lisp)
print-% : ; @echo $* = $($*) print-% : ; @echo $* = $($*)
# Making ASDF itself should be our first, default, target: # Making ASDF itself should be our first, default, target:
build/asdf.lisp: $(all_lisp) build/asdf.lisp: show-version $(all_lisp)
mkdir -p build mkdir -p build
rm -f $@ rm -f $@
cat $(all_lisp) > $@ cat $(all_lisp) > $@
...@@ -191,6 +192,9 @@ u: test-upgrade ...@@ -191,6 +192,9 @@ u: test-upgrade
test-clean-load: build/asdf.lisp test-clean-load: build/asdf.lisp
./test/run-tests.sh -c ${l} ./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-glob has been replaced by t, and lisp by l, easier to type
test-lisp: build/asdf.lisp test-lisp: build/asdf.lisp
@cd test; ./run-tests.sh ${l} ${t} @cd test; ./run-tests.sh ${l} ${t}
...@@ -276,7 +280,7 @@ TODO: ...@@ -276,7 +280,7 @@ TODO:
release: TODO test-all test-on-other-machines-too debian-changelog debian-package send-mail-to-mailing-lists 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-forward-references test test-lisp test-upgrade test-forward-references \
test-all test-all-lisps test-all-no-upgrade \ test-all test-all-lisps test-all-no-upgrade \
debian-package release \ debian-package release \
......
...@@ -60,7 +60,7 @@ build/asdf-tools build/asdf-tools.exe: build_asdf_tools ...@@ -60,7 +60,7 @@ build/asdf-tools build/asdf-tools.exe: build_asdf_tools
# The text below was automaticaly generated by # The text below was automaticaly generated by
# make -f Makefile-lisp-scripting --silent makefile-targets # make -f Makefile-lisp-scripting --silent makefile-targets
# then manually inserted here to provide for completion: # 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' $@ ${MAKE_SCRIPT} l='$l' L='$L' u='$u' U='$U' v='$v' s='$s' t='$t' $@
...@@ -21,6 +21,6 @@ ...@@ -21,6 +21,6 @@
(:file "test-basic" :depends-on ("test-environment")) (:file "test-basic" :depends-on ("test-environment"))
(:file "test-scripts" :depends-on ("test-environment")) (:file "test-scripts" :depends-on ("test-environment"))
(:file "test-upgrade" :depends-on ("test-environment" "git")) (: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 "installation" :depends-on ("test-environment"))
(:file "release" :depends-on ("version" "test-environment" "git")))) (: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." ...@@ -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 ext-init ext-clear ext-reset ext-update ;; extension
git-all-committed-p git-all-committed-p
bump-version bump ;; version 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 %t test-scripts ;; test-scripts
test-upgrade u extract-tagged-asdf extract-all-tagged-asdf extract ;; test-upgrade 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 test-all-scripts-no-stop test-all-upgrade-no-stop
test-all-no-upgrade-no-stop test-all-no-stop test-all-no-upgrade-no-stop test-all-no-stop
check-all-scripts-results check-all-upgrade-results check-all-results check-all-scripts-results check-all-upgrade-results check-all-results
......
...@@ -13,6 +13,19 @@ ...@@ -13,6 +13,19 @@
(defmacro with-all-lisps ((lisp-var lisps &key muffle-failures) &body body) (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)) `(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) (deftestcmd test-all-clean-load (lisps)
"test-clean-load on all lisps" "test-clean-load on all lisps"
(with-all-lisps (l lisps) (test-clean-load l))) (with-all-lisps (l lisps) (test-clean-load l)))
...@@ -22,8 +35,8 @@ ...@@ -22,8 +35,8 @@
(with-all-lisps (l lisps) (test-scripts l))) (with-all-lisps (l lisps) (test-scripts l)))
(deftestcmd test-all-no-upgrade () (deftestcmd test-all-no-upgrade ()
"test-basic, and test-all-script" "test-all-basic, and test-all-script"
(test-basic) (test-all-scripts)) (test-all-basic) (test-all-scripts))
(deftestcmd test-all-upgrade (upgrade-lisps) (deftestcmd test-all-upgrade (upgrade-lisps)
"test-upgrade on all lisps" "test-upgrade on all lisps"
...@@ -44,16 +57,14 @@ ...@@ -44,16 +57,14 @@
(deftestcmd test-all-no-upgrade-no-stop () (deftestcmd test-all-no-upgrade-no-stop ()
"all tests but upgrade on all lisps, no stop" "all tests but upgrade on all lisps, no stop"
(without-stopping () (without-stopping ()
(doc) (test-load-systems) (test-all-basic)
(test-all-clean-load)
(test-all-scripts-no-stop) (test-all-scripts-no-stop)
(check-all-scripts-results))) (check-all-scripts-results)))
(deftestcmd test-all-no-stop () ;; TODO: pass arguments! (deftestcmd test-all-no-stop () ;; TODO: pass arguments!
"all tests on all lisps, no stop" "all tests on all lisps, no stop"
(without-stopping () (without-stopping ()
(doc) (test-load-systems) (test-all-basic)
(test-all-clean-load)
(test-all-scripts-no-stop) (test-all-scripts-no-stop)
(test-all-upgrade-no-stop) (test-all-upgrade-no-stop)
(check-all-results))) (check-all-results)))
......
...@@ -12,17 +12,30 @@ compilation errors and to interactively debug ASDF." ...@@ -12,17 +12,30 @@ compilation errors and to interactively debug ASDF."
',(system-source-files :asdf/defsystem :monolithic t))) ',(system-source-files :asdf/defsystem :monolithic t)))
:lisp lisp :debugger t :output :interactive))) :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) (deftestcmd test-load-systems (lisp systems)
"test loading of your favorite systems "test loading of your favorite systems
Use your preferred Lisp implementation" Use your preferred Lisp implementation"
(with-asdf-dir () (with-systems-test (systems)
(let* ((log (newlogfile "systems" lisp))) (with-asdf-dir ()
(log! log "Loading all these systems on ~(~A~):~{~% ~A~}~%~%" lisp systems) (let* ((log (newlogfile "systems" lisp)))
(run-test-lisp (log! log "Loading all these systems on ~(~A~):~{~% ~A~}~%~%" lisp systems)
"loading the systems" (run-test-lisp
`((load "test/script-support.lisp") "loading the systems"
(asdf-test::with-test () (asdf-test::test-load-systems ,@systems))) `((load "test/script-support.lisp")
:lisp lisp :log log)))) (asdf-test::with-test () (asdf-test::test-load-systems ,@systems)))
:lisp lisp :log log)))))
(deftestcmd test-clean-load (lisp log) (deftestcmd test-clean-load (lisp log)
"test that asdf load cleanly "test that asdf load cleanly
...@@ -57,6 +70,7 @@ Use your preferred lisp implementation and check that asdf is loaded without any ...@@ -57,6 +70,7 @@ Use your preferred lisp implementation and check that asdf is loaded without any
(deftestcmd test-basic (lisp systems) (deftestcmd test-basic (lisp systems)
"basic test: doc, clean-load, load-systems" "basic test: doc, clean-load, load-systems"
(without-stopping () (without-stopping ()
(show-version)
(doc) (doc)
(test-ascii) (test-ascii)
(test-clean-load lisp) (test-clean-load lisp)
...@@ -67,3 +81,7 @@ Use your preferred lisp implementation and check that asdf is loaded without any ...@@ -67,3 +81,7 @@ Use your preferred lisp implementation and check that asdf is loaded without any
(success-if (success-if
(loop for c across (read-file-string (pn "build/asdf.lisp")) (loop for c across (read-file-string (pn "build/asdf.lisp"))
always (<= 0 (char-code c) 127)))) 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~ ...@@ -85,6 +85,6 @@ Ran ~D tests, ~D passed, ~D failed~
(deftestcmd test (lisp test-scripts) (deftestcmd test (lisp test-scripts)
"run all normal tests but upgrade tests "run all normal tests but upgrade tests
Use the preferred lisp implementation" 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) (defalias %t test)
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
;;; Extracting version information ;;; 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) (defun version-from-tag (&optional commit)
;; run-program issue: :output :line closes the fd, which causes the program to die in error. ;; run-program issue: :output :line closes the fd, which causes the program to die in error.
...@@ -144,3 +144,4 @@ ...@@ -144,3 +144,4 @@
(git `(commit -a -m ("Bump version to ",v))) (git `(commit -a -m ("Bump version to ",v)))
(git `(tag ,v)) (git `(tag ,v))
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