chiark / gitweb /
* Set LANG to C by default for commands (eg builds and tests) run on
authorIan Jackson <ian@davenant.greenend.org.uk>
Mon, 16 Jul 2007 15:38:40 +0000 (16:38 +0100)
committerIan Jackson <ian@davenant.greenend.org.uk>
Mon, 16 Jul 2007 15:38:40 +0000 (16:38 +0100)
  testbed, and make this configurable.
* Make builds work again: Fix `cd *' in work.write (broken by
  inclusion of `tmpdir' in that directory).
* adt-testreport-onepackage has better reporting for DC-running.

debian/changelog
runner/adt-run
runner/adt-run.1

index d85ced1f5d1768a708109c8ed72270323a5b9e25..69f155989bca23bcf378a428e8a1984d5b05bf44 100644 (file)
@@ -1,6 +1,10 @@
 autopkgtest (1.0.3) unstable; urgency=low
 
-  * WIP better reporting for DC-running
+  * Set LANG to C by default for commands (eg builds and tests) run on
+    testbed, and make this configurable.
+  * Make builds work again: Fix `cd *' in work.write (broken by
+    inclusion of `tmpdir' in that directory).
+  * adt-testreport-onepackage has better reporting for DC-running.
 
  --
 
index 1274da83847724d640ba691df3a02e683af04772..de2f0cb46e3560b8d66d4890905de872aeac6c10 100755 (executable)
@@ -421,7 +421,8 @@ def parse_args():
                'deb_forbuilds': 'auto',
                'deb_fortests': 'auto',
                'tb': False,
-               'override_control': None
+               'override_control': None,
+               'set_lang': 'C'
        }
        initial_arghandling = arghandling.copy()
        n_non_actions = 0
@@ -509,7 +510,6 @@ def parse_args():
                     ' according to most recent --binaries-* settings')
        pa_setah('--no-built-binaries', ['dsc_filter'], '_',
                help='from subsequent sources, do not use any binaries')
-
        #---- binary package processing settings:
 
        def pa_setahbins(long,toset,how):
@@ -543,6 +543,11 @@ def parse_args():
        pa_path('output-dir', OutputDir, dir=True,
                help='write stderr/out files in PATH')
 
+       pa('--leave-lang', dest='set_lang', action='store_false',
+               help="leave LANG on testbed set to testbed's default")
+       pa('--set-lang', dest='set_lang', action='store', metavar='LANGVAL',
+               help='set LANG on testbed to LANGVAL', default='C')
+
        pa('','--tmp-dir',              type='string', dest='tmpdir',
                help='write temporary files to TMPDIR, emptying it'
                     ' beforehand and leaving it behind at the end')
@@ -893,7 +898,8 @@ class Testbed:
        if xdump is not None and 'execute-debug' in tb.caps: cmdl += [xdump]
        if tmpdir is not None: cmdl.append('env=TMPDIR=%s' % tmpdir)
        if kind=='install': cmdl.append('env=DEBIAN_FRONTEND=noninteractive')
-#      cmdl.append('env=LANG=C')
+       if opts.set_lang is not False:
+               cmdl.append('env=LANG=%s' % opts.set_lang)
 
        rc = tb.commandr1('execute', cmdl)
        try: rc = int(rc)
@@ -1564,7 +1570,7 @@ def build_source(act, control_override):
                        [ create_command ])
 
        script += [
-                       'cd */.',
+                       'cd [a-z0-9]*-*/.',
                        'pwd >&3',
                        'set +e; test -f debian/tests/control; echo $? >&3'
                ]
@@ -1663,7 +1669,7 @@ def build_source(act, control_override):
        debug_b('filter=%s' % filter)
        if filter != '_':
                script = tmpdir_script + [
-                       'cd '+work.write(True)+'/*/.',
+                       'cd '+work.write(True)+'/[a-z0-9]*-*/.',
                        opts.user_wrap(opts.gainroot+' debian/rules binary'),
                        'cd ..',
                        'echo *.deb >&3',
index b65bd283a7962cf694eb28161ff1ddea51764bd7..fda5fd683fa16c2787ae6d5f942e07133667bbdd 100644 (file)
@@ -189,6 +189,16 @@ Specifies the virtualisation regime server, as a command and arguments
 to invoke.  All the remaining arguments and options after
 .B ---
 are passed to the virtualisation server program.
+.TP
+.BI --set-lang= langval
+When running commands on the testbed, sets the \fBLANG\fR environment
+variable to \fIlangval\fR.  The default in \fBadt-run\fR is to set it
+to \fBC\fR.
+.TP
+.BI --leave-lang
+Suppresses the setting by \fBadt-run\fR of \fBLANG\fR on the testbed.
+This results in tests and builds using the testbed's own normal
+\fBLANG\fR value setting.
 
 .SH OUTPUT FORMAT
 During a normal test run, one line is printed for each test.  This