Package: autopkgtest
Version: 5.21
Severity: normal
Tags: upstream

Dear Maintainers,

I have a debian/tests/control such as:

-------
test-name: foo
Test-Command: some-test-command
Depends: a-package
Restrictions: allow-stderr
-------

And I execute:

$ autopkgtest some-package_0.0.1_all.deb --test-name=foo -- null

Expected: the test to execute (and only that specific test).

Actual:
------
autopkgtest [09:47:42]: starting date: 2022-04-29
autopkgtest [09:47:42]: version 5.21
autopkgtest [09:47:42]: host pinux; command line: /usr/bin/autopkgtest 
python3-foo_0.0.1_all.deb --test-name=foo -- null
autopkgtest [09:47:43]: testbed dpkg architecture: amd64
autopkgtest [09:47:43]: testbed running kernel: Linux 5.10.0-13-amd64 #1 SMP 
Debian 5.10.106-1 (2022-03-17)
autopkgtest [09:47:43]: @@@@@@@@@@@@@@@@@@@@ built-tree .
autopkgtest [09:47:43]: testing package foo version 0.0.1
autopkgtest [09:47:43]: ERROR: unexpected error:
Traceback (most recent call last):
  File "/usr/share/autopkgtest/lib/testdesc.py", line 671, in 
parse_debian_source
    _debian_check_unknown_fields(name, record)
  File "/usr/share/autopkgtest/lib/testdesc.py", line 248, in 
_debian_check_unknown_fields
    raise Unsupported(name, 'unknown field %s' % unknown_keys.pop())
testdesc.Unsupported: Unsupported test command1: unknown field Test-name

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/autopkgtest", line 832, in main
    process_actions()
  File "/usr/bin/autopkgtest", line 762, in process_actions
    (tests, skipped) = testdesc.parse_debian_source(
  File "/usr/share/autopkgtest/lib/testdesc.py", line 681, in 
parse_debian_source
    if testname is None or n == testname:
UnboundLocalError: local variable 'n' referenced before assignment
------

I tried writing "Test-name" instead of "test-name" in the file
debian/tests/control . Same result.

I've had a quick look at the source but I haven't fixed it. I might have
another look next week.

Thank you very much for your attention, best regards,

-- System Information:
Debian Release: 11.3
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'stable-security')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-13-amd64 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=ca_ES.UTF-8, LC_CTYPE=ca_ES.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages autopkgtest depends on:
ii  apt-utils       2.2.4
ii  libdpkg-perl    1.20.9
ii  procps          2:3.3.17-5
ii  python3         3.9.2-3
ii  python3-debian  0.1.39

Versions of packages autopkgtest recommends:
ii  autodep8  0.24

Versions of packages autopkgtest suggests:
pn  fakemachine       <none>
pn  lxc               <none>
pn  lxd               <none>
pn  ovmf              <none>
pn  ovmf-ia32         <none>
pn  qemu-efi-aarch64  <none>
pn  qemu-efi-arm      <none>
pn  qemu-system       <none>
ii  qemu-utils        1:5.2+dfsg-11+deb11u1
ii  schroot           1.6.10-12
ii  vmdb2             0.22-1

-- no debconf information

Reply via email to