diff -Nru autopkgtest-2.13/debian/changelog autopkgtest-2.13.1/debian/changelog --- autopkgtest-2.13/debian/changelog 2014-04-01 13:43:17.000000000 +0000 +++ autopkgtest-2.13.1/debian/changelog 2014-04-08 10:18:05.000000000 +0000 @@ -1,3 +1,11 @@ +autopkgtest (2.13.1) unstable; urgency=medium + + * Fix "--build-tree" typo in error message, and also add the missing + --unbuilt-tree. (Closes: #743427) + * lxc: Enable live output in clone mode. + + -- Martin Pitt Tue, 08 Apr 2014 12:18:00 +0200 + autopkgtest (2.13) unstable; urgency=medium * Split package/version list that got introduced in 2.10: Introduce a new @@ -34,7 +42,7 @@ * adt-virt-schroot: Add new option -s/--session-id for specifying a custom schroot session id. This is useful for debugging test suites that go crazy on ci.debian.net, so you can `schroot --list --all-sessions` and see which - sessions are still open. + sessions are still open. (Closes: #742969) -- Martin Pitt Mon, 31 Mar 2014 11:45:13 +0200 diff -Nru autopkgtest-2.13/runner/adt-run autopkgtest-2.13.1/runner/adt-run --- autopkgtest-2.13/runner/adt-run 2014-04-01 13:43:17.000000000 +0000 +++ autopkgtest-2.13.1/runner/adt-run 2014-04-08 10:18:05.000000000 +0000 @@ -476,7 +476,7 @@ kind = 'apt' else: parser.error("do not know how to handle filename `%s';" - " specify --source, --binary, --build-tree, or --apt-source" % + " specify --source, --binary, --built-tree, --unbuilt-tree, or --apt-source" % kindpath) what = '%s%s' % (kind, ix) diff -Nru autopkgtest-2.13/tests/adt-run autopkgtest-2.13.1/tests/adt-run --- autopkgtest-2.13/tests/adt-run 2014-04-01 13:43:17.000000000 +0000 +++ autopkgtest-2.13.1/tests/adt-run 2014-04-08 10:18:05.000000000 +0000 @@ -1807,7 +1807,7 @@ '''source tree, no --ephemeral option (using clone)''' p = self.build_src('Tests: senz\nDepends:\n', - {'senz': '#!/bin/sh\necho I am sick >&2\nexit 7\n'}) + {'senz': '#!/bin/sh\necho hello\necho I am sick >&2\nexit 7\n'}) virt_args = [a for a in self.virt_args if a != '--ephemeral'] (code, out, err) = self.adt_run(['--no-built-binaries', '--built-tree=' + p], @@ -1816,9 +1816,12 @@ self.assertEqual(code, 4, err) self.assertRegex(out, 'tree0t-senz\s+FAIL non-zero exit status 7') + # should show test stdout inline + self.assertRegex(out, '^hello\n') + self.assertNotIn('stdout', err) + # should show test stderr separately self.assertRegex(err, 'stderr [ -]+\nI am sick\n') - self.assertNotIn('stdout', err) def test_breaks_testbed(self): '''breaks-testbed restriction''' diff -Nru autopkgtest-2.13/virt-subproc/adt-virt-lxc autopkgtest-2.13.1/virt-subproc/adt-virt-lxc --- autopkgtest-2.13/virt-subproc/adt-virt-lxc 2014-04-01 13:43:17.000000000 +0000 +++ autopkgtest-2.13.1/virt-subproc/adt-virt-lxc 2014-04-08 10:18:05.000000000 +0000 @@ -176,15 +176,30 @@ lxc_container_name = get_available_lxc_container_name() VirtSubproc.debug('using container name %s' % lxc_container_name) + shared_dir = tempfile.mkdtemp(prefix='adt-virt-lxc.shared.') + os.chmod(shared_dir, 0o755) if ephemeral: - shared_dir = tempfile.mkdtemp(prefix='adt-virt-lxc.shared.') - os.chmod(shared_dir, 0o755) VirtSubproc.execute(sudoify('lxc-start-ephemeral -n %s -k -d --bdir %s -o') % (lxc_container_name, shared_dir), [lxc_template], downp=False, outp=True) else: VirtSubproc.execute(sudoify('lxc-clone -n %s -o' % lxc_container_name), [lxc_template], downp=False, outp=True) + + # determine container path and create bind mount for our tmp dir in the + # clone + try: + lxc_dir = subprocess.check_output(sudoify(['lxc-config', 'lxc.lxcpath']), + universal_newlines=True).strip() + subprocess.check_call(sudoify( + ['sh', '-c', 'mkdir %(r)s/%(n)s/rootfs/%(d)s && ' + 'echo "lxc.mount.entry = %(d)s %(drel)s none bind 0 0" >> %(r)s/%(n)s/config' % + {'r': lxc_dir, 'n': lxc_container_name, 'd': shared_dir, 'drel': shared_dir[1:]}])) + except subprocess.CalledProcessError as e: + VirtSubproc.debug('unable to determine lxc path or set up bind mount, disabling shared downtmp: %s' % e) + shutil.rmtree(shared_dir) + shared_dir = None + VirtSubproc.execute(sudoify('lxc-start -n %s -d' % lxc_container_name), [], downp=False, outp=True) try: