From e4b2f68043c8af5f556f7bd275ffd79db8eb30c5 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 29 Jul 2011 16:01:16 +0100 Subject: [PATCH] Spec: incompatible change: no-build-needed is the default bump version number too --- TODO | 2 -- debian/changelog | 9 ++++++--- doc/README.package-tests | 18 +++++++++++------- runner/adt-run | 2 +- 4 files changed, 18 insertions(+), 13 deletions(-) diff --git a/TODO b/TODO index d80f5b0..393b029 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,4 @@ -- change needs-build to be not the default - - schroot's snapshots should use dmsetup directly, not lvm ? at least there should be non-persistent snapshots diff --git a/debian/changelog b/debian/changelog index 4c2c019..6374829 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,12 @@ -autopkgtest (1.3.0) unstable; urgency=low +autopkgtest (2.0.0) unstable; urgency=low + * Incompatible test declaration spec changes: + - no-build-needed is now the default; build-needed is a Restriction + that tests which need it have to declare. + * Incompatible virtualisation server spec changes: + - print-execute-command replaced by print-{auxverb,shscript}-command. * New adt-virt-schroot for driving schroot. * Remove dependency on python in testbed. - * Incompatible virtualisation server spec changes: print-execute-command - replaced by print-auxverb-command and print-shscript-command. * Spec wording improvements, clarifications, editorial changes, etc. * Many bugfixes. diff --git a/doc/README.package-tests b/doc/README.package-tests index 83a3b61..703576e 100644 --- a/doc/README.package-tests +++ b/doc/README.package-tests @@ -20,9 +20,9 @@ with status 0 and print nothing to stderr; if a test exits nonzero, or prints to stderr, it is considered to have failed. The cwd of each test is guaranteed to be the root of the source -package which will have been built. HOWEVER note that the tests must -test the INSTALLED version of the program. Tests may not modify the -source tree (and may not have write access to it). +package, which will have been unpacked but not built. HOWEVER note +that the tests must test the INSTALLED version of the program. Tests +may not modify the source tree (and may not have write access to it). If the file to be executed has no execute bits set, chmod a+x is applied to it (this means that tests can be added in patches without @@ -62,7 +62,7 @@ The fields which may appear in the RFC822-style stanza are: tests defined in this stanza. Any unknown features declared will be completely ignored. See below for the defined features. - Depends: + Depends: Declares that the specified packages must be installed for the test to go ahead. `@' stands for the package(s) generated by the @@ -118,9 +118,13 @@ The defined Restrictions are: The test script must be run as root. + build-needed -The currently defined Features are: + The tests need to be run from a built source tree. The test + runner will build the source tree (honouring the source package's + build dependencies), before running the tests. However, the tests + are NOT entitled to assume that the source package's build + dependencies will be installed when the test is run. - no-build-needed - The tests can run in an unbuilt tree. +There are no currently defined Features. diff --git a/runner/adt-run b/runner/adt-run index 27b33a9..955097b 100755 --- a/runner/adt-run +++ b/runner/adt-run @@ -1664,7 +1664,7 @@ def build_source(act, control_override): stanzas = read_control(act, result_pwd_af, control_override) for stanza in stanzas: for t in stanza[' tests']: - if 'no-build-needed' not in t.feature_names: + if 'build-needed' not in t.restriction_names: build_needed('test %s' % t.tname) for d in t.depends: if '@' in d: -- 2.30.2