Hi, On Wed, 8 Oct 2003 21:09:31 +0200, Bill Allombert <[EMAIL PROTECTED]> said: > I see two possibility to implement this proposal: > > 1°) Let maintainers run tests in the build or binary target. > Eventually we add a notest DEBBUILD_OPTION to disable it. > > 2°) We add a test target in debian/rules. Autobuilders will need to > be modified to take advantage of this. We can then go farther and > implement special testing facility.
Some time ago when I saw <http://bugs.debian.org/41902>, I though about this. I've recovered and modified a draft proposal I made then: * Standardizing targets It would be nice to standarize on the targets, independently if they may be optional. Also the execution of the test target could be opted-out with some flag (notest) in DEB_BUILD_OPTIONS (as suggested by Bill) if it was going to be invoked from current defined targets. So we would have immediate support until apps support the test* targets. And would have Bill's both points implemeted. ---X<-debian/rules------ export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) build-testsuit: build # Build any tests requiered test-arch: build-testsuit ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) # Test the program(s) else @echo "warning: Cross-compiled program, cannot test." endif test-indep: build-testsuit # Test the program(s) test: test-arch test-indep .PHONY: test test-arch test-indep build-testsuit ---X<------------------- * Optional test depends fields ---X<-debian/control---- Test-Depends: Test-Depends-Indep: ---X<------------------- Introducing new dependencies may be overkill, but some programs may require another ones to be tested properly, and it's cleaner to distinguish Build-Dep* and Test-Dep* cases, also it will reduce download and install time when the test facility is not wanted. This fields must be made optional as not all programs with testsuits will need special dependencies or will have testsuits. Also this will have to be implemented but the code can be taken from the Build-Depends* handling. This can be recommended and later introduced in the policy. The various package 'debianizator' programs could add this in their templates to extend its use for newer packages. So what do you think ? Comments please. ;> kind regards, guillem