Title: Debian source testing framework Status: Draft Author: Guillem Jover Last-Change: 2006-09-03 Debbug: 41902 debian/control: Optional depends fields ======================================= ---X<------------------- Test-Depends Test-Depends-Indep ---X<------------------- Introducing new dependencies may be overkill, but some programs may requiere another ones to be tested properly. This fields must be made optional as not all programs with testsuits will need special dependencies. Also this will have to be implemented but the code can be taken from the Build-Depends* handling. debian/rules: Example code ========================== ---X<------------------- 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 "Cross compiled program: cannot test" exit 1 endif test-indep: build-testsuit # Test the program(s) test: test-arch test-indep ---X<------------------- The test targets should perform all configuration and testing in a non-interactive way. Thus allowing massively testing all the archive. This can be recomended and later introduced in the policy. The various package 'debianizator' programs could add this in their templates to extend its use for newer packages.