Mock Version: 4.0 Mock Version: 4.0 Mock Version: 4.0 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --noclean --target noarch --nodeps /builddir/build/SPECS/python-rpmautospec.spec'], chrootPath='/var/lib/mock/inferit-9_3-extras-build-29922-52588/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=86400uid=991gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.hxa50dg9:/etc/resolv.conf', '--bind=/dev/mapper/control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']unshare_net=TrueprintOutput=False) Using nspawn with args ['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.hxa50dg9:/etc/resolv.conf', '--bind=/dev/mapper/control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', 'a140f8995e1e45a482aaf7343dca5f74', '-D', '/var/lib/mock/inferit-9_3-extras-build-29922-52588/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.hxa50dg9:/etc/resolv.conf', '--bind=/dev/mapper/control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', '--resolv-conf=off', 'bash', '--login', '-c', '/usr/bin/rpmbuild -bs --noclean --target noarch --nodeps /builddir/build/SPECS/python-rpmautospec.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0', 'SYSTEMD_SECCOMP': '0'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1704672000 Wrote: /builddir/build/SRPMS/python-rpmautospec-0.4.1-2.el9.src.rpm Child return code was: 0 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -br --noclean --target noarch --nodeps /builddir/build/SPECS/python-rpmautospec.spec'], chrootPath='/var/lib/mock/inferit-9_3-extras-build-29922-52588/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=86400uid=991gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.hxa50dg9:/etc/resolv.conf', '--bind=/dev/mapper/control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']unshare_net=TrueraiseExc=FalseprintOutput=False) Using nspawn with args ['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.hxa50dg9:/etc/resolv.conf', '--bind=/dev/mapper/control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', 'a18c4775f3e0487994bdfabaa4f31919', '-D', '/var/lib/mock/inferit-9_3-extras-build-29922-52588/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.hxa50dg9:/etc/resolv.conf', '--bind=/dev/mapper/control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', '--resolv-conf=off', 'bash', '--login', '-c', '/usr/bin/rpmbuild -br --noclean --target noarch --nodeps /builddir/build/SPECS/python-rpmautospec.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0', 'SYSTEMD_SECCOMP': '0'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1704672000 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.wUdMNj + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf rpmautospec-0.4.1 + /usr/bin/tar -xof - + /usr/bin/gzip -dc /builddir/build/SOURCES/rpmautospec-0.4.1.tar.gz + STATUS=0 + '[' 0 -ne 0 ']' + cd rpmautospec-0.4.1 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + /usr/bin/cat /builddir/build/SOURCES/rpmautospec-0.4.1-old-poetry.patch + /usr/bin/patch -s --fuzz=0 --no-backup-if-mismatch + sed -i -e /pytest-cov/d pyproject.toml + RPM_EC=0 ++ jobs -p + exit 0 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.zX8wuB + umask 022 + cd /builddir/build/BUILD + cd rpmautospec-0.4.1 + echo pyproject-rpm-macros + exit 0 Wrote: /builddir/build/SRPMS/python-rpmautospec-0.4.1-2.el9.buildreqs.nosrc.rpm Child return code was: 11 Dynamic buildrequires detected Going to install missing buildrequires. See root.log for details. ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -br --noclean --target noarch --nodeps /builddir/build/SPECS/python-rpmautospec.spec'], chrootPath='/var/lib/mock/inferit-9_3-extras-build-29922-52588/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=86400uid=991gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.hxa50dg9:/etc/resolv.conf', '--bind=/dev/mapper/control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']unshare_net=TrueraiseExc=FalseprintOutput=False) Using nspawn with args ['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.hxa50dg9:/etc/resolv.conf', '--bind=/dev/mapper/control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '10c84b9ba6be4af8bdbfcb3f7119ad13', '-D', '/var/lib/mock/inferit-9_3-extras-build-29922-52588/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.hxa50dg9:/etc/resolv.conf', '--bind=/dev/mapper/control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', '--resolv-conf=off', 'bash', '--login', '-c', '/usr/bin/rpmbuild -br --noclean --target noarch --nodeps /builddir/build/SPECS/python-rpmautospec.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0', 'SYSTEMD_SECCOMP': '0'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1704672000 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.eSikGI + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf rpmautospec-0.4.1 + /usr/bin/gzip -dc /builddir/build/SOURCES/rpmautospec-0.4.1.tar.gz + /usr/bin/tar -xof - + STATUS=0 + '[' 0 -ne 0 ']' + cd rpmautospec-0.4.1 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + /usr/bin/cat /builddir/build/SOURCES/rpmautospec-0.4.1-old-poetry.patch + /usr/bin/patch -s --fuzz=0 --no-backup-if-mismatch + sed -i -e /pytest-cov/d pyproject.toml + RPM_EC=0 ++ jobs -p + exit 0 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.dhN9o1 + umask 022 + cd /builddir/build/BUILD + cd rpmautospec-0.4.1 + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(pip) >= 19' + echo 'python3dist(packaging)' + '[' -f pyproject.toml ']' + echo '(python3dist(tomli) if python3-devel < 3.11)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + mkdir -p /builddir/build/BUILD/.pyproject-builddir + echo -n + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 ' + TMPDIR=/builddir/build/BUILD/.pyproject-builddir + RPM_TOXENV=py39 + HOSTNAME=rpmbuild + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/pyproject-wheeldir --output /builddir/build/BUILD/python-rpmautospec-0.4.1-2.el9.noarch-pyproject-buildrequires Import error: No module named 'tomli' + cat /builddir/build/BUILD/python-rpmautospec-0.4.1-2.el9.noarch-pyproject-buildrequires + rm -rfv '*.dist-info/' + RPM_EC=0 ++ jobs -p + exit 0 Wrote: /builddir/build/SRPMS/python-rpmautospec-0.4.1-2.el9.buildreqs.nosrc.rpm Child return code was: 11 Dynamic buildrequires detected Going to install missing buildrequires. See root.log for details. ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -br --noclean --target noarch --nodeps /builddir/build/SPECS/python-rpmautospec.spec'], chrootPath='/var/lib/mock/inferit-9_3-extras-build-29922-52588/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=86400uid=991gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.hxa50dg9:/etc/resolv.conf', '--bind=/dev/mapper/control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']unshare_net=TrueraiseExc=FalseprintOutput=False) Using nspawn with args ['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.hxa50dg9:/etc/resolv.conf', '--bind=/dev/mapper/control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '9a1e436a815343c59f00bab61fdabdb8', '-D', '/var/lib/mock/inferit-9_3-extras-build-29922-52588/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.hxa50dg9:/etc/resolv.conf', '--bind=/dev/mapper/control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', '--resolv-conf=off', 'bash', '--login', '-c', '/usr/bin/rpmbuild -br --noclean --target noarch --nodeps /builddir/build/SPECS/python-rpmautospec.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0', 'SYSTEMD_SECCOMP': '0'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1704672000 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.MJptmB + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf rpmautospec-0.4.1 + /usr/bin/gzip -dc /builddir/build/SOURCES/rpmautospec-0.4.1.tar.gz + /usr/bin/tar -xof - + STATUS=0 + '[' 0 -ne 0 ']' + cd rpmautospec-0.4.1 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + /usr/bin/cat /builddir/build/SOURCES/rpmautospec-0.4.1-old-poetry.patch + /usr/bin/patch -s --fuzz=0 --no-backup-if-mismatch + sed -i -e /pytest-cov/d pyproject.toml + RPM_EC=0 ++ jobs -p + exit 0 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.mqhcjf + umask 022 + cd /builddir/build/BUILD + cd rpmautospec-0.4.1 + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(pip) >= 19' + echo 'python3dist(packaging)' + '[' -f pyproject.toml ']' + echo '(python3dist(tomli) if python3-devel < 3.11)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + mkdir -p /builddir/build/BUILD/.pyproject-builddir + echo -n + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 ' + TMPDIR=/builddir/build/BUILD/.pyproject-builddir + RPM_TOXENV=py39 + HOSTNAME=rpmbuild + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/pyproject-wheeldir --output /builddir/build/BUILD/python-rpmautospec-0.4.1-2.el9.noarch-pyproject-buildrequires Handling poetry-core from build-system.requires Requirement not satisfied: poetry-core Exiting dependency generation pass: build backend + cat /builddir/build/BUILD/python-rpmautospec-0.4.1-2.el9.noarch-pyproject-buildrequires + rm -rfv '*.dist-info/' + RPM_EC=0 ++ jobs -p + exit 0 Wrote: /builddir/build/SRPMS/python-rpmautospec-0.4.1-2.el9.buildreqs.nosrc.rpm Child return code was: 11 Dynamic buildrequires detected Going to install missing buildrequires. See root.log for details. ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -br --noclean --target noarch --nodeps /builddir/build/SPECS/python-rpmautospec.spec'], chrootPath='/var/lib/mock/inferit-9_3-extras-build-29922-52588/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=86400uid=991gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.hxa50dg9:/etc/resolv.conf', '--bind=/dev/mapper/control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']unshare_net=TrueraiseExc=FalseprintOutput=False) Using nspawn with args ['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.hxa50dg9:/etc/resolv.conf', '--bind=/dev/mapper/control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', 'a4cdae743761459eb44fdfbe1151ffe5', '-D', '/var/lib/mock/inferit-9_3-extras-build-29922-52588/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.hxa50dg9:/etc/resolv.conf', '--bind=/dev/mapper/control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', '--resolv-conf=off', 'bash', '--login', '-c', '/usr/bin/rpmbuild -br --noclean --target noarch --nodeps /builddir/build/SPECS/python-rpmautospec.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0', 'SYSTEMD_SECCOMP': '0'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1704672000 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.YYdTAx + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf rpmautospec-0.4.1 + /usr/bin/gzip -dc /builddir/build/SOURCES/rpmautospec-0.4.1.tar.gz + /usr/bin/tar -xof - + STATUS=0 + '[' 0 -ne 0 ']' + cd rpmautospec-0.4.1 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + /usr/bin/cat /builddir/build/SOURCES/rpmautospec-0.4.1-old-poetry.patch + /usr/bin/patch -s --fuzz=0 --no-backup-if-mismatch + sed -i -e /pytest-cov/d pyproject.toml + RPM_EC=0 ++ jobs -p + exit 0 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.wmRI9n + umask 022 + cd /builddir/build/BUILD + cd rpmautospec-0.4.1 + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(pip) >= 19' + echo 'python3dist(packaging)' + '[' -f pyproject.toml ']' + echo '(python3dist(tomli) if python3-devel < 3.11)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + mkdir -p /builddir/build/BUILD/.pyproject-builddir + echo -n + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 ' + TMPDIR=/builddir/build/BUILD/.pyproject-builddir + RPM_TOXENV=py39 + HOSTNAME=rpmbuild + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/pyproject-wheeldir --output /builddir/build/BUILD/python-rpmautospec-0.4.1-2.el9.noarch-pyproject-buildrequires Handling poetry-core from build-system.requires Requirement satisfied: poetry-core (installed: poetry-core 1.0.7) Handling babel (>=2.9,<3.0) from hook generated metadata: Requires-Dist (rpmautospec) Requirement not satisfied: babel (>=2.9,<3.0) Handling pygit2 (>=1.2.1,<2.0.0) from hook generated metadata: Requires-Dist (rpmautospec) Requirement not satisfied: pygit2 (>=1.2.1,<2.0.0) Handling rpm from hook generated metadata: Requires-Dist (rpmautospec) Requirement not satisfied: rpm Handling rpmautospec_core (>=0.1.2,<0.2.0) from hook generated metadata: Requires-Dist (rpmautospec) Requirement not satisfied: rpmautospec_core (>=0.1.2,<0.2.0) + cat /builddir/build/BUILD/python-rpmautospec-0.4.1-2.el9.noarch-pyproject-buildrequires + rm -rfv rpmautospec-0.4.1.dist-info/ removed 'rpmautospec-0.4.1.dist-info/entry_points.txt' removed 'rpmautospec-0.4.1.dist-info/WHEEL' removed 'rpmautospec-0.4.1.dist-info/METADATA' removed directory 'rpmautospec-0.4.1.dist-info/' + RPM_EC=0 ++ jobs -p + exit 0 Wrote: /builddir/build/SRPMS/python-rpmautospec-0.4.1-2.el9.buildreqs.nosrc.rpm Child return code was: 11 Dynamic buildrequires detected Going to install missing buildrequires. See root.log for details. ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -br --noclean --target noarch --nodeps /builddir/build/SPECS/python-rpmautospec.spec'], chrootPath='/var/lib/mock/inferit-9_3-extras-build-29922-52588/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=86400uid=991gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.hxa50dg9:/etc/resolv.conf', '--bind=/dev/mapper/control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']unshare_net=TrueraiseExc=FalseprintOutput=False) Using nspawn with args ['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.hxa50dg9:/etc/resolv.conf', '--bind=/dev/mapper/control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '46e7d6243a1049c49db687cde43bf86b', '-D', '/var/lib/mock/inferit-9_3-extras-build-29922-52588/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.hxa50dg9:/etc/resolv.conf', '--bind=/dev/mapper/control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', '--resolv-conf=off', 'bash', '--login', '-c', '/usr/bin/rpmbuild -br --noclean --target noarch --nodeps /builddir/build/SPECS/python-rpmautospec.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0', 'SYSTEMD_SECCOMP': '0'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1704672000 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.jE03ux + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf rpmautospec-0.4.1 + /usr/bin/gzip -dc /builddir/build/SOURCES/rpmautospec-0.4.1.tar.gz + /usr/bin/tar -xof - + STATUS=0 + '[' 0 -ne 0 ']' + cd rpmautospec-0.4.1 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + /usr/bin/cat /builddir/build/SOURCES/rpmautospec-0.4.1-old-poetry.patch + /usr/bin/patch -s --fuzz=0 --no-backup-if-mismatch + sed -i -e /pytest-cov/d pyproject.toml + RPM_EC=0 ++ jobs -p + exit 0 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.yLhZxI + umask 022 + cd /builddir/build/BUILD + cd rpmautospec-0.4.1 + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(pip) >= 19' + echo 'python3dist(packaging)' + '[' -f pyproject.toml ']' + echo '(python3dist(tomli) if python3-devel < 3.11)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + mkdir -p /builddir/build/BUILD/.pyproject-builddir + echo -n + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 ' + TMPDIR=/builddir/build/BUILD/.pyproject-builddir + RPM_TOXENV=py39 + HOSTNAME=rpmbuild + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/pyproject-wheeldir --output /builddir/build/BUILD/python-rpmautospec-0.4.1-2.el9.noarch-pyproject-buildrequires Handling poetry-core from build-system.requires Requirement satisfied: poetry-core (installed: poetry-core 1.0.7) Handling babel (>=2.9,<3.0) from hook generated metadata: Requires-Dist (rpmautospec) Requirement satisfied: babel (>=2.9,<3.0) (installed: babel 2.9.1) Handling pygit2 (>=1.2.1,<2.0.0) from hook generated metadata: Requires-Dist (rpmautospec) Requirement satisfied: pygit2 (>=1.2.1,<2.0.0) (installed: pygit2 1.12.0) Handling rpm from hook generated metadata: Requires-Dist (rpmautospec) Requirement satisfied: rpm (installed: rpm 4.16.1.3) Handling rpmautospec_core (>=0.1.2,<0.2.0) from hook generated metadata: Requires-Dist (rpmautospec) Requirement satisfied: rpmautospec_core (>=0.1.2,<0.2.0) (installed: rpmautospec_core 0.1.3) + cat /builddir/build/BUILD/python-rpmautospec-0.4.1-2.el9.noarch-pyproject-buildrequires + rm -rfv rpmautospec-0.4.1.dist-info/ removed 'rpmautospec-0.4.1.dist-info/entry_points.txt' removed 'rpmautospec-0.4.1.dist-info/WHEEL' removed 'rpmautospec-0.4.1.dist-info/METADATA' removed directory 'rpmautospec-0.4.1.dist-info/' + RPM_EC=0 ++ jobs -p + exit 0 Wrote: /builddir/build/SRPMS/python-rpmautospec-0.4.1-2.el9.buildreqs.nosrc.rpm Child return code was: 11 Dynamic buildrequires detected Going to install missing buildrequires. See root.log for details. ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -ba --noprep --noclean --target noarch --nodeps /builddir/build/SPECS/python-rpmautospec.spec'], chrootPath='/var/lib/mock/inferit-9_3-extras-build-29922-52588/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=86400uid=991gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.hxa50dg9:/etc/resolv.conf', '--bind=/dev/mapper/control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']unshare_net=TrueprintOutput=False) Using nspawn with args ['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.hxa50dg9:/etc/resolv.conf', '--bind=/dev/mapper/control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '37ebe8c681534199ac8eb370e50e9bda', '-D', '/var/lib/mock/inferit-9_3-extras-build-29922-52588/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.hxa50dg9:/etc/resolv.conf', '--bind=/dev/mapper/control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', '--resolv-conf=off', 'bash', '--login', '-c', '/usr/bin/rpmbuild -ba --noprep --noclean --target noarch --nodeps /builddir/build/SPECS/python-rpmautospec.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0', 'SYSTEMD_SECCOMP': '0'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1704672000 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.xlRYtx + umask 022 + cd /builddir/build/BUILD + cd rpmautospec-0.4.1 + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(pip) >= 19' + echo 'python3dist(packaging)' + '[' -f pyproject.toml ']' + echo '(python3dist(tomli) if python3-devel < 3.11)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + mkdir -p /builddir/build/BUILD/.pyproject-builddir + echo -n + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 ' + TMPDIR=/builddir/build/BUILD/.pyproject-builddir + RPM_TOXENV=py39 + HOSTNAME=rpmbuild + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/pyproject-wheeldir --output /builddir/build/BUILD/python-rpmautospec-0.4.1-2.el9.noarch-pyproject-buildrequires Handling poetry-core from build-system.requires Requirement satisfied: poetry-core (installed: poetry-core 1.0.7) Handling babel (>=2.9,<3.0) from hook generated metadata: Requires-Dist (rpmautospec) Requirement satisfied: babel (>=2.9,<3.0) (installed: babel 2.9.1) Handling pygit2 (>=1.2.1,<2.0.0) from hook generated metadata: Requires-Dist (rpmautospec) Requirement satisfied: pygit2 (>=1.2.1,<2.0.0) (installed: pygit2 1.12.0) Handling rpm from hook generated metadata: Requires-Dist (rpmautospec) Requirement satisfied: rpm (installed: rpm 4.16.1.3) Handling rpmautospec_core (>=0.1.2,<0.2.0) from hook generated metadata: Requires-Dist (rpmautospec) Requirement satisfied: rpmautospec_core (>=0.1.2,<0.2.0) (installed: rpmautospec_core 0.1.3) + cat /builddir/build/BUILD/python-rpmautospec-0.4.1-2.el9.noarch-pyproject-buildrequires + rm -rfv rpmautospec-0.4.1.dist-info/ removed 'rpmautospec-0.4.1.dist-info/entry_points.txt' removed 'rpmautospec-0.4.1.dist-info/WHEEL' removed 'rpmautospec-0.4.1.dist-info/METADATA' removed directory 'rpmautospec-0.4.1.dist-info/' + RPM_EC=0 ++ jobs -p + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.Sr9oiN + umask 022 + cd /builddir/build/BUILD + cd rpmautospec-0.4.1 + mkdir -p /builddir/build/BUILD/rpmautospec-0.4.1/.pyproject-builddir + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 ' + TMPDIR=/builddir/build/BUILD/rpmautospec-0.4.1/.pyproject-builddir + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_wheel.py /builddir/build/BUILD/rpmautospec-0.4.1/pyproject-wheeldir Processing /builddir/build/BUILD/rpmautospec-0.4.1 DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default. pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555. Preparing wheel metadata: started Running command /usr/bin/python3 /usr/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /builddir/build/BUILD/rpmautospec-0.4.1/.pyproject-builddir/tmpfn2fwd0u Preparing wheel metadata: finished with status 'done' Building wheels for collected packages: rpmautospec Building wheel for rpmautospec (PEP 517): started Running command /usr/bin/python3 /usr/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /builddir/build/BUILD/rpmautospec-0.4.1/.pyproject-builddir/tmp0xsg0ltg Building wheel for rpmautospec (PEP 517): finished with status 'done' Created wheel for rpmautospec: filename=rpmautospec-0.4.1-py3-none-any.whl size=22588 sha256=1798a482117f0a915a42a30962efbbd5165ea8f700ed1cd3162023ab309fbde7 Stored in directory: /builddir/.cache/pip/wheels/5f/3c/f5/0317958ff6f106a205e3e3c496e173d49535ea828dd14800e9 Successfully built rpmautospec + RPM_EC=0 ++ jobs -p + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.gkgez9 + umask 022 + cd /builddir/build/BUILD + '[' /builddir/build/BUILDROOT/python-rpmautospec-0.4.1-2.el9.noarch '!=' / ']' + rm -rf /builddir/build/BUILDROOT/python-rpmautospec-0.4.1-2.el9.noarch ++ dirname /builddir/build/BUILDROOT/python-rpmautospec-0.4.1-2.el9.noarch + mkdir -p /builddir/build/BUILDROOT + mkdir /builddir/build/BUILDROOT/python-rpmautospec-0.4.1-2.el9.noarch + cd rpmautospec-0.4.1 ++ ls /builddir/build/BUILD/rpmautospec-0.4.1/pyproject-wheeldir/rpmautospec-0.4.1-py3-none-any.whl ++ xargs basename --multiple ++ sed -E 's/([^-]+)-([^-]+)-.+\.whl/\1==\2/' + specifier=rpmautospec==0.4.1 + TMPDIR=/builddir/build/BUILD/rpmautospec-0.4.1/.pyproject-builddir + /usr/bin/python3 -m pip install --root /builddir/build/BUILDROOT/python-rpmautospec-0.4.1-2.el9.noarch --prefix /usr --no-deps --disable-pip-version-check --progress-bar off --verbose --ignore-installed --no-warn-script-location --no-index --no-cache-dir --find-links /builddir/build/BUILD/rpmautospec-0.4.1/pyproject-wheeldir rpmautospec==0.4.1 Using pip 21.2.3 from /usr/lib/python3.9/site-packages/pip (python 3.9) Looking in links: /builddir/build/BUILD/rpmautospec-0.4.1/pyproject-wheeldir Processing ./pyproject-wheeldir/rpmautospec-0.4.1-py3-none-any.whl Installing collected packages: rpmautospec Creating /builddir/build/BUILDROOT/python-rpmautospec-0.4.1-2.el9.noarch/usr/bin changing mode of /builddir/build/BUILDROOT/python-rpmautospec-0.4.1-2.el9.noarch/usr/bin/rpmautospec to 755 Successfully installed rpmautospec-0.4.1 + '[' -d /builddir/build/BUILDROOT/python-rpmautospec-0.4.1-2.el9.noarch/usr/bin ']' + '[' -f /usr/bin/pathfix3.9.py ']' + pathfix=/usr/bin/pathfix3.9.py + '[' -z s ']' + shebang_flags=-kas + /usr/bin/pathfix3.9.py -pni /usr/bin/python3 -kas /builddir/build/BUILDROOT/python-rpmautospec-0.4.1-2.el9.noarch/usr/bin/rpmautospec /builddir/build/BUILDROOT/python-rpmautospec-0.4.1-2.el9.noarch/usr/bin/rpmautospec: updating + rm -rfv /builddir/build/BUILDROOT/python-rpmautospec-0.4.1-2.el9.noarch/usr/bin/__pycache__ + rm -f /builddir/build/BUILD/python-rpmautospec-0.4.1-2.el9.noarch-pyproject-ghost-distinfo + site_dirs=() + '[' -d /builddir/build/BUILDROOT/python-rpmautospec-0.4.1-2.el9.noarch/usr/lib/python3.9/site-packages ']' + site_dirs+=("/usr/lib/python3.9/site-packages") + '[' /builddir/build/BUILDROOT/python-rpmautospec-0.4.1-2.el9.noarch/usr/lib64/python3.9/site-packages '!=' /builddir/build/BUILDROOT/python-rpmautospec-0.4.1-2.el9.noarch/usr/lib/python3.9/site-packages ']' + '[' -d /builddir/build/BUILDROOT/python-rpmautospec-0.4.1-2.el9.noarch/usr/lib64/python3.9/site-packages ']' + for site_dir in ${site_dirs[@]} + for distinfo in /builddir/build/BUILDROOT/python-rpmautospec-0.4.1-2.el9.noarch$site_dir/*.dist-info + echo '%ghost /usr/lib/python3.9/site-packages/rpmautospec-0.4.1.dist-info' + sed -i s/pip/rpm/ /builddir/build/BUILDROOT/python-rpmautospec-0.4.1-2.el9.noarch/usr/lib/python3.9/site-packages/rpmautospec-0.4.1.dist-info/INSTALLER + PYTHONPATH=/usr/lib/rpm/redhat + /usr/bin/python3 -B /usr/lib/rpm/redhat/pyproject_preprocess_record.py --buildroot /builddir/build/BUILDROOT/python-rpmautospec-0.4.1-2.el9.noarch --record /builddir/build/BUILDROOT/python-rpmautospec-0.4.1-2.el9.noarch/usr/lib/python3.9/site-packages/rpmautospec-0.4.1.dist-info/RECORD --output /builddir/build/BUILD/python-rpmautospec-0.4.1-2.el9.noarch-pyproject-record + rm -fv /builddir/build/BUILDROOT/python-rpmautospec-0.4.1-2.el9.noarch/usr/lib/python3.9/site-packages/rpmautospec-0.4.1.dist-info/RECORD removed '/builddir/build/BUILDROOT/python-rpmautospec-0.4.1-2.el9.noarch/usr/lib/python3.9/site-packages/rpmautospec-0.4.1.dist-info/RECORD' + rm -fv /builddir/build/BUILDROOT/python-rpmautospec-0.4.1-2.el9.noarch/usr/lib/python3.9/site-packages/rpmautospec-0.4.1.dist-info/REQUESTED removed '/builddir/build/BUILDROOT/python-rpmautospec-0.4.1-2.el9.noarch/usr/lib/python3.9/site-packages/rpmautospec-0.4.1.dist-info/REQUESTED' ++ cut -f1 '-d ' ++ wc -l /builddir/build/BUILD/python-rpmautospec-0.4.1-2.el9.noarch-pyproject-ghost-distinfo + lines=1 + '[' 1 -ne 1 ']' + RPM_PERCENTAGES_COUNT=8 + /usr/bin/python3 /usr/lib/rpm/redhat/pyproject_save_files.py --output-files /builddir/build/BUILD/python-rpmautospec-0.4.1-2.el9.noarch-pyproject-files --output-modules /builddir/build/BUILD/python-rpmautospec-0.4.1-2.el9.noarch-pyproject-modules --buildroot /builddir/build/BUILDROOT/python-rpmautospec-0.4.1-2.el9.noarch --sitelib /usr/lib/python3.9/site-packages --sitearch /usr/lib64/python3.9/site-packages --python-version 3.9 --pyproject-record /builddir/build/BUILD/python-rpmautospec-0.4.1-2.el9.noarch-pyproject-record --prefix /usr rpmautospec + sed -i -e 's|^\(.*/LICENSE\)|%license \1|g' /builddir/build/BUILD/python-rpmautospec-0.4.1-2.el9.noarch-pyproject-files + mkdir -p /builddir/build/BUILDROOT/python-rpmautospec-0.4.1-2.el9.noarch/usr/lib/rpm/macros.d + install -m 644 rpm/macros.d/macros.rpmautospec /builddir/build/BUILDROOT/python-rpmautospec-0.4.1-2.el9.noarch/usr/lib/rpm/macros.d/ + /usr/bin/find-debuginfo -j16 --strict-build-id -m -i --build-id-seed 0.4.1-2.el9 --unique-debug-suffix -0.4.1-2.el9.noarch --unique-debug-src-base python-rpmautospec-0.4.1-2.el9.noarch --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 50000000 --remove-section .gnu.build.attributes -S debugsourcefiles.list /builddir/build/BUILD/rpmautospec-0.4.1 find: 'debug': No such file or directory + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/redhat/brp-ldconfig + /usr/lib/rpm/brp-compress + /usr/lib/rpm/redhat/brp-strip-lto /usr/bin/strip + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/redhat/brp-python-bytecompile '' 1 0 Bytecompiling .py files below /builddir/build/BUILDROOT/python-rpmautospec-0.4.1-2.el9.noarch/usr/lib/python3.9 using python3.9 + /usr/lib/rpm/brp-python-hardlink + /usr/lib/rpm/redhat/brp-mangle-shebangs Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.N7CjeX + umask 022 + cd /builddir/build/BUILD + cd rpmautospec-0.4.1 + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 ' + PATH=/builddir/build/BUILDROOT/python-rpmautospec-0.4.1-2.el9.noarch/usr/bin:/usr/share/Modules/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin + PYTHONPATH=/builddir/build/BUILDROOT/python-rpmautospec-0.4.1-2.el9.noarch/usr/lib64/python3.9/site-packages:/builddir/build/BUILDROOT/python-rpmautospec-0.4.1-2.el9.noarch/usr/lib/python3.9/site-packages + PYTHONDONTWRITEBYTECODE=1 + PYTEST_ADDOPTS=' --ignore=/builddir/build/BUILD/rpmautospec-0.4.1/.pyproject-builddir' + /usr/bin/pytest -v ============================= test session starts ============================== platform linux -- Python 3.9.18, pytest-6.2.2, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python3 cachedir: .pytest_cache rootdir: /builddir/build/BUILD/rpmautospec-0.4.1 collecting ... collected 619 items tests/test_rpmmacros.py::test_autorelease[False-None-None-False-None-False] PASSED [ 0%] tests/test_rpmmacros.py::test_autorelease[False-None-None-False-None-True] PASSED [ 0%] tests/test_rpmmacros.py::test_autorelease[False-None-None-False-10-False] PASSED [ 0%] tests/test_rpmmacros.py::test_autorelease[False-None-None-False-10-True] PASSED [ 0%] tests/test_rpmmacros.py::test_autorelease[False-None-None-True-None-False] PASSED [ 0%] tests/test_rpmmacros.py::test_autorelease[False-None-None-True-None-True] PASSED [ 0%] tests/test_rpmmacros.py::test_autorelease[False-None-None-True-10-False] PASSED [ 1%] tests/test_rpmmacros.py::test_autorelease[False-None-None-True-10-True] PASSED [ 1%] tests/test_rpmmacros.py::test_autorelease[False-None-19700101-False-None-False] PASSED [ 1%] tests/test_rpmmacros.py::test_autorelease[False-None-19700101-False-None-True] PASSED [ 1%] tests/test_rpmmacros.py::test_autorelease[False-None-19700101-False-10-False] PASSED [ 1%] tests/test_rpmmacros.py::test_autorelease[False-None-19700101-False-10-True] PASSED [ 1%] tests/test_rpmmacros.py::test_autorelease[False-None-19700101-True-None-False] PASSED [ 2%] tests/test_rpmmacros.py::test_autorelease[False-None-19700101-True-None-True] PASSED [ 2%] tests/test_rpmmacros.py::test_autorelease[False-None-19700101-True-10-False] PASSED [ 2%] tests/test_rpmmacros.py::test_autorelease[False-None-19700101-True-10-True] PASSED [ 2%] tests/test_rpmmacros.py::test_autorelease[False-ilikeunsortableversions-None-False-None-False] PASSED [ 2%] tests/test_rpmmacros.py::test_autorelease[False-ilikeunsortableversions-None-False-None-True] PASSED [ 2%] tests/test_rpmmacros.py::test_autorelease[False-ilikeunsortableversions-None-False-10-False] PASSED [ 3%] tests/test_rpmmacros.py::test_autorelease[False-ilikeunsortableversions-None-False-10-True] PASSED [ 3%] tests/test_rpmmacros.py::test_autorelease[False-ilikeunsortableversions-None-True-None-False] PASSED [ 3%] tests/test_rpmmacros.py::test_autorelease[False-ilikeunsortableversions-None-True-None-True] PASSED [ 3%] tests/test_rpmmacros.py::test_autorelease[False-ilikeunsortableversions-None-True-10-False] PASSED [ 3%] tests/test_rpmmacros.py::test_autorelease[False-ilikeunsortableversions-None-True-10-True] PASSED [ 3%] tests/test_rpmmacros.py::test_autorelease[False-ilikeunsortableversions-19700101-False-None-False] PASSED [ 4%] tests/test_rpmmacros.py::test_autorelease[False-ilikeunsortableversions-19700101-False-None-True] PASSED [ 4%] tests/test_rpmmacros.py::test_autorelease[False-ilikeunsortableversions-19700101-False-10-False] PASSED [ 4%] tests/test_rpmmacros.py::test_autorelease[False-ilikeunsortableversions-19700101-False-10-True] PASSED [ 4%] tests/test_rpmmacros.py::test_autorelease[False-ilikeunsortableversions-19700101-True-None-False] PASSED [ 4%] tests/test_rpmmacros.py::test_autorelease[False-ilikeunsortableversions-19700101-True-None-True] PASSED [ 4%] tests/test_rpmmacros.py::test_autorelease[False-ilikeunsortableversions-19700101-True-10-False] PASSED [ 5%] tests/test_rpmmacros.py::test_autorelease[False-ilikeunsortableversions-19700101-True-10-True] PASSED [ 5%] tests/test_rpmmacros.py::test_autorelease[True-None-None-False-None-False] PASSED [ 5%] tests/test_rpmmacros.py::test_autorelease[True-None-None-False-None-True] PASSED [ 5%] tests/test_rpmmacros.py::test_autorelease[True-None-None-False-10-False] PASSED [ 5%] tests/test_rpmmacros.py::test_autorelease[True-None-None-False-10-True] PASSED [ 5%] tests/test_rpmmacros.py::test_autorelease[True-None-None-True-None-False] PASSED [ 5%] tests/test_rpmmacros.py::test_autorelease[True-None-None-True-None-True] PASSED [ 6%] tests/test_rpmmacros.py::test_autorelease[True-None-None-True-10-False] PASSED [ 6%] tests/test_rpmmacros.py::test_autorelease[True-None-None-True-10-True] PASSED [ 6%] tests/test_rpmmacros.py::test_autorelease[True-None-19700101-False-None-False] PASSED [ 6%] tests/test_rpmmacros.py::test_autorelease[True-None-19700101-False-None-True] PASSED [ 6%] tests/test_rpmmacros.py::test_autorelease[True-None-19700101-False-10-False] PASSED [ 6%] tests/test_rpmmacros.py::test_autorelease[True-None-19700101-False-10-True] PASSED [ 7%] tests/test_rpmmacros.py::test_autorelease[True-None-19700101-True-None-False] PASSED [ 7%] tests/test_rpmmacros.py::test_autorelease[True-None-19700101-True-None-True] PASSED [ 7%] tests/test_rpmmacros.py::test_autorelease[True-None-19700101-True-10-False] PASSED [ 7%] tests/test_rpmmacros.py::test_autorelease[True-None-19700101-True-10-True] PASSED [ 7%] tests/test_rpmmacros.py::test_autorelease[True-ilikeunsortableversions-None-False-None-False] PASSED [ 7%] tests/test_rpmmacros.py::test_autorelease[True-ilikeunsortableversions-None-False-None-True] PASSED [ 8%] tests/test_rpmmacros.py::test_autorelease[True-ilikeunsortableversions-None-False-10-False] PASSED [ 8%] tests/test_rpmmacros.py::test_autorelease[True-ilikeunsortableversions-None-False-10-True] PASSED [ 8%] tests/test_rpmmacros.py::test_autorelease[True-ilikeunsortableversions-None-True-None-False] PASSED [ 8%] tests/test_rpmmacros.py::test_autorelease[True-ilikeunsortableversions-None-True-None-True] PASSED [ 8%] tests/test_rpmmacros.py::test_autorelease[True-ilikeunsortableversions-None-True-10-False] PASSED [ 8%] tests/test_rpmmacros.py::test_autorelease[True-ilikeunsortableversions-None-True-10-True] PASSED [ 9%] tests/test_rpmmacros.py::test_autorelease[True-ilikeunsortableversions-19700101-False-None-False] PASSED [ 9%] tests/test_rpmmacros.py::test_autorelease[True-ilikeunsortableversions-19700101-False-None-True] PASSED [ 9%] tests/test_rpmmacros.py::test_autorelease[True-ilikeunsortableversions-19700101-False-10-False] PASSED [ 9%] tests/test_rpmmacros.py::test_autorelease[True-ilikeunsortableversions-19700101-False-10-True] PASSED [ 9%] tests/test_rpmmacros.py::test_autorelease[True-ilikeunsortableversions-19700101-True-None-False] PASSED [ 9%] tests/test_rpmmacros.py::test_autorelease[True-ilikeunsortableversions-19700101-True-None-True] PASSED [ 10%] tests/test_rpmmacros.py::test_autorelease[True-ilikeunsortableversions-19700101-True-10-False] PASSED [ 10%] tests/test_rpmmacros.py::test_autorelease[True-ilikeunsortableversions-19700101-True-10-True] PASSED [ 10%] tests/test_rpmmacros.py::test_autochangelog[None-None] PASSED [ 10%] tests/test_rpmmacros.py::test_autochangelog[None-2] PASSED [ 10%] tests/test_rpmmacros.py::test_autochangelog[Foo Bar -None] PASSED [ 10%] tests/test_rpmmacros.py::test_autochangelog[Foo Bar -2] PASSED [ 10%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_commitlog_to_changelog_items[commitlog-1-True-True] PASSED [ 11%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_commitlog_to_changelog_items[commitlog-1-True-False] PASSED [ 11%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_commitlog_to_changelog_items[commitlog-1-False-True] PASSED [ 11%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_commitlog_to_changelog_items[commitlog-1-False-False] PASSED [ 11%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_commitlog_to_changelog_items[commitlog-2-True-True] PASSED [ 11%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_commitlog_to_changelog_items[commitlog-2-True-False] PASSED [ 11%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_commitlog_to_changelog_items[commitlog-2-False-True] PASSED [ 12%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_commitlog_to_changelog_items[commitlog-2-False-False] PASSED [ 12%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_commitlog_to_changelog_items[commitlog-3-True-True] PASSED [ 12%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_commitlog_to_changelog_items[commitlog-3-True-False] PASSED [ 12%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_commitlog_to_changelog_items[commitlog-3-False-True] PASSED [ 12%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_commitlog_to_changelog_items[commitlog-3-False-False] PASSED [ 12%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_commitlog_to_changelog_items[commitlog-4-True-True] PASSED [ 13%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_commitlog_to_changelog_items[commitlog-4-True-False] PASSED [ 13%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_commitlog_to_changelog_items[commitlog-4-False-True] PASSED [ 13%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_commitlog_to_changelog_items[commitlog-4-False-False] PASSED [ 13%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-1-True-True-False-True] PASSED [ 13%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-1-True-True-False-epoch-version] PASSED [ 13%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-1-True-True-False-False] PASSED [ 14%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-1-True-True-True-True] PASSED [ 14%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-1-True-True-True-epoch-version] PASSED [ 14%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-1-True-True-True-False] PASSED [ 14%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-1-True-False-False-True] PASSED [ 14%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-1-True-False-False-epoch-version] PASSED [ 14%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-1-True-False-False-False] PASSED [ 15%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-1-True-False-True-True] PASSED [ 15%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-1-True-False-True-epoch-version] PASSED [ 15%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-1-True-False-True-False] PASSED [ 15%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-1-False-True-False-True] PASSED [ 15%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-1-False-True-False-epoch-version] PASSED [ 15%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-1-False-True-False-False] PASSED [ 15%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-1-False-True-True-True] PASSED [ 16%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-1-False-True-True-epoch-version] PASSED [ 16%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-1-False-True-True-False] PASSED [ 16%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-1-False-False-False-True] PASSED [ 16%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-1-False-False-False-epoch-version] PASSED [ 16%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-1-False-False-False-False] PASSED [ 16%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-1-False-False-True-True] PASSED [ 17%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-1-False-False-True-epoch-version] PASSED [ 17%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-1-False-False-True-False] PASSED [ 17%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-2-True-True-False-True] PASSED [ 17%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-2-True-True-False-epoch-version] PASSED [ 17%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-2-True-True-False-False] PASSED [ 17%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-2-True-True-True-True] PASSED [ 18%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-2-True-True-True-epoch-version] PASSED [ 18%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-2-True-True-True-False] PASSED [ 18%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-2-True-False-False-True] PASSED [ 18%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-2-True-False-False-epoch-version] PASSED [ 18%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-2-True-False-False-False] PASSED [ 18%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-2-True-False-True-True] PASSED [ 19%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-2-True-False-True-epoch-version] PASSED [ 19%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-2-True-False-True-False] PASSED [ 19%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-2-False-True-False-True] PASSED [ 19%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-2-False-True-False-epoch-version] PASSED [ 19%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-2-False-True-False-False] PASSED [ 19%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-2-False-True-True-True] PASSED [ 20%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-2-False-True-True-epoch-version] PASSED [ 20%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-2-False-True-True-False] PASSED [ 20%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-2-False-False-False-True] PASSED [ 20%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-2-False-False-False-epoch-version] PASSED [ 20%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-2-False-False-False-False] PASSED [ 20%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-2-False-False-True-True] PASSED [ 21%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-2-False-False-True-epoch-version] PASSED [ 21%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-2-False-False-True-False] PASSED [ 21%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-3-True-True-False-True] PASSED [ 21%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-3-True-True-False-epoch-version] PASSED [ 21%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-3-True-True-False-False] PASSED [ 21%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-3-True-True-True-True] PASSED [ 21%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-3-True-True-True-epoch-version] PASSED [ 22%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-3-True-True-True-False] PASSED [ 22%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-3-True-False-False-True] PASSED [ 22%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-3-True-False-False-epoch-version] PASSED [ 22%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-3-True-False-False-False] PASSED [ 22%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-3-True-False-True-True] PASSED [ 22%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-3-True-False-True-epoch-version] PASSED [ 23%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-3-True-False-True-False] PASSED [ 23%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-3-False-True-False-True] PASSED [ 23%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-3-False-True-False-epoch-version] PASSED [ 23%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-3-False-True-False-False] PASSED [ 23%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-3-False-True-True-True] PASSED [ 23%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-3-False-True-True-epoch-version] PASSED [ 24%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-3-False-True-True-False] PASSED [ 24%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-3-False-False-False-True] PASSED [ 24%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-3-False-False-False-epoch-version] PASSED [ 24%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-3-False-False-False-False] PASSED [ 24%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-3-False-False-True-True] PASSED [ 24%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-3-False-False-True-epoch-version] PASSED [ 25%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-3-False-False-True-False] PASSED [ 25%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-4-True-True-False-True] PASSED [ 25%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-4-True-True-False-epoch-version] PASSED [ 25%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-4-True-True-False-False] PASSED [ 25%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-4-True-True-True-True] PASSED [ 25%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-4-True-True-True-epoch-version] PASSED [ 26%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-4-True-True-True-False] PASSED [ 26%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-4-True-False-False-True] PASSED [ 26%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-4-True-False-False-epoch-version] PASSED [ 26%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-4-True-False-False-False] PASSED [ 26%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-4-True-False-True-True] PASSED [ 26%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-4-True-False-True-epoch-version] PASSED [ 26%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-4-True-False-True-False] PASSED [ 27%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-4-False-True-False-True] PASSED [ 27%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-4-False-True-False-epoch-version] PASSED [ 27%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-4-False-True-False-False] PASSED [ 27%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-4-False-True-True-True] PASSED [ 27%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-4-False-True-True-epoch-version] PASSED [ 27%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-4-False-True-True-False] PASSED [ 28%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-4-False-False-False-True] PASSED [ 28%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-4-False-False-False-epoch-version] PASSED [ 28%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-4-False-False-False-False] PASSED [ 28%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-4-False-False-True-True] PASSED [ 28%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-4-False-False-True-epoch-version] PASSED [ 28%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format[commitlog-4-False-False-True-False] PASSED [ 29%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format_error[string] PASSED [ 29%] tests/rpmautospec/test_changelog.py::TestChangelogEntry::test_format_error[list] PASSED [ 29%] tests/rpmautospec/test_cli.py::test_main_help PASSED [ 29%] tests/rpmautospec/test_cli.py::test_main_convert[changelog-release1] PASSED [ 29%] tests/rpmautospec/test_cli.py::test_main_convert[changelog-autorelease] PASSED [ 29%] tests/rpmautospec/test_cli.py::test_main_convert[autochangelog-release1] PASSED [ 30%] tests/rpmautospec/test_cli.py::test_main_convert[autochangelog-autorelease] SKIPPED [ 30%] tests/rpmautospec/test_pkg_history.py::TestPkgHistoryProcessor::test___init__[str, is file] PASSED [ 30%] tests/rpmautospec/test_pkg_history.py::TestPkgHistoryProcessor::test___init__[str, is dir] PASSED [ 30%] tests/rpmautospec/test_pkg_history.py::TestPkgHistoryProcessor::test___init__[path, is file] PASSED [ 30%] tests/rpmautospec/test_pkg_history.py::TestPkgHistoryProcessor::test___init__[path, is file, wrong extension] PASSED [ 30%] tests/rpmautospec/test_pkg_history.py::TestPkgHistoryProcessor::test___init__[path, is dir] PASSED [ 31%] tests/rpmautospec/test_pkg_history.py::TestPkgHistoryProcessor::test___init__[doesn't exist] PASSED [ 31%] tests/rpmautospec/test_pkg_history.py::TestPkgHistoryProcessor::test___init__[spec doesn't exist, is dir] PASSED [ 31%] tests/rpmautospec/test_pkg_history.py::TestPkgHistoryProcessor::test___init__[no git repo] PASSED [ 31%] tests/rpmautospec/test_pkg_history.py::TestPkgHistoryProcessor::test___init__[not a regular file] PASSED [ 31%] tests/rpmautospec/test_pkg_history.py::TestPkgHistoryProcessor::test__get_rpmverflags_for_commit[normal] PASSED [ 31%] tests/rpmautospec/test_pkg_history.py::TestPkgHistoryProcessor::test__get_rpmverflags_for_commit[no spec file] PASSED [ 31%] tests/rpmautospec/test_pkg_history.py::TestPkgHistoryProcessor::test__get_rpmverflags_for_commit_cache PASSED [ 32%] tests/rpmautospec/test_pkg_history.py::TestPkgHistoryProcessor::test_run[without commit] PASSED [ 32%] tests/rpmautospec/test_pkg_history.py::TestPkgHistoryProcessor::test_run[with commit] PASSED [ 32%] tests/rpmautospec/test_pkg_history.py::TestPkgHistoryProcessor::test_run[all results] PASSED [ 32%] tests/rpmautospec/test_pkg_history.py::TestPkgHistoryProcessor::test_run[locale set] PASSED [ 32%] tests/rpmautospec/test_pkg_history.py::TestPkgHistoryProcessor::test_run[without repo] PASSED [ 32%] tests/rpmautospec/subcommands/test_convert.py::test_init_invalid_path PASSED [ 33%] tests/rpmautospec/subcommands/test_convert.py::test_init_dirty_tree PASSED [ 33%] tests/rpmautospec/subcommands/test_convert.py::test_main_invalid_args PASSED [ 33%] tests/rpmautospec/subcommands/test_convert.py::test_main_valid_args PASSED [ 33%] tests/rpmautospec/subcommands/test_convert.py::test_autorelease[regular] PASSED [ 33%] tests/rpmautospec/subcommands/test_convert.py::test_autorelease[whitespace] PASSED [ 33%] tests/rpmautospec/subcommands/test_convert.py::test_autorelease[case] PASSED [ 34%] tests/rpmautospec/subcommands/test_convert.py::test_autorelease_already_converted PASSED [ 34%] tests/rpmautospec/subcommands/test_convert.py::test_autorelease_invalid[missing] PASSED [ 34%] tests/rpmautospec/subcommands/test_convert.py::test_autorelease_invalid[multiple] PASSED [ 34%] tests/rpmautospec/subcommands/test_convert.py::test_autochangelog[regular] PASSED [ 34%] tests/rpmautospec/subcommands/test_convert.py::test_autochangelog[case+whitespace] PASSED [ 34%] tests/rpmautospec/subcommands/test_convert.py::test_autochangelog[regular+newlines] PASSED [ 35%] tests/rpmautospec/subcommands/test_convert.py::test_autochangelog_already_converted PASSED [ 35%] tests/rpmautospec/subcommands/test_convert.py::test_autochangelog_invalid[missing] PASSED [ 35%] tests/rpmautospec/subcommands/test_convert.py::test_autochangelog_invalid[multiple] PASSED [ 35%] tests/rpmautospec/subcommands/test_convert.py::test_commit_no_repo PASSED [ 35%] tests/rpmautospec/subcommands/test_convert.py::test_commit[changelog-release1] PASSED [ 35%] tests/rpmautospec/subcommands/test_convert.py::test_commit[changelog-autorelease] PASSED [ 36%] tests/rpmautospec/subcommands/test_convert.py::test_commit[autochangelog-release1] PASSED [ 36%] tests/rpmautospec/subcommands/test_convert.py::test_commit[autochangelog-autorelease] PASSED [ 36%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-unchanged-False-False-False-False] PASSED [ 36%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-unchanged-False-False-False-True] PASSED [ 36%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-unchanged-False-False-True-False] PASSED [ 36%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-unchanged-False-False-True-True] PASSED [ 36%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-unchanged-False-True-False-False] PASSED [ 37%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-unchanged-False-True-False-True] PASSED [ 37%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-unchanged-False-True-True-False] PASSED [ 37%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-unchanged-False-True-True-True] PASSED [ 37%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-unchanged-True-False-False-False] PASSED [ 37%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-unchanged-True-False-False-True] PASSED [ 37%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-unchanged-True-False-True-False] PASSED [ 38%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-unchanged-True-False-True-True] PASSED [ 38%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-unchanged-True-True-False-False] PASSED [ 38%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-unchanged-True-True-False-True] PASSED [ 38%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-unchanged-True-True-True-False] PASSED [ 38%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-unchanged-True-True-True-True] PASSED [ 38%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-changelog case insensitive-False-False-False-False] PASSED [ 39%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-changelog case insensitive-False-False-False-True] PASSED [ 39%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-changelog case insensitive-False-False-True-False] PASSED [ 39%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-changelog case insensitive-False-False-True-True] PASSED [ 39%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-changelog case insensitive-False-True-False-False] PASSED [ 39%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-changelog case insensitive-False-True-False-True] PASSED [ 39%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-changelog case insensitive-False-True-True-False] PASSED [ 40%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-changelog case insensitive-False-True-True-True] PASSED [ 40%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-changelog case insensitive-True-False-False-False] PASSED [ 40%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-changelog case insensitive-True-False-False-True] PASSED [ 40%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-changelog case insensitive-True-False-True-False] PASSED [ 40%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-changelog case insensitive-True-False-True-True] PASSED [ 40%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-changelog case insensitive-True-True-False-False] PASSED [ 41%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-changelog case insensitive-True-True-False-True] PASSED [ 41%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-changelog case insensitive-True-True-True-False] PASSED [ 41%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-changelog case insensitive-True-True-True-True] PASSED [ 41%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-changelog trailing garbage-False-False-False-False] PASSED [ 41%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-changelog trailing garbage-False-False-False-True] PASSED [ 41%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-changelog trailing garbage-False-False-True-False] PASSED [ 42%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-changelog trailing garbage-False-False-True-True] PASSED [ 42%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-changelog trailing garbage-False-True-False-False] PASSED [ 42%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-changelog trailing garbage-False-True-False-True] PASSED [ 42%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-changelog trailing garbage-False-True-True-False] PASSED [ 42%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-changelog trailing garbage-False-True-True-True] PASSED [ 42%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-changelog trailing garbage-True-False-False-False] PASSED [ 42%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-changelog trailing garbage-True-False-False-True] PASSED [ 43%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-changelog trailing garbage-True-False-True-False] PASSED [ 43%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-changelog trailing garbage-True-False-True-True] PASSED [ 43%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-changelog trailing garbage-True-True-False-False] PASSED [ 43%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-changelog trailing garbage-True-True-False-True] PASSED [ 43%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-changelog trailing garbage-True-True-True-False] PASSED [ 43%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-changelog trailing garbage-True-True-True-True] PASSED [ 44%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-line in between-False-False-False-False] PASSED [ 44%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-line in between-False-False-False-True] PASSED [ 44%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-line in between-False-False-True-False] PASSED [ 44%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-line in between-False-False-True-True] PASSED [ 44%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-line in between-False-True-False-False] PASSED [ 44%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-line in between-False-True-False-True] PASSED [ 45%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-line in between-False-True-True-False] PASSED [ 45%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-line in between-False-True-True-True] PASSED [ 45%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-line in between-True-False-False-False] PASSED [ 45%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-line in between-True-False-False-True] PASSED [ 45%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-line in between-True-False-True-False] PASSED [ 45%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-line in between-True-False-True-True] PASSED [ 46%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-line in between-True-True-False-False] PASSED [ 46%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-line in between-True-True-False-True] PASSED [ 46%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-line in between-True-True-True-False] PASSED [ 46%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-line in between-True-True-True-True] PASSED [ 46%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-trailing line-False-False-False-False] PASSED [ 46%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-trailing line-False-False-False-True] PASSED [ 47%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-trailing line-False-False-True-False] PASSED [ 47%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-trailing line-False-False-True-True] PASSED [ 47%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-trailing line-False-True-False-False] PASSED [ 47%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-trailing line-False-True-False-True] PASSED [ 47%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-trailing line-False-True-True-False] PASSED [ 47%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-trailing line-False-True-True-True] PASSED [ 47%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-trailing line-True-False-False-False] PASSED [ 48%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-trailing line-True-False-False-True] PASSED [ 48%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-trailing line-True-False-True-False] PASSED [ 48%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-trailing line-True-False-True-True] PASSED [ 48%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-trailing line-True-True-False-False] PASSED [ 48%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-trailing line-True-True-False-True] PASSED [ 48%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-trailing line-True-True-True-False] PASSED [ 49%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-trailing line-True-True-True-True] PASSED [ 49%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-with braces-False-False-False-False] PASSED [ 49%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-with braces-False-False-False-True] PASSED [ 49%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-with braces-False-False-True-False] PASSED [ 49%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-with braces-False-False-True-True] PASSED [ 49%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-with braces-False-True-False-False] PASSED [ 50%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-with braces-False-True-False-True] PASSED [ 50%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-with braces-False-True-True-False] PASSED [ 50%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-with braces-False-True-True-True] PASSED [ 50%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-with braces-True-False-False-False] PASSED [ 50%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-with braces-True-False-False-True] PASSED [ 50%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-with braces-True-False-True-False] PASSED [ 51%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-with braces-True-False-True-True] PASSED [ 51%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-with braces-True-True-False-False] PASSED [ 51%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-with braces-True-True-False-True] PASSED [ 51%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-with braces-True-True-True-False] PASSED [ 51%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-with braces-True-True-True-True] PASSED [ 51%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-missing-False-False-False-False] PASSED [ 52%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-missing-False-False-False-True] PASSED [ 52%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-missing-False-False-True-False] PASSED [ 52%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-missing-False-False-True-True] PASSED [ 52%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-missing-False-True-False-False] PASSED [ 52%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-missing-False-True-False-True] PASSED [ 52%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-missing-False-True-True-False] PASSED [ 52%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-missing-False-True-True-True] PASSED [ 53%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-missing-True-False-False-False] PASSED [ 53%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-missing-True-False-False-True] PASSED [ 53%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-missing-True-False-True-False] PASSED [ 53%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-missing-True-False-True-True] PASSED [ 53%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-missing-True-True-False-False] PASSED [ 53%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-missing-True-True-False-True] PASSED [ 54%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-missing-True-True-True-False] PASSED [ 54%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-missing-True-True-True-True] PASSED [ 54%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-optional-False-False-False-False] PASSED [ 54%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-optional-False-False-False-True] PASSED [ 54%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-optional-False-False-True-False] PASSED [ 54%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-optional-False-False-True-True] PASSED [ 55%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-optional-False-True-False-False] PASSED [ 55%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-optional-False-True-False-True] PASSED [ 55%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-optional-False-True-True-False] PASSED [ 55%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-optional-False-True-True-True] PASSED [ 55%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-optional-True-False-False-False] PASSED [ 55%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-optional-True-False-False-True] PASSED [ 56%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-optional-True-False-True-False] PASSED [ 56%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-optional-True-False-True-True] PASSED [ 56%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-optional-True-True-False-False] PASSED [ 56%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-optional-True-True-False-True] PASSED [ 56%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-optional-True-True-True-False] PASSED [ 56%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-unchanged-optional-True-True-True-True] PASSED [ 57%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-unchanged-False-False-False-False] PASSED [ 57%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-unchanged-False-False-False-True] PASSED [ 57%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-unchanged-False-False-True-False] PASSED [ 57%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-unchanged-False-False-True-True] PASSED [ 57%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-unchanged-False-True-False-False] PASSED [ 57%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-unchanged-False-True-False-True] PASSED [ 57%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-unchanged-False-True-True-False] PASSED [ 58%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-unchanged-False-True-True-True] PASSED [ 58%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-unchanged-True-False-False-False] PASSED [ 58%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-unchanged-True-False-False-True] PASSED [ 58%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-unchanged-True-False-True-False] PASSED [ 58%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-unchanged-True-False-True-True] PASSED [ 58%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-unchanged-True-True-False-False] PASSED [ 59%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-unchanged-True-True-False-True] PASSED [ 59%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-unchanged-True-True-True-False] PASSED [ 59%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-unchanged-True-True-True-True] PASSED [ 59%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-changelog case insensitive-False-False-False-False] PASSED [ 59%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-changelog case insensitive-False-False-False-True] PASSED [ 59%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-changelog case insensitive-False-False-True-False] PASSED [ 60%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-changelog case insensitive-False-False-True-True] PASSED [ 60%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-changelog case insensitive-False-True-False-False] PASSED [ 60%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-changelog case insensitive-False-True-False-True] PASSED [ 60%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-changelog case insensitive-False-True-True-False] PASSED [ 60%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-changelog case insensitive-False-True-True-True] PASSED [ 60%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-changelog case insensitive-True-False-False-False] PASSED [ 61%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-changelog case insensitive-True-False-False-True] PASSED [ 61%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-changelog case insensitive-True-False-True-False] PASSED [ 61%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-changelog case insensitive-True-False-True-True] PASSED [ 61%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-changelog case insensitive-True-True-False-False] PASSED [ 61%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-changelog case insensitive-True-True-False-True] PASSED [ 61%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-changelog case insensitive-True-True-True-False] PASSED [ 62%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-changelog case insensitive-True-True-True-True] PASSED [ 62%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-changelog trailing garbage-False-False-False-False] PASSED [ 62%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-changelog trailing garbage-False-False-False-True] PASSED [ 62%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-changelog trailing garbage-False-False-True-False] PASSED [ 62%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-changelog trailing garbage-False-False-True-True] PASSED [ 62%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-changelog trailing garbage-False-True-False-False] PASSED [ 63%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-changelog trailing garbage-False-True-False-True] PASSED [ 63%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-changelog trailing garbage-False-True-True-False] PASSED [ 63%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-changelog trailing garbage-False-True-True-True] PASSED [ 63%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-changelog trailing garbage-True-False-False-False] PASSED [ 63%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-changelog trailing garbage-True-False-False-True] PASSED [ 63%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-changelog trailing garbage-True-False-True-False] PASSED [ 63%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-changelog trailing garbage-True-False-True-True] PASSED [ 64%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-changelog trailing garbage-True-True-False-False] PASSED [ 64%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-changelog trailing garbage-True-True-False-True] PASSED [ 64%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-changelog trailing garbage-True-True-True-False] PASSED [ 64%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-changelog trailing garbage-True-True-True-True] PASSED [ 64%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-line in between-False-False-False-False] PASSED [ 64%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-line in between-False-False-False-True] PASSED [ 65%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-line in between-False-False-True-False] PASSED [ 65%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-line in between-False-False-True-True] PASSED [ 65%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-line in between-False-True-False-False] PASSED [ 65%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-line in between-False-True-False-True] PASSED [ 65%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-line in between-False-True-True-False] PASSED [ 65%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-line in between-False-True-True-True] PASSED [ 66%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-line in between-True-False-False-False] PASSED [ 66%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-line in between-True-False-False-True] PASSED [ 66%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-line in between-True-False-True-False] PASSED [ 66%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-line in between-True-False-True-True] PASSED [ 66%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-line in between-True-True-False-False] PASSED [ 66%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-line in between-True-True-False-True] PASSED [ 67%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-line in between-True-True-True-False] PASSED [ 67%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-line in between-True-True-True-True] PASSED [ 67%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-trailing line-False-False-False-False] PASSED [ 67%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-trailing line-False-False-False-True] PASSED [ 67%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-trailing line-False-False-True-False] PASSED [ 67%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-trailing line-False-False-True-True] PASSED [ 68%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-trailing line-False-True-False-False] PASSED [ 68%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-trailing line-False-True-False-True] PASSED [ 68%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-trailing line-False-True-True-False] PASSED [ 68%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-trailing line-False-True-True-True] PASSED [ 68%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-trailing line-True-False-False-False] PASSED [ 68%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-trailing line-True-False-False-True] PASSED [ 68%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-trailing line-True-False-True-False] PASSED [ 69%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-trailing line-True-False-True-True] PASSED [ 69%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-trailing line-True-True-False-False] PASSED [ 69%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-trailing line-True-True-False-True] PASSED [ 69%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-trailing line-True-True-True-False] PASSED [ 69%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-trailing line-True-True-True-True] PASSED [ 69%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-with braces-False-False-False-False] PASSED [ 70%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-with braces-False-False-False-True] PASSED [ 70%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-with braces-False-False-True-False] PASSED [ 70%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-with braces-False-False-True-True] PASSED [ 70%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-with braces-False-True-False-False] PASSED [ 70%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-with braces-False-True-False-True] PASSED [ 70%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-with braces-False-True-True-False] PASSED [ 71%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-with braces-False-True-True-True] PASSED [ 71%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-with braces-True-False-False-False] PASSED [ 71%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-with braces-True-False-False-True] PASSED [ 71%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-with braces-True-False-True-False] PASSED [ 71%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-with braces-True-False-True-True] PASSED [ 71%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-with braces-True-True-False-False] PASSED [ 72%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-with braces-True-True-False-True] PASSED [ 72%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-with braces-True-True-True-False] PASSED [ 72%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-with braces-True-True-True-True] PASSED [ 72%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-missing-False-False-False-False] PASSED [ 72%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-missing-False-False-False-True] PASSED [ 72%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-missing-False-False-True-False] PASSED [ 73%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-missing-False-False-True-True] PASSED [ 73%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-missing-False-True-False-False] PASSED [ 73%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-missing-False-True-False-True] PASSED [ 73%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-missing-False-True-True-False] PASSED [ 73%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-missing-False-True-True-True] PASSED [ 73%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-missing-True-False-False-False] PASSED [ 73%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-missing-True-False-False-True] PASSED [ 74%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-missing-True-False-True-False] PASSED [ 74%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-missing-True-False-True-True] PASSED [ 74%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-missing-True-True-False-False] PASSED [ 74%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-missing-True-True-False-True] PASSED [ 74%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-missing-True-True-True-False] PASSED [ 74%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-missing-True-True-True-True] PASSED [ 75%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-optional-False-False-False-False] PASSED [ 75%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-optional-False-False-False-True] PASSED [ 75%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-optional-False-False-True-False] PASSED [ 75%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-optional-False-False-True-True] PASSED [ 75%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-optional-False-True-False-False] PASSED [ 75%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-optional-False-True-False-True] PASSED [ 76%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-optional-False-True-True-False] PASSED [ 76%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-optional-False-True-True-True] PASSED [ 76%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-optional-True-False-False-False] PASSED [ 76%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-optional-True-False-False-True] PASSED [ 76%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-optional-True-False-True-False] PASSED [ 76%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-optional-True-False-True-True] PASSED [ 77%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-optional-True-True-False-False] PASSED [ 77%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-optional-True-True-False-True] PASSED [ 77%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-optional-True-True-True-False] PASSED [ 77%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-with braces-optional-True-True-True-True] PASSED [ 77%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-unchanged-False-False-False-False] FAILED [ 77%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-unchanged-False-False-False-True] FAILED [ 78%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-unchanged-False-False-True-False] PASSED [ 78%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-unchanged-False-False-True-True] PASSED [ 78%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-unchanged-False-True-False-False] PASSED [ 78%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-unchanged-False-True-False-True] PASSED [ 78%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-unchanged-False-True-True-False] PASSED [ 78%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-unchanged-False-True-True-True] PASSED [ 78%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-unchanged-True-False-False-False] FAILED [ 79%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-unchanged-True-False-False-True] FAILED [ 79%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-unchanged-True-False-True-False] PASSED [ 79%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-unchanged-True-False-True-True] PASSED [ 79%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-unchanged-True-True-False-False] PASSED [ 79%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-unchanged-True-True-False-True] PASSED [ 79%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-unchanged-True-True-True-False] PASSED [ 80%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-unchanged-True-True-True-True] PASSED [ 80%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog case insensitive-False-False-False-False] FAILED [ 80%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog case insensitive-False-False-False-True] FAILED [ 80%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog case insensitive-False-False-True-False] PASSED [ 80%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog case insensitive-False-False-True-True] PASSED [ 80%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog case insensitive-False-True-False-False] PASSED [ 81%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog case insensitive-False-True-False-True] PASSED [ 81%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog case insensitive-False-True-True-False] PASSED [ 81%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog case insensitive-False-True-True-True] PASSED [ 81%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog case insensitive-True-False-False-False] FAILED [ 81%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog case insensitive-True-False-False-True] FAILED [ 81%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog case insensitive-True-False-True-False] PASSED [ 82%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog case insensitive-True-False-True-True] PASSED [ 82%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog case insensitive-True-True-False-False] PASSED [ 82%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog case insensitive-True-True-False-True] PASSED [ 82%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog case insensitive-True-True-True-False] PASSED [ 82%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog case insensitive-True-True-True-True] PASSED [ 82%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog trailing garbage-False-False-False-False] FAILED [ 83%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog trailing garbage-False-False-False-True] FAILED [ 83%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog trailing garbage-False-False-True-False] PASSED [ 83%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog trailing garbage-False-False-True-True] PASSED [ 83%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog trailing garbage-False-True-False-False] PASSED [ 83%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog trailing garbage-False-True-False-True] PASSED [ 83%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog trailing garbage-False-True-True-False] PASSED [ 84%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog trailing garbage-False-True-True-True] PASSED [ 84%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog trailing garbage-True-False-False-False] FAILED [ 84%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog trailing garbage-True-False-False-True] FAILED [ 84%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog trailing garbage-True-False-True-False] PASSED [ 84%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog trailing garbage-True-False-True-True] PASSED [ 84%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog trailing garbage-True-True-False-False] PASSED [ 84%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog trailing garbage-True-True-False-True] PASSED [ 85%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog trailing garbage-True-True-True-False] PASSED [ 85%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog trailing garbage-True-True-True-True] PASSED [ 85%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-line in between-False-False-False-False] FAILED [ 85%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-line in between-False-False-False-True] FAILED [ 85%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-line in between-False-False-True-False] PASSED [ 85%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-line in between-False-False-True-True] PASSED [ 86%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-line in between-False-True-False-False] PASSED [ 86%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-line in between-False-True-False-True] PASSED [ 86%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-line in between-False-True-True-False] PASSED [ 86%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-line in between-False-True-True-True] PASSED [ 86%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-line in between-True-False-False-False] FAILED [ 86%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-line in between-True-False-False-True] FAILED [ 87%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-line in between-True-False-True-False] PASSED [ 87%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-line in between-True-False-True-True] PASSED [ 87%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-line in between-True-True-False-False] PASSED [ 87%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-line in between-True-True-False-True] PASSED [ 87%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-line in between-True-True-True-False] PASSED [ 87%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-line in between-True-True-True-True] PASSED [ 88%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-trailing line-False-False-False-False] FAILED [ 88%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-trailing line-False-False-False-True] FAILED [ 88%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-trailing line-False-False-True-False] PASSED [ 88%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-trailing line-False-False-True-True] PASSED [ 88%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-trailing line-False-True-False-False] PASSED [ 88%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-trailing line-False-True-False-True] PASSED [ 89%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-trailing line-False-True-True-False] PASSED [ 89%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-trailing line-False-True-True-True] PASSED [ 89%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-trailing line-True-False-False-False] FAILED [ 89%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-trailing line-True-False-False-True] FAILED [ 89%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-trailing line-True-False-True-False] PASSED [ 89%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-trailing line-True-False-True-True] PASSED [ 89%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-trailing line-True-True-False-False] PASSED [ 90%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-trailing line-True-True-False-True] PASSED [ 90%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-trailing line-True-True-True-False] PASSED [ 90%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-trailing line-True-True-True-True] PASSED [ 90%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-with braces-False-False-False-False] FAILED [ 90%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-with braces-False-False-False-True] FAILED [ 90%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-with braces-False-False-True-False] PASSED [ 91%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-with braces-False-False-True-True] PASSED [ 91%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-with braces-False-True-False-False] PASSED [ 91%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-with braces-False-True-False-True] PASSED [ 91%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-with braces-False-True-True-False] PASSED [ 91%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-with braces-False-True-True-True] PASSED [ 91%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-with braces-True-False-False-False] FAILED [ 92%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-with braces-True-False-False-True] FAILED [ 92%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-with braces-True-False-True-False] PASSED [ 92%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-with braces-True-False-True-True] PASSED [ 92%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-with braces-True-True-False-False] PASSED [ 92%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-with braces-True-True-False-True] PASSED [ 92%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-with braces-True-True-True-False] PASSED [ 93%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-with braces-True-True-True-True] PASSED [ 93%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-missing-False-False-False-False] FAILED [ 93%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-missing-False-False-False-True] FAILED [ 93%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-missing-False-False-True-False] PASSED [ 93%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-missing-False-False-True-True] PASSED [ 93%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-missing-False-True-False-False] PASSED [ 94%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-missing-False-True-False-True] PASSED [ 94%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-missing-False-True-True-False] PASSED [ 94%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-missing-False-True-True-True] PASSED [ 94%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-missing-True-False-False-False] FAILED [ 94%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-missing-True-False-False-True] FAILED [ 94%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-missing-True-False-True-False] PASSED [ 94%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-missing-True-False-True-True] PASSED [ 95%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-missing-True-True-False-False] PASSED [ 95%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-missing-True-True-False-True] PASSED [ 95%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-missing-True-True-True-False] PASSED [ 95%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-missing-True-True-True-True] PASSED [ 95%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-optional-False-False-False-False] FAILED [ 95%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-optional-False-False-False-True] FAILED [ 96%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-optional-False-False-True-False] PASSED [ 96%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-optional-False-False-True-True] PASSED [ 96%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-optional-False-True-False-False] PASSED [ 96%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-optional-False-True-False-True] PASSED [ 96%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-optional-False-True-True-False] PASSED [ 96%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-optional-False-True-True-True] PASSED [ 97%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-optional-True-False-False-False] FAILED [ 97%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-optional-True-False-False-True] FAILED [ 97%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-optional-True-False-True-False] PASSED [ 97%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-optional-True-False-True-True] PASSED [ 97%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-optional-True-True-False-False] PASSED [ 97%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-optional-True-True-False-True] PASSED [ 98%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-optional-True-True-True-False] PASSED [ 98%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-optional-True-True-True-True] PASSED [ 98%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[epel8-unchanged-unchanged-False-False-False-False] PASSED [ 98%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[epel8-unchanged-unchanged-False-False-False-True] PASSED [ 98%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[epel8-unchanged-unchanged-False-False-True-False] PASSED [ 98%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[epel8-unchanged-unchanged-False-False-True-True] PASSED [ 99%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[epel8-unchanged-unchanged-False-True-False-False] PASSED [ 99%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[epel8-unchanged-unchanged-False-True-False-True] PASSED [ 99%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[epel8-unchanged-unchanged-False-True-True-False] PASSED [ 99%] tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[epel8-unchanged-unchanged-False-True-True-True] PASSED [ 99%] tests/rpmautospec/subcommands/test_release.py::TestRelease::test_calculate_release[calculate_release] PASSED [ 99%] tests/rpmautospec/subcommands/test_release.py::TestRelease::test_calculate_release[main] PASSED [100%] =================================== FAILURES =================================== ___ test_process_distgit[rawhide-optional-unchanged-False-False-False-False] ___ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_process_distgit_rawhide_o0') overwrite_specfile = False, branch = 'rawhide', dirty_worktree = False autorelease_case = 'optional', autochangelog_case = 'unchanged' remove_changelog_file = False, is_processed = False @pytest.mark.parametrize("overwrite_specfile", (False, True)) @pytest.mark.parametrize("dirty_worktree", (False, True)) @pytest.mark.parametrize( "branch, autorelease_case, autochangelog_case, remove_changelog_file, is_processed", _generate_branch_testcase_combinations(), ) def test_process_distgit( tmp_path, overwrite_specfile, branch, dirty_worktree, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ): """Test the process_distgit() function""" workdir = str(tmp_path) with tarfile.open( os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster-git.tar.gz", ) ) as tar: # Ensure unpackaged files are owned by user for member in tar: member.uid = os.getuid() member.gid = os.getgid() try: tar.extractall(path=workdir, numeric_owner=True, filter="data") except TypeError: # Filtering was introduced in Python 3.12. tar.extractall(path=workdir, numeric_owner=True) unpacked_repo_dir = os.path.join(workdir, "dummy-test-package-gloster") test_spec_file_path = os.path.join( unpacked_repo_dir, "dummy-test-package-gloster.spec", ) with temporary_cd(unpacked_repo_dir): run(["git", "checkout", branch]) if autorelease_case != "unchanged" or autochangelog_case != "unchanged" or is_processed: fuzz_spec_file( test_spec_file_path, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ) if remove_changelog_file: os.unlink(os.path.join(unpacked_repo_dir, "changelog")) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ) and not dirty_worktree: run_git_amend(unpacked_repo_dir) if overwrite_specfile: target_spec_file_path = None else: target_spec_file_path = os.path.join(workdir, "test-this-specfile-please.spec") orig_test_spec_file_stat = os.stat(test_spec_file_path) # Set restrictive umask to check that file mode is preserved. old_umask = os.umask(0o077) real_cls = process_distgit.PkgHistoryProcessor processor_run = None with mock.patch( "rpmautospec.subcommands.process_distgit.PkgHistoryProcessor", ) as processor_cls: def wrap_cls(*args, **kwargs): nonlocal processor_run obj = real_cls(*args, **kwargs) processor_run = obj.run = mock.Mock(wraps=obj.run) return obj processor_cls.side_effect = wrap_cls retval = process_distgit.process_distgit(unpacked_repo_dir, target_spec_file_path) # And restore previous umask. os.umask(old_umask) if is_processed: # No processing should be done if the spec file was processed before already. assert not retval processor_run.assert_not_called() return # Input spec file was not processed before, should have been processed now. assert retval is not False processor_run.assert_called() test_spec_file_stat = os.stat(test_spec_file_path) attrs = ["mode", "ino", "dev", "uid", "gid"] if not overwrite_specfile: attrs.extend(["size", "mtime", "ctime"]) for attr in attrs: assert getattr(test_spec_file_stat, "st_" + attr) == getattr( orig_test_spec_file_stat, "st_" + attr ) expected_spec_file_path = os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster.spec.expected", ) with tempfile.NamedTemporaryFile() as tmpspec: shutil.copy2(expected_spec_file_path, tmpspec.name) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): if autochangelog_case not in ( "changelog case insensitive", "changelog trailing garbage", ): # "%changelog", "%ChAnGeLoG", ... stay verbatim, trick fuzz_spec_file() to # leave the rest of the cases as is, the %autorelease macro is expanded. fuzz_autochangelog_case = "unchanged" else: fuzz_autochangelog_case = autochangelog_case expected_spec_file_path = tmpspec.name fuzz_spec_file( expected_spec_file_path, autorelease_case, fuzz_autochangelog_case, remove_changelog_file, is_processed, ) rpm_cmd = [ "rpm", "--define", "dist .fc32", "--define", "_changelog_trimage 0", "--define", "_changelog_trimtime 0", "--specfile", ] if target_spec_file_path: test_cmd = rpm_cmd + [target_spec_file_path] else: test_cmd = rpm_cmd + [test_spec_file_path] expected_cmd = rpm_cmd + [expected_spec_file_path] q_release = ["--qf", "%{release}\n"] test_output = check_output(test_cmd + q_release, encoding="utf-8").strip() test_relnum, test_rest = relnum_split(test_output) expected_output = check_output(expected_cmd + q_release, encoding="utf-8").strip() expected_relnum, expected_rest = relnum_split(expected_output) if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): expected_relnum += 1 if branch == "epel8": expected_relnum += 1 assert test_relnum == expected_relnum assert test_rest == expected_rest q_changelog = ["--changelog"] test_output = check_output(test_cmd + q_changelog, encoding="utf-8") expected_output = check_output(expected_cmd + q_changelog, encoding="utf-8") if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): diff = list(difflib.ndiff(expected_output.splitlines(), test_output.splitlines())) # verify entry for uncommitted changes assert all(line.startswith("+ ") for line in diff[:3]) assert diff[0].endswith(f"-{expected_relnum}") assert diff[1] == "+ - Uncommitted changes" assert diff[2] == "+ " # verify the rest is the expected changelog assert all(line.startswith(" ") for line in diff[3:]) assert expected_output.splitlines() == [line[2:] for line in diff[3:]] else: > assert test_output == expected_output E AssertionError: assert '* Mon Apr 26...ging work\n\n' == '* Mon Apr 26...ging work\n\n' E - * Mon Apr 26 2021 Stephen Coady - 0-11 E ? ------- E + * Mon Apr 26 2021 Stephen Coady E - use autorelease instead of autorel E E * Fri Mar 27 2020 Pierre-Yves Chibon - 0-10 E - Change license to MIT... E E ...Full output truncated (23 lines hidden), use '-vv' to show tests/rpmautospec/subcommands/test_process_distgit.py:355: AssertionError ----------------------------- Captured stdout call ----------------------------- [rawhide 2c103cb] use autorelease instead of autorel Author: Stephen Coady Date: Mon Apr 26 12:30:48 2021 +0100 1 file changed, 1 insertion(+), 1 deletion(-) ----------------------------- Captured stderr call ----------------------------- Already on 'rawhide' error: line 6: Empty tag: Release: error: Unable to open dummy-test-package-gloster.spec: No such file or directory warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: Package dummy-test-package-gloster: invalid utf-8 encoding in License: CC� - Invalid argument warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel ___ test_process_distgit[rawhide-optional-unchanged-False-False-False-True] ____ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_process_distgit_rawhide_o1') overwrite_specfile = True, branch = 'rawhide', dirty_worktree = False autorelease_case = 'optional', autochangelog_case = 'unchanged' remove_changelog_file = False, is_processed = False @pytest.mark.parametrize("overwrite_specfile", (False, True)) @pytest.mark.parametrize("dirty_worktree", (False, True)) @pytest.mark.parametrize( "branch, autorelease_case, autochangelog_case, remove_changelog_file, is_processed", _generate_branch_testcase_combinations(), ) def test_process_distgit( tmp_path, overwrite_specfile, branch, dirty_worktree, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ): """Test the process_distgit() function""" workdir = str(tmp_path) with tarfile.open( os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster-git.tar.gz", ) ) as tar: # Ensure unpackaged files are owned by user for member in tar: member.uid = os.getuid() member.gid = os.getgid() try: tar.extractall(path=workdir, numeric_owner=True, filter="data") except TypeError: # Filtering was introduced in Python 3.12. tar.extractall(path=workdir, numeric_owner=True) unpacked_repo_dir = os.path.join(workdir, "dummy-test-package-gloster") test_spec_file_path = os.path.join( unpacked_repo_dir, "dummy-test-package-gloster.spec", ) with temporary_cd(unpacked_repo_dir): run(["git", "checkout", branch]) if autorelease_case != "unchanged" or autochangelog_case != "unchanged" or is_processed: fuzz_spec_file( test_spec_file_path, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ) if remove_changelog_file: os.unlink(os.path.join(unpacked_repo_dir, "changelog")) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ) and not dirty_worktree: run_git_amend(unpacked_repo_dir) if overwrite_specfile: target_spec_file_path = None else: target_spec_file_path = os.path.join(workdir, "test-this-specfile-please.spec") orig_test_spec_file_stat = os.stat(test_spec_file_path) # Set restrictive umask to check that file mode is preserved. old_umask = os.umask(0o077) real_cls = process_distgit.PkgHistoryProcessor processor_run = None with mock.patch( "rpmautospec.subcommands.process_distgit.PkgHistoryProcessor", ) as processor_cls: def wrap_cls(*args, **kwargs): nonlocal processor_run obj = real_cls(*args, **kwargs) processor_run = obj.run = mock.Mock(wraps=obj.run) return obj processor_cls.side_effect = wrap_cls retval = process_distgit.process_distgit(unpacked_repo_dir, target_spec_file_path) # And restore previous umask. os.umask(old_umask) if is_processed: # No processing should be done if the spec file was processed before already. assert not retval processor_run.assert_not_called() return # Input spec file was not processed before, should have been processed now. assert retval is not False processor_run.assert_called() test_spec_file_stat = os.stat(test_spec_file_path) attrs = ["mode", "ino", "dev", "uid", "gid"] if not overwrite_specfile: attrs.extend(["size", "mtime", "ctime"]) for attr in attrs: assert getattr(test_spec_file_stat, "st_" + attr) == getattr( orig_test_spec_file_stat, "st_" + attr ) expected_spec_file_path = os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster.spec.expected", ) with tempfile.NamedTemporaryFile() as tmpspec: shutil.copy2(expected_spec_file_path, tmpspec.name) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): if autochangelog_case not in ( "changelog case insensitive", "changelog trailing garbage", ): # "%changelog", "%ChAnGeLoG", ... stay verbatim, trick fuzz_spec_file() to # leave the rest of the cases as is, the %autorelease macro is expanded. fuzz_autochangelog_case = "unchanged" else: fuzz_autochangelog_case = autochangelog_case expected_spec_file_path = tmpspec.name fuzz_spec_file( expected_spec_file_path, autorelease_case, fuzz_autochangelog_case, remove_changelog_file, is_processed, ) rpm_cmd = [ "rpm", "--define", "dist .fc32", "--define", "_changelog_trimage 0", "--define", "_changelog_trimtime 0", "--specfile", ] if target_spec_file_path: test_cmd = rpm_cmd + [target_spec_file_path] else: test_cmd = rpm_cmd + [test_spec_file_path] expected_cmd = rpm_cmd + [expected_spec_file_path] q_release = ["--qf", "%{release}\n"] test_output = check_output(test_cmd + q_release, encoding="utf-8").strip() test_relnum, test_rest = relnum_split(test_output) expected_output = check_output(expected_cmd + q_release, encoding="utf-8").strip() expected_relnum, expected_rest = relnum_split(expected_output) if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): expected_relnum += 1 if branch == "epel8": expected_relnum += 1 assert test_relnum == expected_relnum assert test_rest == expected_rest q_changelog = ["--changelog"] test_output = check_output(test_cmd + q_changelog, encoding="utf-8") expected_output = check_output(expected_cmd + q_changelog, encoding="utf-8") if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): diff = list(difflib.ndiff(expected_output.splitlines(), test_output.splitlines())) # verify entry for uncommitted changes assert all(line.startswith("+ ") for line in diff[:3]) assert diff[0].endswith(f"-{expected_relnum}") assert diff[1] == "+ - Uncommitted changes" assert diff[2] == "+ " # verify the rest is the expected changelog assert all(line.startswith(" ") for line in diff[3:]) assert expected_output.splitlines() == [line[2:] for line in diff[3:]] else: > assert test_output == expected_output E AssertionError: assert '* Mon Apr 26...ging work\n\n' == '* Mon Apr 26...ging work\n\n' E - * Mon Apr 26 2021 Stephen Coady - 0-11 E ? ------- E + * Mon Apr 26 2021 Stephen Coady E - use autorelease instead of autorel E E * Fri Mar 27 2020 Pierre-Yves Chibon - 0-10 E - Change license to MIT... E E ...Full output truncated (23 lines hidden), use '-vv' to show tests/rpmautospec/subcommands/test_process_distgit.py:355: AssertionError ----------------------------- Captured stdout call ----------------------------- [rawhide 2c103cb] use autorelease instead of autorel Author: Stephen Coady Date: Mon Apr 26 12:30:48 2021 +0100 1 file changed, 1 insertion(+), 1 deletion(-) ----------------------------- Captured stderr call ----------------------------- Already on 'rawhide' error: line 6: Empty tag: Release: error: Unable to open dummy-test-package-gloster.spec: No such file or directory warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: Package dummy-test-package-gloster: invalid utf-8 encoding in License: CC� - Invalid argument warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel ___ test_process_distgit[rawhide-optional-unchanged-True-False-False-False] ____ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_process_distgit_rawhide_o8') overwrite_specfile = False, branch = 'rawhide', dirty_worktree = False autorelease_case = 'optional', autochangelog_case = 'unchanged' remove_changelog_file = True, is_processed = False @pytest.mark.parametrize("overwrite_specfile", (False, True)) @pytest.mark.parametrize("dirty_worktree", (False, True)) @pytest.mark.parametrize( "branch, autorelease_case, autochangelog_case, remove_changelog_file, is_processed", _generate_branch_testcase_combinations(), ) def test_process_distgit( tmp_path, overwrite_specfile, branch, dirty_worktree, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ): """Test the process_distgit() function""" workdir = str(tmp_path) with tarfile.open( os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster-git.tar.gz", ) ) as tar: # Ensure unpackaged files are owned by user for member in tar: member.uid = os.getuid() member.gid = os.getgid() try: tar.extractall(path=workdir, numeric_owner=True, filter="data") except TypeError: # Filtering was introduced in Python 3.12. tar.extractall(path=workdir, numeric_owner=True) unpacked_repo_dir = os.path.join(workdir, "dummy-test-package-gloster") test_spec_file_path = os.path.join( unpacked_repo_dir, "dummy-test-package-gloster.spec", ) with temporary_cd(unpacked_repo_dir): run(["git", "checkout", branch]) if autorelease_case != "unchanged" or autochangelog_case != "unchanged" or is_processed: fuzz_spec_file( test_spec_file_path, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ) if remove_changelog_file: os.unlink(os.path.join(unpacked_repo_dir, "changelog")) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ) and not dirty_worktree: run_git_amend(unpacked_repo_dir) if overwrite_specfile: target_spec_file_path = None else: target_spec_file_path = os.path.join(workdir, "test-this-specfile-please.spec") orig_test_spec_file_stat = os.stat(test_spec_file_path) # Set restrictive umask to check that file mode is preserved. old_umask = os.umask(0o077) real_cls = process_distgit.PkgHistoryProcessor processor_run = None with mock.patch( "rpmautospec.subcommands.process_distgit.PkgHistoryProcessor", ) as processor_cls: def wrap_cls(*args, **kwargs): nonlocal processor_run obj = real_cls(*args, **kwargs) processor_run = obj.run = mock.Mock(wraps=obj.run) return obj processor_cls.side_effect = wrap_cls retval = process_distgit.process_distgit(unpacked_repo_dir, target_spec_file_path) # And restore previous umask. os.umask(old_umask) if is_processed: # No processing should be done if the spec file was processed before already. assert not retval processor_run.assert_not_called() return # Input spec file was not processed before, should have been processed now. assert retval is not False processor_run.assert_called() test_spec_file_stat = os.stat(test_spec_file_path) attrs = ["mode", "ino", "dev", "uid", "gid"] if not overwrite_specfile: attrs.extend(["size", "mtime", "ctime"]) for attr in attrs: assert getattr(test_spec_file_stat, "st_" + attr) == getattr( orig_test_spec_file_stat, "st_" + attr ) expected_spec_file_path = os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster.spec.expected", ) with tempfile.NamedTemporaryFile() as tmpspec: shutil.copy2(expected_spec_file_path, tmpspec.name) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): if autochangelog_case not in ( "changelog case insensitive", "changelog trailing garbage", ): # "%changelog", "%ChAnGeLoG", ... stay verbatim, trick fuzz_spec_file() to # leave the rest of the cases as is, the %autorelease macro is expanded. fuzz_autochangelog_case = "unchanged" else: fuzz_autochangelog_case = autochangelog_case expected_spec_file_path = tmpspec.name fuzz_spec_file( expected_spec_file_path, autorelease_case, fuzz_autochangelog_case, remove_changelog_file, is_processed, ) rpm_cmd = [ "rpm", "--define", "dist .fc32", "--define", "_changelog_trimage 0", "--define", "_changelog_trimtime 0", "--specfile", ] if target_spec_file_path: test_cmd = rpm_cmd + [target_spec_file_path] else: test_cmd = rpm_cmd + [test_spec_file_path] expected_cmd = rpm_cmd + [expected_spec_file_path] q_release = ["--qf", "%{release}\n"] test_output = check_output(test_cmd + q_release, encoding="utf-8").strip() test_relnum, test_rest = relnum_split(test_output) expected_output = check_output(expected_cmd + q_release, encoding="utf-8").strip() expected_relnum, expected_rest = relnum_split(expected_output) if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): expected_relnum += 1 if branch == "epel8": expected_relnum += 1 assert test_relnum == expected_relnum assert test_rest == expected_rest q_changelog = ["--changelog"] test_output = check_output(test_cmd + q_changelog, encoding="utf-8") expected_output = check_output(expected_cmd + q_changelog, encoding="utf-8") if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): diff = list(difflib.ndiff(expected_output.splitlines(), test_output.splitlines())) # verify entry for uncommitted changes assert all(line.startswith("+ ") for line in diff[:3]) assert diff[0].endswith(f"-{expected_relnum}") assert diff[1] == "+ - Uncommitted changes" assert diff[2] == "+ " # verify the rest is the expected changelog assert all(line.startswith(" ") for line in diff[3:]) assert expected_output.splitlines() == [line[2:] for line in diff[3:]] else: > assert test_output == expected_output E AssertionError: assert '* Mon Apr 26...ncodings!\n\n' == '* Mon Apr 26...ncodings!\n\n' E - * Mon Apr 26 2021 Stephen Coady - 0-11 E ? ------- E + * Mon Apr 26 2021 Stephen Coady E - use autorelease instead of autorel E E * Fri Mar 27 2020 Pierre-Yves Chibon - 0-10 E - Change license to MIT... E E ...Full output truncated (8 lines hidden), use '-vv' to show tests/rpmautospec/subcommands/test_process_distgit.py:355: AssertionError ----------------------------- Captured stdout call ----------------------------- [rawhide ab2a981] use autorelease instead of autorel Author: Stephen Coady Date: Mon Apr 26 12:30:48 2021 +0100 2 files changed, 1 insertion(+), 15 deletions(-) delete mode 100644 changelog ----------------------------- Captured stderr call ----------------------------- Already on 'rawhide' error: line 6: Empty tag: Release: error: Unable to open dummy-test-package-gloster.spec: No such file or directory warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: Package dummy-test-package-gloster: invalid utf-8 encoding in License: CC� - Invalid argument warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel ____ test_process_distgit[rawhide-optional-unchanged-True-False-False-True] ____ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_process_distgit_rawhide_o9') overwrite_specfile = True, branch = 'rawhide', dirty_worktree = False autorelease_case = 'optional', autochangelog_case = 'unchanged' remove_changelog_file = True, is_processed = False @pytest.mark.parametrize("overwrite_specfile", (False, True)) @pytest.mark.parametrize("dirty_worktree", (False, True)) @pytest.mark.parametrize( "branch, autorelease_case, autochangelog_case, remove_changelog_file, is_processed", _generate_branch_testcase_combinations(), ) def test_process_distgit( tmp_path, overwrite_specfile, branch, dirty_worktree, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ): """Test the process_distgit() function""" workdir = str(tmp_path) with tarfile.open( os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster-git.tar.gz", ) ) as tar: # Ensure unpackaged files are owned by user for member in tar: member.uid = os.getuid() member.gid = os.getgid() try: tar.extractall(path=workdir, numeric_owner=True, filter="data") except TypeError: # Filtering was introduced in Python 3.12. tar.extractall(path=workdir, numeric_owner=True) unpacked_repo_dir = os.path.join(workdir, "dummy-test-package-gloster") test_spec_file_path = os.path.join( unpacked_repo_dir, "dummy-test-package-gloster.spec", ) with temporary_cd(unpacked_repo_dir): run(["git", "checkout", branch]) if autorelease_case != "unchanged" or autochangelog_case != "unchanged" or is_processed: fuzz_spec_file( test_spec_file_path, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ) if remove_changelog_file: os.unlink(os.path.join(unpacked_repo_dir, "changelog")) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ) and not dirty_worktree: run_git_amend(unpacked_repo_dir) if overwrite_specfile: target_spec_file_path = None else: target_spec_file_path = os.path.join(workdir, "test-this-specfile-please.spec") orig_test_spec_file_stat = os.stat(test_spec_file_path) # Set restrictive umask to check that file mode is preserved. old_umask = os.umask(0o077) real_cls = process_distgit.PkgHistoryProcessor processor_run = None with mock.patch( "rpmautospec.subcommands.process_distgit.PkgHistoryProcessor", ) as processor_cls: def wrap_cls(*args, **kwargs): nonlocal processor_run obj = real_cls(*args, **kwargs) processor_run = obj.run = mock.Mock(wraps=obj.run) return obj processor_cls.side_effect = wrap_cls retval = process_distgit.process_distgit(unpacked_repo_dir, target_spec_file_path) # And restore previous umask. os.umask(old_umask) if is_processed: # No processing should be done if the spec file was processed before already. assert not retval processor_run.assert_not_called() return # Input spec file was not processed before, should have been processed now. assert retval is not False processor_run.assert_called() test_spec_file_stat = os.stat(test_spec_file_path) attrs = ["mode", "ino", "dev", "uid", "gid"] if not overwrite_specfile: attrs.extend(["size", "mtime", "ctime"]) for attr in attrs: assert getattr(test_spec_file_stat, "st_" + attr) == getattr( orig_test_spec_file_stat, "st_" + attr ) expected_spec_file_path = os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster.spec.expected", ) with tempfile.NamedTemporaryFile() as tmpspec: shutil.copy2(expected_spec_file_path, tmpspec.name) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): if autochangelog_case not in ( "changelog case insensitive", "changelog trailing garbage", ): # "%changelog", "%ChAnGeLoG", ... stay verbatim, trick fuzz_spec_file() to # leave the rest of the cases as is, the %autorelease macro is expanded. fuzz_autochangelog_case = "unchanged" else: fuzz_autochangelog_case = autochangelog_case expected_spec_file_path = tmpspec.name fuzz_spec_file( expected_spec_file_path, autorelease_case, fuzz_autochangelog_case, remove_changelog_file, is_processed, ) rpm_cmd = [ "rpm", "--define", "dist .fc32", "--define", "_changelog_trimage 0", "--define", "_changelog_trimtime 0", "--specfile", ] if target_spec_file_path: test_cmd = rpm_cmd + [target_spec_file_path] else: test_cmd = rpm_cmd + [test_spec_file_path] expected_cmd = rpm_cmd + [expected_spec_file_path] q_release = ["--qf", "%{release}\n"] test_output = check_output(test_cmd + q_release, encoding="utf-8").strip() test_relnum, test_rest = relnum_split(test_output) expected_output = check_output(expected_cmd + q_release, encoding="utf-8").strip() expected_relnum, expected_rest = relnum_split(expected_output) if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): expected_relnum += 1 if branch == "epel8": expected_relnum += 1 assert test_relnum == expected_relnum assert test_rest == expected_rest q_changelog = ["--changelog"] test_output = check_output(test_cmd + q_changelog, encoding="utf-8") expected_output = check_output(expected_cmd + q_changelog, encoding="utf-8") if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): diff = list(difflib.ndiff(expected_output.splitlines(), test_output.splitlines())) # verify entry for uncommitted changes assert all(line.startswith("+ ") for line in diff[:3]) assert diff[0].endswith(f"-{expected_relnum}") assert diff[1] == "+ - Uncommitted changes" assert diff[2] == "+ " # verify the rest is the expected changelog assert all(line.startswith(" ") for line in diff[3:]) assert expected_output.splitlines() == [line[2:] for line in diff[3:]] else: > assert test_output == expected_output E AssertionError: assert '* Mon Apr 26...ncodings!\n\n' == '* Mon Apr 26...ncodings!\n\n' E - * Mon Apr 26 2021 Stephen Coady - 0-11 E ? ------- E + * Mon Apr 26 2021 Stephen Coady E - use autorelease instead of autorel E E * Fri Mar 27 2020 Pierre-Yves Chibon - 0-10 E - Change license to MIT... E E ...Full output truncated (8 lines hidden), use '-vv' to show tests/rpmautospec/subcommands/test_process_distgit.py:355: AssertionError ----------------------------- Captured stdout call ----------------------------- [rawhide ab2a981] use autorelease instead of autorel Author: Stephen Coady Date: Mon Apr 26 12:30:48 2021 +0100 2 files changed, 1 insertion(+), 15 deletions(-) delete mode 100644 changelog ----------------------------- Captured stderr call ----------------------------- Already on 'rawhide' error: line 6: Empty tag: Release: error: Unable to open dummy-test-package-gloster.spec: No such file or directory warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: Package dummy-test-package-gloster: invalid utf-8 encoding in License: CC� - Invalid argument warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel _ test_process_distgit[rawhide-optional-changelog case insensitive-False-False-False-False] _ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_process_distgit_rawhide_o16') overwrite_specfile = False, branch = 'rawhide', dirty_worktree = False autorelease_case = 'optional', autochangelog_case = 'changelog case insensitive' remove_changelog_file = False, is_processed = False @pytest.mark.parametrize("overwrite_specfile", (False, True)) @pytest.mark.parametrize("dirty_worktree", (False, True)) @pytest.mark.parametrize( "branch, autorelease_case, autochangelog_case, remove_changelog_file, is_processed", _generate_branch_testcase_combinations(), ) def test_process_distgit( tmp_path, overwrite_specfile, branch, dirty_worktree, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ): """Test the process_distgit() function""" workdir = str(tmp_path) with tarfile.open( os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster-git.tar.gz", ) ) as tar: # Ensure unpackaged files are owned by user for member in tar: member.uid = os.getuid() member.gid = os.getgid() try: tar.extractall(path=workdir, numeric_owner=True, filter="data") except TypeError: # Filtering was introduced in Python 3.12. tar.extractall(path=workdir, numeric_owner=True) unpacked_repo_dir = os.path.join(workdir, "dummy-test-package-gloster") test_spec_file_path = os.path.join( unpacked_repo_dir, "dummy-test-package-gloster.spec", ) with temporary_cd(unpacked_repo_dir): run(["git", "checkout", branch]) if autorelease_case != "unchanged" or autochangelog_case != "unchanged" or is_processed: fuzz_spec_file( test_spec_file_path, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ) if remove_changelog_file: os.unlink(os.path.join(unpacked_repo_dir, "changelog")) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ) and not dirty_worktree: run_git_amend(unpacked_repo_dir) if overwrite_specfile: target_spec_file_path = None else: target_spec_file_path = os.path.join(workdir, "test-this-specfile-please.spec") orig_test_spec_file_stat = os.stat(test_spec_file_path) # Set restrictive umask to check that file mode is preserved. old_umask = os.umask(0o077) real_cls = process_distgit.PkgHistoryProcessor processor_run = None with mock.patch( "rpmautospec.subcommands.process_distgit.PkgHistoryProcessor", ) as processor_cls: def wrap_cls(*args, **kwargs): nonlocal processor_run obj = real_cls(*args, **kwargs) processor_run = obj.run = mock.Mock(wraps=obj.run) return obj processor_cls.side_effect = wrap_cls retval = process_distgit.process_distgit(unpacked_repo_dir, target_spec_file_path) # And restore previous umask. os.umask(old_umask) if is_processed: # No processing should be done if the spec file was processed before already. assert not retval processor_run.assert_not_called() return # Input spec file was not processed before, should have been processed now. assert retval is not False processor_run.assert_called() test_spec_file_stat = os.stat(test_spec_file_path) attrs = ["mode", "ino", "dev", "uid", "gid"] if not overwrite_specfile: attrs.extend(["size", "mtime", "ctime"]) for attr in attrs: assert getattr(test_spec_file_stat, "st_" + attr) == getattr( orig_test_spec_file_stat, "st_" + attr ) expected_spec_file_path = os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster.spec.expected", ) with tempfile.NamedTemporaryFile() as tmpspec: shutil.copy2(expected_spec_file_path, tmpspec.name) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): if autochangelog_case not in ( "changelog case insensitive", "changelog trailing garbage", ): # "%changelog", "%ChAnGeLoG", ... stay verbatim, trick fuzz_spec_file() to # leave the rest of the cases as is, the %autorelease macro is expanded. fuzz_autochangelog_case = "unchanged" else: fuzz_autochangelog_case = autochangelog_case expected_spec_file_path = tmpspec.name fuzz_spec_file( expected_spec_file_path, autorelease_case, fuzz_autochangelog_case, remove_changelog_file, is_processed, ) rpm_cmd = [ "rpm", "--define", "dist .fc32", "--define", "_changelog_trimage 0", "--define", "_changelog_trimtime 0", "--specfile", ] if target_spec_file_path: test_cmd = rpm_cmd + [target_spec_file_path] else: test_cmd = rpm_cmd + [test_spec_file_path] expected_cmd = rpm_cmd + [expected_spec_file_path] q_release = ["--qf", "%{release}\n"] test_output = check_output(test_cmd + q_release, encoding="utf-8").strip() test_relnum, test_rest = relnum_split(test_output) expected_output = check_output(expected_cmd + q_release, encoding="utf-8").strip() expected_relnum, expected_rest = relnum_split(expected_output) if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): expected_relnum += 1 if branch == "epel8": expected_relnum += 1 assert test_relnum == expected_relnum assert test_rest == expected_rest q_changelog = ["--changelog"] test_output = check_output(test_cmd + q_changelog, encoding="utf-8") expected_output = check_output(expected_cmd + q_changelog, encoding="utf-8") if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): diff = list(difflib.ndiff(expected_output.splitlines(), test_output.splitlines())) # verify entry for uncommitted changes assert all(line.startswith("+ ") for line in diff[:3]) assert diff[0].endswith(f"-{expected_relnum}") assert diff[1] == "+ - Uncommitted changes" assert diff[2] == "+ " # verify the rest is the expected changelog assert all(line.startswith(" ") for line in diff[3:]) assert expected_output.splitlines() == [line[2:] for line in diff[3:]] else: > assert test_output == expected_output E AssertionError: assert '* Mon Apr 26...ging work\n\n' == '* Mon Apr 26...ging work\n\n' E - * Mon Apr 26 2021 Stephen Coady - 0-11 E ? ------- E + * Mon Apr 26 2021 Stephen Coady E - use autorelease instead of autorel E E * Fri Mar 27 2020 Pierre-Yves Chibon - 0-10 E - Change license to MIT... E E ...Full output truncated (23 lines hidden), use '-vv' to show tests/rpmautospec/subcommands/test_process_distgit.py:355: AssertionError ----------------------------- Captured stdout call ----------------------------- [rawhide af5e284] use autorelease instead of autorel Author: Stephen Coady Date: Mon Apr 26 12:30:48 2021 +0100 1 file changed, 2 insertions(+), 2 deletions(-) ----------------------------- Captured stderr call ----------------------------- Already on 'rawhide' error: line 6: Empty tag: Release: error: Unable to open dummy-test-package-gloster.spec: No such file or directory warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: Package dummy-test-package-gloster: invalid utf-8 encoding in License: CC� - Invalid argument warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel _ test_process_distgit[rawhide-optional-changelog case insensitive-False-False-False-True] _ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_process_distgit_rawhide_o17') overwrite_specfile = True, branch = 'rawhide', dirty_worktree = False autorelease_case = 'optional', autochangelog_case = 'changelog case insensitive' remove_changelog_file = False, is_processed = False @pytest.mark.parametrize("overwrite_specfile", (False, True)) @pytest.mark.parametrize("dirty_worktree", (False, True)) @pytest.mark.parametrize( "branch, autorelease_case, autochangelog_case, remove_changelog_file, is_processed", _generate_branch_testcase_combinations(), ) def test_process_distgit( tmp_path, overwrite_specfile, branch, dirty_worktree, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ): """Test the process_distgit() function""" workdir = str(tmp_path) with tarfile.open( os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster-git.tar.gz", ) ) as tar: # Ensure unpackaged files are owned by user for member in tar: member.uid = os.getuid() member.gid = os.getgid() try: tar.extractall(path=workdir, numeric_owner=True, filter="data") except TypeError: # Filtering was introduced in Python 3.12. tar.extractall(path=workdir, numeric_owner=True) unpacked_repo_dir = os.path.join(workdir, "dummy-test-package-gloster") test_spec_file_path = os.path.join( unpacked_repo_dir, "dummy-test-package-gloster.spec", ) with temporary_cd(unpacked_repo_dir): run(["git", "checkout", branch]) if autorelease_case != "unchanged" or autochangelog_case != "unchanged" or is_processed: fuzz_spec_file( test_spec_file_path, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ) if remove_changelog_file: os.unlink(os.path.join(unpacked_repo_dir, "changelog")) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ) and not dirty_worktree: run_git_amend(unpacked_repo_dir) if overwrite_specfile: target_spec_file_path = None else: target_spec_file_path = os.path.join(workdir, "test-this-specfile-please.spec") orig_test_spec_file_stat = os.stat(test_spec_file_path) # Set restrictive umask to check that file mode is preserved. old_umask = os.umask(0o077) real_cls = process_distgit.PkgHistoryProcessor processor_run = None with mock.patch( "rpmautospec.subcommands.process_distgit.PkgHistoryProcessor", ) as processor_cls: def wrap_cls(*args, **kwargs): nonlocal processor_run obj = real_cls(*args, **kwargs) processor_run = obj.run = mock.Mock(wraps=obj.run) return obj processor_cls.side_effect = wrap_cls retval = process_distgit.process_distgit(unpacked_repo_dir, target_spec_file_path) # And restore previous umask. os.umask(old_umask) if is_processed: # No processing should be done if the spec file was processed before already. assert not retval processor_run.assert_not_called() return # Input spec file was not processed before, should have been processed now. assert retval is not False processor_run.assert_called() test_spec_file_stat = os.stat(test_spec_file_path) attrs = ["mode", "ino", "dev", "uid", "gid"] if not overwrite_specfile: attrs.extend(["size", "mtime", "ctime"]) for attr in attrs: assert getattr(test_spec_file_stat, "st_" + attr) == getattr( orig_test_spec_file_stat, "st_" + attr ) expected_spec_file_path = os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster.spec.expected", ) with tempfile.NamedTemporaryFile() as tmpspec: shutil.copy2(expected_spec_file_path, tmpspec.name) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): if autochangelog_case not in ( "changelog case insensitive", "changelog trailing garbage", ): # "%changelog", "%ChAnGeLoG", ... stay verbatim, trick fuzz_spec_file() to # leave the rest of the cases as is, the %autorelease macro is expanded. fuzz_autochangelog_case = "unchanged" else: fuzz_autochangelog_case = autochangelog_case expected_spec_file_path = tmpspec.name fuzz_spec_file( expected_spec_file_path, autorelease_case, fuzz_autochangelog_case, remove_changelog_file, is_processed, ) rpm_cmd = [ "rpm", "--define", "dist .fc32", "--define", "_changelog_trimage 0", "--define", "_changelog_trimtime 0", "--specfile", ] if target_spec_file_path: test_cmd = rpm_cmd + [target_spec_file_path] else: test_cmd = rpm_cmd + [test_spec_file_path] expected_cmd = rpm_cmd + [expected_spec_file_path] q_release = ["--qf", "%{release}\n"] test_output = check_output(test_cmd + q_release, encoding="utf-8").strip() test_relnum, test_rest = relnum_split(test_output) expected_output = check_output(expected_cmd + q_release, encoding="utf-8").strip() expected_relnum, expected_rest = relnum_split(expected_output) if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): expected_relnum += 1 if branch == "epel8": expected_relnum += 1 assert test_relnum == expected_relnum assert test_rest == expected_rest q_changelog = ["--changelog"] test_output = check_output(test_cmd + q_changelog, encoding="utf-8") expected_output = check_output(expected_cmd + q_changelog, encoding="utf-8") if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): diff = list(difflib.ndiff(expected_output.splitlines(), test_output.splitlines())) # verify entry for uncommitted changes assert all(line.startswith("+ ") for line in diff[:3]) assert diff[0].endswith(f"-{expected_relnum}") assert diff[1] == "+ - Uncommitted changes" assert diff[2] == "+ " # verify the rest is the expected changelog assert all(line.startswith(" ") for line in diff[3:]) assert expected_output.splitlines() == [line[2:] for line in diff[3:]] else: > assert test_output == expected_output E AssertionError: assert '* Mon Apr 26...ging work\n\n' == '* Mon Apr 26...ging work\n\n' E - * Mon Apr 26 2021 Stephen Coady - 0-11 E ? ------- E + * Mon Apr 26 2021 Stephen Coady E - use autorelease instead of autorel E E * Fri Mar 27 2020 Pierre-Yves Chibon - 0-10 E - Change license to MIT... E E ...Full output truncated (23 lines hidden), use '-vv' to show tests/rpmautospec/subcommands/test_process_distgit.py:355: AssertionError ----------------------------- Captured stdout call ----------------------------- [rawhide af5e284] use autorelease instead of autorel Author: Stephen Coady Date: Mon Apr 26 12:30:48 2021 +0100 1 file changed, 2 insertions(+), 2 deletions(-) ----------------------------- Captured stderr call ----------------------------- Already on 'rawhide' error: line 6: Empty tag: Release: error: Unable to open dummy-test-package-gloster.spec: No such file or directory warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: Package dummy-test-package-gloster: invalid utf-8 encoding in License: CC� - Invalid argument warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel _ test_process_distgit[rawhide-optional-changelog case insensitive-True-False-False-False] _ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_process_distgit_rawhide_o24') overwrite_specfile = False, branch = 'rawhide', dirty_worktree = False autorelease_case = 'optional', autochangelog_case = 'changelog case insensitive' remove_changelog_file = True, is_processed = False @pytest.mark.parametrize("overwrite_specfile", (False, True)) @pytest.mark.parametrize("dirty_worktree", (False, True)) @pytest.mark.parametrize( "branch, autorelease_case, autochangelog_case, remove_changelog_file, is_processed", _generate_branch_testcase_combinations(), ) def test_process_distgit( tmp_path, overwrite_specfile, branch, dirty_worktree, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ): """Test the process_distgit() function""" workdir = str(tmp_path) with tarfile.open( os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster-git.tar.gz", ) ) as tar: # Ensure unpackaged files are owned by user for member in tar: member.uid = os.getuid() member.gid = os.getgid() try: tar.extractall(path=workdir, numeric_owner=True, filter="data") except TypeError: # Filtering was introduced in Python 3.12. tar.extractall(path=workdir, numeric_owner=True) unpacked_repo_dir = os.path.join(workdir, "dummy-test-package-gloster") test_spec_file_path = os.path.join( unpacked_repo_dir, "dummy-test-package-gloster.spec", ) with temporary_cd(unpacked_repo_dir): run(["git", "checkout", branch]) if autorelease_case != "unchanged" or autochangelog_case != "unchanged" or is_processed: fuzz_spec_file( test_spec_file_path, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ) if remove_changelog_file: os.unlink(os.path.join(unpacked_repo_dir, "changelog")) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ) and not dirty_worktree: run_git_amend(unpacked_repo_dir) if overwrite_specfile: target_spec_file_path = None else: target_spec_file_path = os.path.join(workdir, "test-this-specfile-please.spec") orig_test_spec_file_stat = os.stat(test_spec_file_path) # Set restrictive umask to check that file mode is preserved. old_umask = os.umask(0o077) real_cls = process_distgit.PkgHistoryProcessor processor_run = None with mock.patch( "rpmautospec.subcommands.process_distgit.PkgHistoryProcessor", ) as processor_cls: def wrap_cls(*args, **kwargs): nonlocal processor_run obj = real_cls(*args, **kwargs) processor_run = obj.run = mock.Mock(wraps=obj.run) return obj processor_cls.side_effect = wrap_cls retval = process_distgit.process_distgit(unpacked_repo_dir, target_spec_file_path) # And restore previous umask. os.umask(old_umask) if is_processed: # No processing should be done if the spec file was processed before already. assert not retval processor_run.assert_not_called() return # Input spec file was not processed before, should have been processed now. assert retval is not False processor_run.assert_called() test_spec_file_stat = os.stat(test_spec_file_path) attrs = ["mode", "ino", "dev", "uid", "gid"] if not overwrite_specfile: attrs.extend(["size", "mtime", "ctime"]) for attr in attrs: assert getattr(test_spec_file_stat, "st_" + attr) == getattr( orig_test_spec_file_stat, "st_" + attr ) expected_spec_file_path = os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster.spec.expected", ) with tempfile.NamedTemporaryFile() as tmpspec: shutil.copy2(expected_spec_file_path, tmpspec.name) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): if autochangelog_case not in ( "changelog case insensitive", "changelog trailing garbage", ): # "%changelog", "%ChAnGeLoG", ... stay verbatim, trick fuzz_spec_file() to # leave the rest of the cases as is, the %autorelease macro is expanded. fuzz_autochangelog_case = "unchanged" else: fuzz_autochangelog_case = autochangelog_case expected_spec_file_path = tmpspec.name fuzz_spec_file( expected_spec_file_path, autorelease_case, fuzz_autochangelog_case, remove_changelog_file, is_processed, ) rpm_cmd = [ "rpm", "--define", "dist .fc32", "--define", "_changelog_trimage 0", "--define", "_changelog_trimtime 0", "--specfile", ] if target_spec_file_path: test_cmd = rpm_cmd + [target_spec_file_path] else: test_cmd = rpm_cmd + [test_spec_file_path] expected_cmd = rpm_cmd + [expected_spec_file_path] q_release = ["--qf", "%{release}\n"] test_output = check_output(test_cmd + q_release, encoding="utf-8").strip() test_relnum, test_rest = relnum_split(test_output) expected_output = check_output(expected_cmd + q_release, encoding="utf-8").strip() expected_relnum, expected_rest = relnum_split(expected_output) if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): expected_relnum += 1 if branch == "epel8": expected_relnum += 1 assert test_relnum == expected_relnum assert test_rest == expected_rest q_changelog = ["--changelog"] test_output = check_output(test_cmd + q_changelog, encoding="utf-8") expected_output = check_output(expected_cmd + q_changelog, encoding="utf-8") if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): diff = list(difflib.ndiff(expected_output.splitlines(), test_output.splitlines())) # verify entry for uncommitted changes assert all(line.startswith("+ ") for line in diff[:3]) assert diff[0].endswith(f"-{expected_relnum}") assert diff[1] == "+ - Uncommitted changes" assert diff[2] == "+ " # verify the rest is the expected changelog assert all(line.startswith(" ") for line in diff[3:]) assert expected_output.splitlines() == [line[2:] for line in diff[3:]] else: > assert test_output == expected_output E AssertionError: assert '* Mon Apr 26...ncodings!\n\n' == '* Mon Apr 26...ncodings!\n\n' E - * Mon Apr 26 2021 Stephen Coady - 0-11 E ? ------- E + * Mon Apr 26 2021 Stephen Coady E - use autorelease instead of autorel E E * Fri Mar 27 2020 Pierre-Yves Chibon - 0-10 E - Change license to MIT... E E ...Full output truncated (8 lines hidden), use '-vv' to show tests/rpmautospec/subcommands/test_process_distgit.py:355: AssertionError ----------------------------- Captured stdout call ----------------------------- [rawhide cde21d5] use autorelease instead of autorel Author: Stephen Coady Date: Mon Apr 26 12:30:48 2021 +0100 2 files changed, 2 insertions(+), 16 deletions(-) delete mode 100644 changelog ----------------------------- Captured stderr call ----------------------------- Already on 'rawhide' error: line 6: Empty tag: Release: error: Unable to open dummy-test-package-gloster.spec: No such file or directory warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: Package dummy-test-package-gloster: invalid utf-8 encoding in License: CC� - Invalid argument warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel _ test_process_distgit[rawhide-optional-changelog case insensitive-True-False-False-True] _ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_process_distgit_rawhide_o25') overwrite_specfile = True, branch = 'rawhide', dirty_worktree = False autorelease_case = 'optional', autochangelog_case = 'changelog case insensitive' remove_changelog_file = True, is_processed = False @pytest.mark.parametrize("overwrite_specfile", (False, True)) @pytest.mark.parametrize("dirty_worktree", (False, True)) @pytest.mark.parametrize( "branch, autorelease_case, autochangelog_case, remove_changelog_file, is_processed", _generate_branch_testcase_combinations(), ) def test_process_distgit( tmp_path, overwrite_specfile, branch, dirty_worktree, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ): """Test the process_distgit() function""" workdir = str(tmp_path) with tarfile.open( os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster-git.tar.gz", ) ) as tar: # Ensure unpackaged files are owned by user for member in tar: member.uid = os.getuid() member.gid = os.getgid() try: tar.extractall(path=workdir, numeric_owner=True, filter="data") except TypeError: # Filtering was introduced in Python 3.12. tar.extractall(path=workdir, numeric_owner=True) unpacked_repo_dir = os.path.join(workdir, "dummy-test-package-gloster") test_spec_file_path = os.path.join( unpacked_repo_dir, "dummy-test-package-gloster.spec", ) with temporary_cd(unpacked_repo_dir): run(["git", "checkout", branch]) if autorelease_case != "unchanged" or autochangelog_case != "unchanged" or is_processed: fuzz_spec_file( test_spec_file_path, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ) if remove_changelog_file: os.unlink(os.path.join(unpacked_repo_dir, "changelog")) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ) and not dirty_worktree: run_git_amend(unpacked_repo_dir) if overwrite_specfile: target_spec_file_path = None else: target_spec_file_path = os.path.join(workdir, "test-this-specfile-please.spec") orig_test_spec_file_stat = os.stat(test_spec_file_path) # Set restrictive umask to check that file mode is preserved. old_umask = os.umask(0o077) real_cls = process_distgit.PkgHistoryProcessor processor_run = None with mock.patch( "rpmautospec.subcommands.process_distgit.PkgHistoryProcessor", ) as processor_cls: def wrap_cls(*args, **kwargs): nonlocal processor_run obj = real_cls(*args, **kwargs) processor_run = obj.run = mock.Mock(wraps=obj.run) return obj processor_cls.side_effect = wrap_cls retval = process_distgit.process_distgit(unpacked_repo_dir, target_spec_file_path) # And restore previous umask. os.umask(old_umask) if is_processed: # No processing should be done if the spec file was processed before already. assert not retval processor_run.assert_not_called() return # Input spec file was not processed before, should have been processed now. assert retval is not False processor_run.assert_called() test_spec_file_stat = os.stat(test_spec_file_path) attrs = ["mode", "ino", "dev", "uid", "gid"] if not overwrite_specfile: attrs.extend(["size", "mtime", "ctime"]) for attr in attrs: assert getattr(test_spec_file_stat, "st_" + attr) == getattr( orig_test_spec_file_stat, "st_" + attr ) expected_spec_file_path = os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster.spec.expected", ) with tempfile.NamedTemporaryFile() as tmpspec: shutil.copy2(expected_spec_file_path, tmpspec.name) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): if autochangelog_case not in ( "changelog case insensitive", "changelog trailing garbage", ): # "%changelog", "%ChAnGeLoG", ... stay verbatim, trick fuzz_spec_file() to # leave the rest of the cases as is, the %autorelease macro is expanded. fuzz_autochangelog_case = "unchanged" else: fuzz_autochangelog_case = autochangelog_case expected_spec_file_path = tmpspec.name fuzz_spec_file( expected_spec_file_path, autorelease_case, fuzz_autochangelog_case, remove_changelog_file, is_processed, ) rpm_cmd = [ "rpm", "--define", "dist .fc32", "--define", "_changelog_trimage 0", "--define", "_changelog_trimtime 0", "--specfile", ] if target_spec_file_path: test_cmd = rpm_cmd + [target_spec_file_path] else: test_cmd = rpm_cmd + [test_spec_file_path] expected_cmd = rpm_cmd + [expected_spec_file_path] q_release = ["--qf", "%{release}\n"] test_output = check_output(test_cmd + q_release, encoding="utf-8").strip() test_relnum, test_rest = relnum_split(test_output) expected_output = check_output(expected_cmd + q_release, encoding="utf-8").strip() expected_relnum, expected_rest = relnum_split(expected_output) if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): expected_relnum += 1 if branch == "epel8": expected_relnum += 1 assert test_relnum == expected_relnum assert test_rest == expected_rest q_changelog = ["--changelog"] test_output = check_output(test_cmd + q_changelog, encoding="utf-8") expected_output = check_output(expected_cmd + q_changelog, encoding="utf-8") if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): diff = list(difflib.ndiff(expected_output.splitlines(), test_output.splitlines())) # verify entry for uncommitted changes assert all(line.startswith("+ ") for line in diff[:3]) assert diff[0].endswith(f"-{expected_relnum}") assert diff[1] == "+ - Uncommitted changes" assert diff[2] == "+ " # verify the rest is the expected changelog assert all(line.startswith(" ") for line in diff[3:]) assert expected_output.splitlines() == [line[2:] for line in diff[3:]] else: > assert test_output == expected_output E AssertionError: assert '* Mon Apr 26...ncodings!\n\n' == '* Mon Apr 26...ncodings!\n\n' E - * Mon Apr 26 2021 Stephen Coady - 0-11 E ? ------- E + * Mon Apr 26 2021 Stephen Coady E - use autorelease instead of autorel E E * Fri Mar 27 2020 Pierre-Yves Chibon - 0-10 E - Change license to MIT... E E ...Full output truncated (8 lines hidden), use '-vv' to show tests/rpmautospec/subcommands/test_process_distgit.py:355: AssertionError ----------------------------- Captured stdout call ----------------------------- [rawhide cde21d5] use autorelease instead of autorel Author: Stephen Coady Date: Mon Apr 26 12:30:48 2021 +0100 2 files changed, 2 insertions(+), 16 deletions(-) delete mode 100644 changelog ----------------------------- Captured stderr call ----------------------------- Already on 'rawhide' error: line 6: Empty tag: Release: error: Unable to open dummy-test-package-gloster.spec: No such file or directory warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: Package dummy-test-package-gloster: invalid utf-8 encoding in License: CC� - Invalid argument warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel _ test_process_distgit[rawhide-optional-changelog trailing garbage-False-False-False-False] _ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_process_distgit_rawhide_o32') overwrite_specfile = False, branch = 'rawhide', dirty_worktree = False autorelease_case = 'optional', autochangelog_case = 'changelog trailing garbage' remove_changelog_file = False, is_processed = False @pytest.mark.parametrize("overwrite_specfile", (False, True)) @pytest.mark.parametrize("dirty_worktree", (False, True)) @pytest.mark.parametrize( "branch, autorelease_case, autochangelog_case, remove_changelog_file, is_processed", _generate_branch_testcase_combinations(), ) def test_process_distgit( tmp_path, overwrite_specfile, branch, dirty_worktree, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ): """Test the process_distgit() function""" workdir = str(tmp_path) with tarfile.open( os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster-git.tar.gz", ) ) as tar: # Ensure unpackaged files are owned by user for member in tar: member.uid = os.getuid() member.gid = os.getgid() try: tar.extractall(path=workdir, numeric_owner=True, filter="data") except TypeError: # Filtering was introduced in Python 3.12. tar.extractall(path=workdir, numeric_owner=True) unpacked_repo_dir = os.path.join(workdir, "dummy-test-package-gloster") test_spec_file_path = os.path.join( unpacked_repo_dir, "dummy-test-package-gloster.spec", ) with temporary_cd(unpacked_repo_dir): run(["git", "checkout", branch]) if autorelease_case != "unchanged" or autochangelog_case != "unchanged" or is_processed: fuzz_spec_file( test_spec_file_path, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ) if remove_changelog_file: os.unlink(os.path.join(unpacked_repo_dir, "changelog")) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ) and not dirty_worktree: run_git_amend(unpacked_repo_dir) if overwrite_specfile: target_spec_file_path = None else: target_spec_file_path = os.path.join(workdir, "test-this-specfile-please.spec") orig_test_spec_file_stat = os.stat(test_spec_file_path) # Set restrictive umask to check that file mode is preserved. old_umask = os.umask(0o077) real_cls = process_distgit.PkgHistoryProcessor processor_run = None with mock.patch( "rpmautospec.subcommands.process_distgit.PkgHistoryProcessor", ) as processor_cls: def wrap_cls(*args, **kwargs): nonlocal processor_run obj = real_cls(*args, **kwargs) processor_run = obj.run = mock.Mock(wraps=obj.run) return obj processor_cls.side_effect = wrap_cls retval = process_distgit.process_distgit(unpacked_repo_dir, target_spec_file_path) # And restore previous umask. os.umask(old_umask) if is_processed: # No processing should be done if the spec file was processed before already. assert not retval processor_run.assert_not_called() return # Input spec file was not processed before, should have been processed now. assert retval is not False processor_run.assert_called() test_spec_file_stat = os.stat(test_spec_file_path) attrs = ["mode", "ino", "dev", "uid", "gid"] if not overwrite_specfile: attrs.extend(["size", "mtime", "ctime"]) for attr in attrs: assert getattr(test_spec_file_stat, "st_" + attr) == getattr( orig_test_spec_file_stat, "st_" + attr ) expected_spec_file_path = os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster.spec.expected", ) with tempfile.NamedTemporaryFile() as tmpspec: shutil.copy2(expected_spec_file_path, tmpspec.name) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): if autochangelog_case not in ( "changelog case insensitive", "changelog trailing garbage", ): # "%changelog", "%ChAnGeLoG", ... stay verbatim, trick fuzz_spec_file() to # leave the rest of the cases as is, the %autorelease macro is expanded. fuzz_autochangelog_case = "unchanged" else: fuzz_autochangelog_case = autochangelog_case expected_spec_file_path = tmpspec.name fuzz_spec_file( expected_spec_file_path, autorelease_case, fuzz_autochangelog_case, remove_changelog_file, is_processed, ) rpm_cmd = [ "rpm", "--define", "dist .fc32", "--define", "_changelog_trimage 0", "--define", "_changelog_trimtime 0", "--specfile", ] if target_spec_file_path: test_cmd = rpm_cmd + [target_spec_file_path] else: test_cmd = rpm_cmd + [test_spec_file_path] expected_cmd = rpm_cmd + [expected_spec_file_path] q_release = ["--qf", "%{release}\n"] test_output = check_output(test_cmd + q_release, encoding="utf-8").strip() test_relnum, test_rest = relnum_split(test_output) expected_output = check_output(expected_cmd + q_release, encoding="utf-8").strip() expected_relnum, expected_rest = relnum_split(expected_output) if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): expected_relnum += 1 if branch == "epel8": expected_relnum += 1 assert test_relnum == expected_relnum assert test_rest == expected_rest q_changelog = ["--changelog"] test_output = check_output(test_cmd + q_changelog, encoding="utf-8") expected_output = check_output(expected_cmd + q_changelog, encoding="utf-8") if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): diff = list(difflib.ndiff(expected_output.splitlines(), test_output.splitlines())) # verify entry for uncommitted changes assert all(line.startswith("+ ") for line in diff[:3]) assert diff[0].endswith(f"-{expected_relnum}") assert diff[1] == "+ - Uncommitted changes" assert diff[2] == "+ " # verify the rest is the expected changelog assert all(line.startswith(" ") for line in diff[3:]) assert expected_output.splitlines() == [line[2:] for line in diff[3:]] else: > assert test_output == expected_output E AssertionError: assert '* Mon Apr 26...ging work\n\n' == '* Mon Apr 26...ging work\n\n' E - * Mon Apr 26 2021 Stephen Coady - 0-11 E ? ------- E + * Mon Apr 26 2021 Stephen Coady E - use autorelease instead of autorel E E * Fri Mar 27 2020 Pierre-Yves Chibon - 0-10 E - Change license to MIT... E E ...Full output truncated (23 lines hidden), use '-vv' to show tests/rpmautospec/subcommands/test_process_distgit.py:355: AssertionError ----------------------------- Captured stdout call ----------------------------- [rawhide ed69326] use autorelease instead of autorel Author: Stephen Coady Date: Mon Apr 26 12:30:48 2021 +0100 1 file changed, 2 insertions(+), 2 deletions(-) ----------------------------- Captured stderr call ----------------------------- Already on 'rawhide' error: line 6: Empty tag: Release: error: Unable to open dummy-test-package-gloster.spec: No such file or directory warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: Package dummy-test-package-gloster: invalid utf-8 encoding in License: CC� - Invalid argument warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel _ test_process_distgit[rawhide-optional-changelog trailing garbage-False-False-False-True] _ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_process_distgit_rawhide_o33') overwrite_specfile = True, branch = 'rawhide', dirty_worktree = False autorelease_case = 'optional', autochangelog_case = 'changelog trailing garbage' remove_changelog_file = False, is_processed = False @pytest.mark.parametrize("overwrite_specfile", (False, True)) @pytest.mark.parametrize("dirty_worktree", (False, True)) @pytest.mark.parametrize( "branch, autorelease_case, autochangelog_case, remove_changelog_file, is_processed", _generate_branch_testcase_combinations(), ) def test_process_distgit( tmp_path, overwrite_specfile, branch, dirty_worktree, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ): """Test the process_distgit() function""" workdir = str(tmp_path) with tarfile.open( os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster-git.tar.gz", ) ) as tar: # Ensure unpackaged files are owned by user for member in tar: member.uid = os.getuid() member.gid = os.getgid() try: tar.extractall(path=workdir, numeric_owner=True, filter="data") except TypeError: # Filtering was introduced in Python 3.12. tar.extractall(path=workdir, numeric_owner=True) unpacked_repo_dir = os.path.join(workdir, "dummy-test-package-gloster") test_spec_file_path = os.path.join( unpacked_repo_dir, "dummy-test-package-gloster.spec", ) with temporary_cd(unpacked_repo_dir): run(["git", "checkout", branch]) if autorelease_case != "unchanged" or autochangelog_case != "unchanged" or is_processed: fuzz_spec_file( test_spec_file_path, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ) if remove_changelog_file: os.unlink(os.path.join(unpacked_repo_dir, "changelog")) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ) and not dirty_worktree: run_git_amend(unpacked_repo_dir) if overwrite_specfile: target_spec_file_path = None else: target_spec_file_path = os.path.join(workdir, "test-this-specfile-please.spec") orig_test_spec_file_stat = os.stat(test_spec_file_path) # Set restrictive umask to check that file mode is preserved. old_umask = os.umask(0o077) real_cls = process_distgit.PkgHistoryProcessor processor_run = None with mock.patch( "rpmautospec.subcommands.process_distgit.PkgHistoryProcessor", ) as processor_cls: def wrap_cls(*args, **kwargs): nonlocal processor_run obj = real_cls(*args, **kwargs) processor_run = obj.run = mock.Mock(wraps=obj.run) return obj processor_cls.side_effect = wrap_cls retval = process_distgit.process_distgit(unpacked_repo_dir, target_spec_file_path) # And restore previous umask. os.umask(old_umask) if is_processed: # No processing should be done if the spec file was processed before already. assert not retval processor_run.assert_not_called() return # Input spec file was not processed before, should have been processed now. assert retval is not False processor_run.assert_called() test_spec_file_stat = os.stat(test_spec_file_path) attrs = ["mode", "ino", "dev", "uid", "gid"] if not overwrite_specfile: attrs.extend(["size", "mtime", "ctime"]) for attr in attrs: assert getattr(test_spec_file_stat, "st_" + attr) == getattr( orig_test_spec_file_stat, "st_" + attr ) expected_spec_file_path = os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster.spec.expected", ) with tempfile.NamedTemporaryFile() as tmpspec: shutil.copy2(expected_spec_file_path, tmpspec.name) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): if autochangelog_case not in ( "changelog case insensitive", "changelog trailing garbage", ): # "%changelog", "%ChAnGeLoG", ... stay verbatim, trick fuzz_spec_file() to # leave the rest of the cases as is, the %autorelease macro is expanded. fuzz_autochangelog_case = "unchanged" else: fuzz_autochangelog_case = autochangelog_case expected_spec_file_path = tmpspec.name fuzz_spec_file( expected_spec_file_path, autorelease_case, fuzz_autochangelog_case, remove_changelog_file, is_processed, ) rpm_cmd = [ "rpm", "--define", "dist .fc32", "--define", "_changelog_trimage 0", "--define", "_changelog_trimtime 0", "--specfile", ] if target_spec_file_path: test_cmd = rpm_cmd + [target_spec_file_path] else: test_cmd = rpm_cmd + [test_spec_file_path] expected_cmd = rpm_cmd + [expected_spec_file_path] q_release = ["--qf", "%{release}\n"] test_output = check_output(test_cmd + q_release, encoding="utf-8").strip() test_relnum, test_rest = relnum_split(test_output) expected_output = check_output(expected_cmd + q_release, encoding="utf-8").strip() expected_relnum, expected_rest = relnum_split(expected_output) if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): expected_relnum += 1 if branch == "epel8": expected_relnum += 1 assert test_relnum == expected_relnum assert test_rest == expected_rest q_changelog = ["--changelog"] test_output = check_output(test_cmd + q_changelog, encoding="utf-8") expected_output = check_output(expected_cmd + q_changelog, encoding="utf-8") if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): diff = list(difflib.ndiff(expected_output.splitlines(), test_output.splitlines())) # verify entry for uncommitted changes assert all(line.startswith("+ ") for line in diff[:3]) assert diff[0].endswith(f"-{expected_relnum}") assert diff[1] == "+ - Uncommitted changes" assert diff[2] == "+ " # verify the rest is the expected changelog assert all(line.startswith(" ") for line in diff[3:]) assert expected_output.splitlines() == [line[2:] for line in diff[3:]] else: > assert test_output == expected_output E AssertionError: assert '* Mon Apr 26...ging work\n\n' == '* Mon Apr 26...ging work\n\n' E - * Mon Apr 26 2021 Stephen Coady - 0-11 E ? ------- E + * Mon Apr 26 2021 Stephen Coady E - use autorelease instead of autorel E E * Fri Mar 27 2020 Pierre-Yves Chibon - 0-10 E - Change license to MIT... E E ...Full output truncated (23 lines hidden), use '-vv' to show tests/rpmautospec/subcommands/test_process_distgit.py:355: AssertionError ----------------------------- Captured stdout call ----------------------------- [rawhide ed69326] use autorelease instead of autorel Author: Stephen Coady Date: Mon Apr 26 12:30:48 2021 +0100 1 file changed, 2 insertions(+), 2 deletions(-) ----------------------------- Captured stderr call ----------------------------- Already on 'rawhide' error: line 6: Empty tag: Release: error: Unable to open dummy-test-package-gloster.spec: No such file or directory warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: Package dummy-test-package-gloster: invalid utf-8 encoding in License: CC� - Invalid argument warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel _ test_process_distgit[rawhide-optional-changelog trailing garbage-True-False-False-False] _ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_process_distgit_rawhide_o40') overwrite_specfile = False, branch = 'rawhide', dirty_worktree = False autorelease_case = 'optional', autochangelog_case = 'changelog trailing garbage' remove_changelog_file = True, is_processed = False @pytest.mark.parametrize("overwrite_specfile", (False, True)) @pytest.mark.parametrize("dirty_worktree", (False, True)) @pytest.mark.parametrize( "branch, autorelease_case, autochangelog_case, remove_changelog_file, is_processed", _generate_branch_testcase_combinations(), ) def test_process_distgit( tmp_path, overwrite_specfile, branch, dirty_worktree, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ): """Test the process_distgit() function""" workdir = str(tmp_path) with tarfile.open( os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster-git.tar.gz", ) ) as tar: # Ensure unpackaged files are owned by user for member in tar: member.uid = os.getuid() member.gid = os.getgid() try: tar.extractall(path=workdir, numeric_owner=True, filter="data") except TypeError: # Filtering was introduced in Python 3.12. tar.extractall(path=workdir, numeric_owner=True) unpacked_repo_dir = os.path.join(workdir, "dummy-test-package-gloster") test_spec_file_path = os.path.join( unpacked_repo_dir, "dummy-test-package-gloster.spec", ) with temporary_cd(unpacked_repo_dir): run(["git", "checkout", branch]) if autorelease_case != "unchanged" or autochangelog_case != "unchanged" or is_processed: fuzz_spec_file( test_spec_file_path, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ) if remove_changelog_file: os.unlink(os.path.join(unpacked_repo_dir, "changelog")) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ) and not dirty_worktree: run_git_amend(unpacked_repo_dir) if overwrite_specfile: target_spec_file_path = None else: target_spec_file_path = os.path.join(workdir, "test-this-specfile-please.spec") orig_test_spec_file_stat = os.stat(test_spec_file_path) # Set restrictive umask to check that file mode is preserved. old_umask = os.umask(0o077) real_cls = process_distgit.PkgHistoryProcessor processor_run = None with mock.patch( "rpmautospec.subcommands.process_distgit.PkgHistoryProcessor", ) as processor_cls: def wrap_cls(*args, **kwargs): nonlocal processor_run obj = real_cls(*args, **kwargs) processor_run = obj.run = mock.Mock(wraps=obj.run) return obj processor_cls.side_effect = wrap_cls retval = process_distgit.process_distgit(unpacked_repo_dir, target_spec_file_path) # And restore previous umask. os.umask(old_umask) if is_processed: # No processing should be done if the spec file was processed before already. assert not retval processor_run.assert_not_called() return # Input spec file was not processed before, should have been processed now. assert retval is not False processor_run.assert_called() test_spec_file_stat = os.stat(test_spec_file_path) attrs = ["mode", "ino", "dev", "uid", "gid"] if not overwrite_specfile: attrs.extend(["size", "mtime", "ctime"]) for attr in attrs: assert getattr(test_spec_file_stat, "st_" + attr) == getattr( orig_test_spec_file_stat, "st_" + attr ) expected_spec_file_path = os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster.spec.expected", ) with tempfile.NamedTemporaryFile() as tmpspec: shutil.copy2(expected_spec_file_path, tmpspec.name) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): if autochangelog_case not in ( "changelog case insensitive", "changelog trailing garbage", ): # "%changelog", "%ChAnGeLoG", ... stay verbatim, trick fuzz_spec_file() to # leave the rest of the cases as is, the %autorelease macro is expanded. fuzz_autochangelog_case = "unchanged" else: fuzz_autochangelog_case = autochangelog_case expected_spec_file_path = tmpspec.name fuzz_spec_file( expected_spec_file_path, autorelease_case, fuzz_autochangelog_case, remove_changelog_file, is_processed, ) rpm_cmd = [ "rpm", "--define", "dist .fc32", "--define", "_changelog_trimage 0", "--define", "_changelog_trimtime 0", "--specfile", ] if target_spec_file_path: test_cmd = rpm_cmd + [target_spec_file_path] else: test_cmd = rpm_cmd + [test_spec_file_path] expected_cmd = rpm_cmd + [expected_spec_file_path] q_release = ["--qf", "%{release}\n"] test_output = check_output(test_cmd + q_release, encoding="utf-8").strip() test_relnum, test_rest = relnum_split(test_output) expected_output = check_output(expected_cmd + q_release, encoding="utf-8").strip() expected_relnum, expected_rest = relnum_split(expected_output) if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): expected_relnum += 1 if branch == "epel8": expected_relnum += 1 assert test_relnum == expected_relnum assert test_rest == expected_rest q_changelog = ["--changelog"] test_output = check_output(test_cmd + q_changelog, encoding="utf-8") expected_output = check_output(expected_cmd + q_changelog, encoding="utf-8") if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): diff = list(difflib.ndiff(expected_output.splitlines(), test_output.splitlines())) # verify entry for uncommitted changes assert all(line.startswith("+ ") for line in diff[:3]) assert diff[0].endswith(f"-{expected_relnum}") assert diff[1] == "+ - Uncommitted changes" assert diff[2] == "+ " # verify the rest is the expected changelog assert all(line.startswith(" ") for line in diff[3:]) assert expected_output.splitlines() == [line[2:] for line in diff[3:]] else: > assert test_output == expected_output E AssertionError: assert '* Mon Apr 26...ncodings!\n\n' == '* Mon Apr 26...ncodings!\n\n' E - * Mon Apr 26 2021 Stephen Coady - 0-11 E ? ------- E + * Mon Apr 26 2021 Stephen Coady E - use autorelease instead of autorel E E * Fri Mar 27 2020 Pierre-Yves Chibon - 0-10 E - Change license to MIT... E E ...Full output truncated (8 lines hidden), use '-vv' to show tests/rpmautospec/subcommands/test_process_distgit.py:355: AssertionError ----------------------------- Captured stdout call ----------------------------- [rawhide d929d0f] use autorelease instead of autorel Author: Stephen Coady Date: Mon Apr 26 12:30:48 2021 +0100 2 files changed, 2 insertions(+), 16 deletions(-) delete mode 100644 changelog ----------------------------- Captured stderr call ----------------------------- Already on 'rawhide' error: line 6: Empty tag: Release: error: Unable to open dummy-test-package-gloster.spec: No such file or directory warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: Package dummy-test-package-gloster: invalid utf-8 encoding in License: CC� - Invalid argument warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel _ test_process_distgit[rawhide-optional-changelog trailing garbage-True-False-False-True] _ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_process_distgit_rawhide_o41') overwrite_specfile = True, branch = 'rawhide', dirty_worktree = False autorelease_case = 'optional', autochangelog_case = 'changelog trailing garbage' remove_changelog_file = True, is_processed = False @pytest.mark.parametrize("overwrite_specfile", (False, True)) @pytest.mark.parametrize("dirty_worktree", (False, True)) @pytest.mark.parametrize( "branch, autorelease_case, autochangelog_case, remove_changelog_file, is_processed", _generate_branch_testcase_combinations(), ) def test_process_distgit( tmp_path, overwrite_specfile, branch, dirty_worktree, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ): """Test the process_distgit() function""" workdir = str(tmp_path) with tarfile.open( os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster-git.tar.gz", ) ) as tar: # Ensure unpackaged files are owned by user for member in tar: member.uid = os.getuid() member.gid = os.getgid() try: tar.extractall(path=workdir, numeric_owner=True, filter="data") except TypeError: # Filtering was introduced in Python 3.12. tar.extractall(path=workdir, numeric_owner=True) unpacked_repo_dir = os.path.join(workdir, "dummy-test-package-gloster") test_spec_file_path = os.path.join( unpacked_repo_dir, "dummy-test-package-gloster.spec", ) with temporary_cd(unpacked_repo_dir): run(["git", "checkout", branch]) if autorelease_case != "unchanged" or autochangelog_case != "unchanged" or is_processed: fuzz_spec_file( test_spec_file_path, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ) if remove_changelog_file: os.unlink(os.path.join(unpacked_repo_dir, "changelog")) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ) and not dirty_worktree: run_git_amend(unpacked_repo_dir) if overwrite_specfile: target_spec_file_path = None else: target_spec_file_path = os.path.join(workdir, "test-this-specfile-please.spec") orig_test_spec_file_stat = os.stat(test_spec_file_path) # Set restrictive umask to check that file mode is preserved. old_umask = os.umask(0o077) real_cls = process_distgit.PkgHistoryProcessor processor_run = None with mock.patch( "rpmautospec.subcommands.process_distgit.PkgHistoryProcessor", ) as processor_cls: def wrap_cls(*args, **kwargs): nonlocal processor_run obj = real_cls(*args, **kwargs) processor_run = obj.run = mock.Mock(wraps=obj.run) return obj processor_cls.side_effect = wrap_cls retval = process_distgit.process_distgit(unpacked_repo_dir, target_spec_file_path) # And restore previous umask. os.umask(old_umask) if is_processed: # No processing should be done if the spec file was processed before already. assert not retval processor_run.assert_not_called() return # Input spec file was not processed before, should have been processed now. assert retval is not False processor_run.assert_called() test_spec_file_stat = os.stat(test_spec_file_path) attrs = ["mode", "ino", "dev", "uid", "gid"] if not overwrite_specfile: attrs.extend(["size", "mtime", "ctime"]) for attr in attrs: assert getattr(test_spec_file_stat, "st_" + attr) == getattr( orig_test_spec_file_stat, "st_" + attr ) expected_spec_file_path = os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster.spec.expected", ) with tempfile.NamedTemporaryFile() as tmpspec: shutil.copy2(expected_spec_file_path, tmpspec.name) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): if autochangelog_case not in ( "changelog case insensitive", "changelog trailing garbage", ): # "%changelog", "%ChAnGeLoG", ... stay verbatim, trick fuzz_spec_file() to # leave the rest of the cases as is, the %autorelease macro is expanded. fuzz_autochangelog_case = "unchanged" else: fuzz_autochangelog_case = autochangelog_case expected_spec_file_path = tmpspec.name fuzz_spec_file( expected_spec_file_path, autorelease_case, fuzz_autochangelog_case, remove_changelog_file, is_processed, ) rpm_cmd = [ "rpm", "--define", "dist .fc32", "--define", "_changelog_trimage 0", "--define", "_changelog_trimtime 0", "--specfile", ] if target_spec_file_path: test_cmd = rpm_cmd + [target_spec_file_path] else: test_cmd = rpm_cmd + [test_spec_file_path] expected_cmd = rpm_cmd + [expected_spec_file_path] q_release = ["--qf", "%{release}\n"] test_output = check_output(test_cmd + q_release, encoding="utf-8").strip() test_relnum, test_rest = relnum_split(test_output) expected_output = check_output(expected_cmd + q_release, encoding="utf-8").strip() expected_relnum, expected_rest = relnum_split(expected_output) if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): expected_relnum += 1 if branch == "epel8": expected_relnum += 1 assert test_relnum == expected_relnum assert test_rest == expected_rest q_changelog = ["--changelog"] test_output = check_output(test_cmd + q_changelog, encoding="utf-8") expected_output = check_output(expected_cmd + q_changelog, encoding="utf-8") if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): diff = list(difflib.ndiff(expected_output.splitlines(), test_output.splitlines())) # verify entry for uncommitted changes assert all(line.startswith("+ ") for line in diff[:3]) assert diff[0].endswith(f"-{expected_relnum}") assert diff[1] == "+ - Uncommitted changes" assert diff[2] == "+ " # verify the rest is the expected changelog assert all(line.startswith(" ") for line in diff[3:]) assert expected_output.splitlines() == [line[2:] for line in diff[3:]] else: > assert test_output == expected_output E AssertionError: assert '* Mon Apr 26...ncodings!\n\n' == '* Mon Apr 26...ncodings!\n\n' E - * Mon Apr 26 2021 Stephen Coady - 0-11 E ? ------- E + * Mon Apr 26 2021 Stephen Coady E - use autorelease instead of autorel E E * Fri Mar 27 2020 Pierre-Yves Chibon - 0-10 E - Change license to MIT... E E ...Full output truncated (8 lines hidden), use '-vv' to show tests/rpmautospec/subcommands/test_process_distgit.py:355: AssertionError ----------------------------- Captured stdout call ----------------------------- [rawhide d929d0f] use autorelease instead of autorel Author: Stephen Coady Date: Mon Apr 26 12:30:48 2021 +0100 2 files changed, 2 insertions(+), 16 deletions(-) delete mode 100644 changelog ----------------------------- Captured stderr call ----------------------------- Already on 'rawhide' error: line 6: Empty tag: Release: error: Unable to open dummy-test-package-gloster.spec: No such file or directory warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: Package dummy-test-package-gloster: invalid utf-8 encoding in License: CC� - Invalid argument warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel _ test_process_distgit[rawhide-optional-line in between-False-False-False-False] _ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_process_distgit_rawhide_o48') overwrite_specfile = False, branch = 'rawhide', dirty_worktree = False autorelease_case = 'optional', autochangelog_case = 'line in between' remove_changelog_file = False, is_processed = False @pytest.mark.parametrize("overwrite_specfile", (False, True)) @pytest.mark.parametrize("dirty_worktree", (False, True)) @pytest.mark.parametrize( "branch, autorelease_case, autochangelog_case, remove_changelog_file, is_processed", _generate_branch_testcase_combinations(), ) def test_process_distgit( tmp_path, overwrite_specfile, branch, dirty_worktree, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ): """Test the process_distgit() function""" workdir = str(tmp_path) with tarfile.open( os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster-git.tar.gz", ) ) as tar: # Ensure unpackaged files are owned by user for member in tar: member.uid = os.getuid() member.gid = os.getgid() try: tar.extractall(path=workdir, numeric_owner=True, filter="data") except TypeError: # Filtering was introduced in Python 3.12. tar.extractall(path=workdir, numeric_owner=True) unpacked_repo_dir = os.path.join(workdir, "dummy-test-package-gloster") test_spec_file_path = os.path.join( unpacked_repo_dir, "dummy-test-package-gloster.spec", ) with temporary_cd(unpacked_repo_dir): run(["git", "checkout", branch]) if autorelease_case != "unchanged" or autochangelog_case != "unchanged" or is_processed: fuzz_spec_file( test_spec_file_path, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ) if remove_changelog_file: os.unlink(os.path.join(unpacked_repo_dir, "changelog")) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ) and not dirty_worktree: run_git_amend(unpacked_repo_dir) if overwrite_specfile: target_spec_file_path = None else: target_spec_file_path = os.path.join(workdir, "test-this-specfile-please.spec") orig_test_spec_file_stat = os.stat(test_spec_file_path) # Set restrictive umask to check that file mode is preserved. old_umask = os.umask(0o077) real_cls = process_distgit.PkgHistoryProcessor processor_run = None with mock.patch( "rpmautospec.subcommands.process_distgit.PkgHistoryProcessor", ) as processor_cls: def wrap_cls(*args, **kwargs): nonlocal processor_run obj = real_cls(*args, **kwargs) processor_run = obj.run = mock.Mock(wraps=obj.run) return obj processor_cls.side_effect = wrap_cls retval = process_distgit.process_distgit(unpacked_repo_dir, target_spec_file_path) # And restore previous umask. os.umask(old_umask) if is_processed: # No processing should be done if the spec file was processed before already. assert not retval processor_run.assert_not_called() return # Input spec file was not processed before, should have been processed now. assert retval is not False processor_run.assert_called() test_spec_file_stat = os.stat(test_spec_file_path) attrs = ["mode", "ino", "dev", "uid", "gid"] if not overwrite_specfile: attrs.extend(["size", "mtime", "ctime"]) for attr in attrs: assert getattr(test_spec_file_stat, "st_" + attr) == getattr( orig_test_spec_file_stat, "st_" + attr ) expected_spec_file_path = os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster.spec.expected", ) with tempfile.NamedTemporaryFile() as tmpspec: shutil.copy2(expected_spec_file_path, tmpspec.name) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): if autochangelog_case not in ( "changelog case insensitive", "changelog trailing garbage", ): # "%changelog", "%ChAnGeLoG", ... stay verbatim, trick fuzz_spec_file() to # leave the rest of the cases as is, the %autorelease macro is expanded. fuzz_autochangelog_case = "unchanged" else: fuzz_autochangelog_case = autochangelog_case expected_spec_file_path = tmpspec.name fuzz_spec_file( expected_spec_file_path, autorelease_case, fuzz_autochangelog_case, remove_changelog_file, is_processed, ) rpm_cmd = [ "rpm", "--define", "dist .fc32", "--define", "_changelog_trimage 0", "--define", "_changelog_trimtime 0", "--specfile", ] if target_spec_file_path: test_cmd = rpm_cmd + [target_spec_file_path] else: test_cmd = rpm_cmd + [test_spec_file_path] expected_cmd = rpm_cmd + [expected_spec_file_path] q_release = ["--qf", "%{release}\n"] test_output = check_output(test_cmd + q_release, encoding="utf-8").strip() test_relnum, test_rest = relnum_split(test_output) expected_output = check_output(expected_cmd + q_release, encoding="utf-8").strip() expected_relnum, expected_rest = relnum_split(expected_output) if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): expected_relnum += 1 if branch == "epel8": expected_relnum += 1 assert test_relnum == expected_relnum assert test_rest == expected_rest q_changelog = ["--changelog"] test_output = check_output(test_cmd + q_changelog, encoding="utf-8") expected_output = check_output(expected_cmd + q_changelog, encoding="utf-8") if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): diff = list(difflib.ndiff(expected_output.splitlines(), test_output.splitlines())) # verify entry for uncommitted changes assert all(line.startswith("+ ") for line in diff[:3]) assert diff[0].endswith(f"-{expected_relnum}") assert diff[1] == "+ - Uncommitted changes" assert diff[2] == "+ " # verify the rest is the expected changelog assert all(line.startswith(" ") for line in diff[3:]) assert expected_output.splitlines() == [line[2:] for line in diff[3:]] else: > assert test_output == expected_output E AssertionError: assert '* Mon Apr 26...ging work\n\n' == '* Mon Apr 26...ging work\n\n' E - * Mon Apr 26 2021 Stephen Coady - 0-11 E ? ------- E + * Mon Apr 26 2021 Stephen Coady E - use autorelease instead of autorel E E * Fri Mar 27 2020 Pierre-Yves Chibon - 0-10 E - Change license to MIT... E E ...Full output truncated (23 lines hidden), use '-vv' to show tests/rpmautospec/subcommands/test_process_distgit.py:355: AssertionError ----------------------------- Captured stdout call ----------------------------- [rawhide 69e962e] use autorelease instead of autorel Author: Stephen Coady Date: Mon Apr 26 12:30:48 2021 +0100 1 file changed, 2 insertions(+), 1 deletion(-) ----------------------------- Captured stderr call ----------------------------- Already on 'rawhide' error: line 6: Empty tag: Release: error: Unable to open dummy-test-package-gloster.spec: No such file or directory warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: Package dummy-test-package-gloster: invalid utf-8 encoding in License: CC� - Invalid argument warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel _ test_process_distgit[rawhide-optional-line in between-False-False-False-True] _ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_process_distgit_rawhide_o49') overwrite_specfile = True, branch = 'rawhide', dirty_worktree = False autorelease_case = 'optional', autochangelog_case = 'line in between' remove_changelog_file = False, is_processed = False @pytest.mark.parametrize("overwrite_specfile", (False, True)) @pytest.mark.parametrize("dirty_worktree", (False, True)) @pytest.mark.parametrize( "branch, autorelease_case, autochangelog_case, remove_changelog_file, is_processed", _generate_branch_testcase_combinations(), ) def test_process_distgit( tmp_path, overwrite_specfile, branch, dirty_worktree, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ): """Test the process_distgit() function""" workdir = str(tmp_path) with tarfile.open( os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster-git.tar.gz", ) ) as tar: # Ensure unpackaged files are owned by user for member in tar: member.uid = os.getuid() member.gid = os.getgid() try: tar.extractall(path=workdir, numeric_owner=True, filter="data") except TypeError: # Filtering was introduced in Python 3.12. tar.extractall(path=workdir, numeric_owner=True) unpacked_repo_dir = os.path.join(workdir, "dummy-test-package-gloster") test_spec_file_path = os.path.join( unpacked_repo_dir, "dummy-test-package-gloster.spec", ) with temporary_cd(unpacked_repo_dir): run(["git", "checkout", branch]) if autorelease_case != "unchanged" or autochangelog_case != "unchanged" or is_processed: fuzz_spec_file( test_spec_file_path, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ) if remove_changelog_file: os.unlink(os.path.join(unpacked_repo_dir, "changelog")) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ) and not dirty_worktree: run_git_amend(unpacked_repo_dir) if overwrite_specfile: target_spec_file_path = None else: target_spec_file_path = os.path.join(workdir, "test-this-specfile-please.spec") orig_test_spec_file_stat = os.stat(test_spec_file_path) # Set restrictive umask to check that file mode is preserved. old_umask = os.umask(0o077) real_cls = process_distgit.PkgHistoryProcessor processor_run = None with mock.patch( "rpmautospec.subcommands.process_distgit.PkgHistoryProcessor", ) as processor_cls: def wrap_cls(*args, **kwargs): nonlocal processor_run obj = real_cls(*args, **kwargs) processor_run = obj.run = mock.Mock(wraps=obj.run) return obj processor_cls.side_effect = wrap_cls retval = process_distgit.process_distgit(unpacked_repo_dir, target_spec_file_path) # And restore previous umask. os.umask(old_umask) if is_processed: # No processing should be done if the spec file was processed before already. assert not retval processor_run.assert_not_called() return # Input spec file was not processed before, should have been processed now. assert retval is not False processor_run.assert_called() test_spec_file_stat = os.stat(test_spec_file_path) attrs = ["mode", "ino", "dev", "uid", "gid"] if not overwrite_specfile: attrs.extend(["size", "mtime", "ctime"]) for attr in attrs: assert getattr(test_spec_file_stat, "st_" + attr) == getattr( orig_test_spec_file_stat, "st_" + attr ) expected_spec_file_path = os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster.spec.expected", ) with tempfile.NamedTemporaryFile() as tmpspec: shutil.copy2(expected_spec_file_path, tmpspec.name) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): if autochangelog_case not in ( "changelog case insensitive", "changelog trailing garbage", ): # "%changelog", "%ChAnGeLoG", ... stay verbatim, trick fuzz_spec_file() to # leave the rest of the cases as is, the %autorelease macro is expanded. fuzz_autochangelog_case = "unchanged" else: fuzz_autochangelog_case = autochangelog_case expected_spec_file_path = tmpspec.name fuzz_spec_file( expected_spec_file_path, autorelease_case, fuzz_autochangelog_case, remove_changelog_file, is_processed, ) rpm_cmd = [ "rpm", "--define", "dist .fc32", "--define", "_changelog_trimage 0", "--define", "_changelog_trimtime 0", "--specfile", ] if target_spec_file_path: test_cmd = rpm_cmd + [target_spec_file_path] else: test_cmd = rpm_cmd + [test_spec_file_path] expected_cmd = rpm_cmd + [expected_spec_file_path] q_release = ["--qf", "%{release}\n"] test_output = check_output(test_cmd + q_release, encoding="utf-8").strip() test_relnum, test_rest = relnum_split(test_output) expected_output = check_output(expected_cmd + q_release, encoding="utf-8").strip() expected_relnum, expected_rest = relnum_split(expected_output) if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): expected_relnum += 1 if branch == "epel8": expected_relnum += 1 assert test_relnum == expected_relnum assert test_rest == expected_rest q_changelog = ["--changelog"] test_output = check_output(test_cmd + q_changelog, encoding="utf-8") expected_output = check_output(expected_cmd + q_changelog, encoding="utf-8") if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): diff = list(difflib.ndiff(expected_output.splitlines(), test_output.splitlines())) # verify entry for uncommitted changes assert all(line.startswith("+ ") for line in diff[:3]) assert diff[0].endswith(f"-{expected_relnum}") assert diff[1] == "+ - Uncommitted changes" assert diff[2] == "+ " # verify the rest is the expected changelog assert all(line.startswith(" ") for line in diff[3:]) assert expected_output.splitlines() == [line[2:] for line in diff[3:]] else: > assert test_output == expected_output E AssertionError: assert '* Mon Apr 26...ging work\n\n' == '* Mon Apr 26...ging work\n\n' E - * Mon Apr 26 2021 Stephen Coady - 0-11 E ? ------- E + * Mon Apr 26 2021 Stephen Coady E - use autorelease instead of autorel E E * Fri Mar 27 2020 Pierre-Yves Chibon - 0-10 E - Change license to MIT... E E ...Full output truncated (23 lines hidden), use '-vv' to show tests/rpmautospec/subcommands/test_process_distgit.py:355: AssertionError ----------------------------- Captured stdout call ----------------------------- [rawhide 69e962e] use autorelease instead of autorel Author: Stephen Coady Date: Mon Apr 26 12:30:48 2021 +0100 1 file changed, 2 insertions(+), 1 deletion(-) ----------------------------- Captured stderr call ----------------------------- Already on 'rawhide' error: line 6: Empty tag: Release: error: Unable to open dummy-test-package-gloster.spec: No such file or directory warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: Package dummy-test-package-gloster: invalid utf-8 encoding in License: CC� - Invalid argument warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel _ test_process_distgit[rawhide-optional-line in between-True-False-False-False] _ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_process_distgit_rawhide_o56') overwrite_specfile = False, branch = 'rawhide', dirty_worktree = False autorelease_case = 'optional', autochangelog_case = 'line in between' remove_changelog_file = True, is_processed = False @pytest.mark.parametrize("overwrite_specfile", (False, True)) @pytest.mark.parametrize("dirty_worktree", (False, True)) @pytest.mark.parametrize( "branch, autorelease_case, autochangelog_case, remove_changelog_file, is_processed", _generate_branch_testcase_combinations(), ) def test_process_distgit( tmp_path, overwrite_specfile, branch, dirty_worktree, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ): """Test the process_distgit() function""" workdir = str(tmp_path) with tarfile.open( os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster-git.tar.gz", ) ) as tar: # Ensure unpackaged files are owned by user for member in tar: member.uid = os.getuid() member.gid = os.getgid() try: tar.extractall(path=workdir, numeric_owner=True, filter="data") except TypeError: # Filtering was introduced in Python 3.12. tar.extractall(path=workdir, numeric_owner=True) unpacked_repo_dir = os.path.join(workdir, "dummy-test-package-gloster") test_spec_file_path = os.path.join( unpacked_repo_dir, "dummy-test-package-gloster.spec", ) with temporary_cd(unpacked_repo_dir): run(["git", "checkout", branch]) if autorelease_case != "unchanged" or autochangelog_case != "unchanged" or is_processed: fuzz_spec_file( test_spec_file_path, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ) if remove_changelog_file: os.unlink(os.path.join(unpacked_repo_dir, "changelog")) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ) and not dirty_worktree: run_git_amend(unpacked_repo_dir) if overwrite_specfile: target_spec_file_path = None else: target_spec_file_path = os.path.join(workdir, "test-this-specfile-please.spec") orig_test_spec_file_stat = os.stat(test_spec_file_path) # Set restrictive umask to check that file mode is preserved. old_umask = os.umask(0o077) real_cls = process_distgit.PkgHistoryProcessor processor_run = None with mock.patch( "rpmautospec.subcommands.process_distgit.PkgHistoryProcessor", ) as processor_cls: def wrap_cls(*args, **kwargs): nonlocal processor_run obj = real_cls(*args, **kwargs) processor_run = obj.run = mock.Mock(wraps=obj.run) return obj processor_cls.side_effect = wrap_cls retval = process_distgit.process_distgit(unpacked_repo_dir, target_spec_file_path) # And restore previous umask. os.umask(old_umask) if is_processed: # No processing should be done if the spec file was processed before already. assert not retval processor_run.assert_not_called() return # Input spec file was not processed before, should have been processed now. assert retval is not False processor_run.assert_called() test_spec_file_stat = os.stat(test_spec_file_path) attrs = ["mode", "ino", "dev", "uid", "gid"] if not overwrite_specfile: attrs.extend(["size", "mtime", "ctime"]) for attr in attrs: assert getattr(test_spec_file_stat, "st_" + attr) == getattr( orig_test_spec_file_stat, "st_" + attr ) expected_spec_file_path = os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster.spec.expected", ) with tempfile.NamedTemporaryFile() as tmpspec: shutil.copy2(expected_spec_file_path, tmpspec.name) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): if autochangelog_case not in ( "changelog case insensitive", "changelog trailing garbage", ): # "%changelog", "%ChAnGeLoG", ... stay verbatim, trick fuzz_spec_file() to # leave the rest of the cases as is, the %autorelease macro is expanded. fuzz_autochangelog_case = "unchanged" else: fuzz_autochangelog_case = autochangelog_case expected_spec_file_path = tmpspec.name fuzz_spec_file( expected_spec_file_path, autorelease_case, fuzz_autochangelog_case, remove_changelog_file, is_processed, ) rpm_cmd = [ "rpm", "--define", "dist .fc32", "--define", "_changelog_trimage 0", "--define", "_changelog_trimtime 0", "--specfile", ] if target_spec_file_path: test_cmd = rpm_cmd + [target_spec_file_path] else: test_cmd = rpm_cmd + [test_spec_file_path] expected_cmd = rpm_cmd + [expected_spec_file_path] q_release = ["--qf", "%{release}\n"] test_output = check_output(test_cmd + q_release, encoding="utf-8").strip() test_relnum, test_rest = relnum_split(test_output) expected_output = check_output(expected_cmd + q_release, encoding="utf-8").strip() expected_relnum, expected_rest = relnum_split(expected_output) if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): expected_relnum += 1 if branch == "epel8": expected_relnum += 1 assert test_relnum == expected_relnum assert test_rest == expected_rest q_changelog = ["--changelog"] test_output = check_output(test_cmd + q_changelog, encoding="utf-8") expected_output = check_output(expected_cmd + q_changelog, encoding="utf-8") if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): diff = list(difflib.ndiff(expected_output.splitlines(), test_output.splitlines())) # verify entry for uncommitted changes assert all(line.startswith("+ ") for line in diff[:3]) assert diff[0].endswith(f"-{expected_relnum}") assert diff[1] == "+ - Uncommitted changes" assert diff[2] == "+ " # verify the rest is the expected changelog assert all(line.startswith(" ") for line in diff[3:]) assert expected_output.splitlines() == [line[2:] for line in diff[3:]] else: > assert test_output == expected_output E AssertionError: assert '* Mon Apr 26...ncodings!\n\n' == '* Mon Apr 26...ncodings!\n\n' E - * Mon Apr 26 2021 Stephen Coady - 0-11 E ? ------- E + * Mon Apr 26 2021 Stephen Coady E - use autorelease instead of autorel E E * Fri Mar 27 2020 Pierre-Yves Chibon - 0-10 E - Change license to MIT... E E ...Full output truncated (8 lines hidden), use '-vv' to show tests/rpmautospec/subcommands/test_process_distgit.py:355: AssertionError ----------------------------- Captured stdout call ----------------------------- [rawhide e203859] use autorelease instead of autorel Author: Stephen Coady Date: Mon Apr 26 12:30:48 2021 +0100 2 files changed, 2 insertions(+), 15 deletions(-) delete mode 100644 changelog ----------------------------- Captured stderr call ----------------------------- Already on 'rawhide' error: line 6: Empty tag: Release: error: Unable to open dummy-test-package-gloster.spec: No such file or directory warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: Package dummy-test-package-gloster: invalid utf-8 encoding in License: CC� - Invalid argument warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel _ test_process_distgit[rawhide-optional-line in between-True-False-False-True] _ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_process_distgit_rawhide_o57') overwrite_specfile = True, branch = 'rawhide', dirty_worktree = False autorelease_case = 'optional', autochangelog_case = 'line in between' remove_changelog_file = True, is_processed = False @pytest.mark.parametrize("overwrite_specfile", (False, True)) @pytest.mark.parametrize("dirty_worktree", (False, True)) @pytest.mark.parametrize( "branch, autorelease_case, autochangelog_case, remove_changelog_file, is_processed", _generate_branch_testcase_combinations(), ) def test_process_distgit( tmp_path, overwrite_specfile, branch, dirty_worktree, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ): """Test the process_distgit() function""" workdir = str(tmp_path) with tarfile.open( os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster-git.tar.gz", ) ) as tar: # Ensure unpackaged files are owned by user for member in tar: member.uid = os.getuid() member.gid = os.getgid() try: tar.extractall(path=workdir, numeric_owner=True, filter="data") except TypeError: # Filtering was introduced in Python 3.12. tar.extractall(path=workdir, numeric_owner=True) unpacked_repo_dir = os.path.join(workdir, "dummy-test-package-gloster") test_spec_file_path = os.path.join( unpacked_repo_dir, "dummy-test-package-gloster.spec", ) with temporary_cd(unpacked_repo_dir): run(["git", "checkout", branch]) if autorelease_case != "unchanged" or autochangelog_case != "unchanged" or is_processed: fuzz_spec_file( test_spec_file_path, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ) if remove_changelog_file: os.unlink(os.path.join(unpacked_repo_dir, "changelog")) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ) and not dirty_worktree: run_git_amend(unpacked_repo_dir) if overwrite_specfile: target_spec_file_path = None else: target_spec_file_path = os.path.join(workdir, "test-this-specfile-please.spec") orig_test_spec_file_stat = os.stat(test_spec_file_path) # Set restrictive umask to check that file mode is preserved. old_umask = os.umask(0o077) real_cls = process_distgit.PkgHistoryProcessor processor_run = None with mock.patch( "rpmautospec.subcommands.process_distgit.PkgHistoryProcessor", ) as processor_cls: def wrap_cls(*args, **kwargs): nonlocal processor_run obj = real_cls(*args, **kwargs) processor_run = obj.run = mock.Mock(wraps=obj.run) return obj processor_cls.side_effect = wrap_cls retval = process_distgit.process_distgit(unpacked_repo_dir, target_spec_file_path) # And restore previous umask. os.umask(old_umask) if is_processed: # No processing should be done if the spec file was processed before already. assert not retval processor_run.assert_not_called() return # Input spec file was not processed before, should have been processed now. assert retval is not False processor_run.assert_called() test_spec_file_stat = os.stat(test_spec_file_path) attrs = ["mode", "ino", "dev", "uid", "gid"] if not overwrite_specfile: attrs.extend(["size", "mtime", "ctime"]) for attr in attrs: assert getattr(test_spec_file_stat, "st_" + attr) == getattr( orig_test_spec_file_stat, "st_" + attr ) expected_spec_file_path = os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster.spec.expected", ) with tempfile.NamedTemporaryFile() as tmpspec: shutil.copy2(expected_spec_file_path, tmpspec.name) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): if autochangelog_case not in ( "changelog case insensitive", "changelog trailing garbage", ): # "%changelog", "%ChAnGeLoG", ... stay verbatim, trick fuzz_spec_file() to # leave the rest of the cases as is, the %autorelease macro is expanded. fuzz_autochangelog_case = "unchanged" else: fuzz_autochangelog_case = autochangelog_case expected_spec_file_path = tmpspec.name fuzz_spec_file( expected_spec_file_path, autorelease_case, fuzz_autochangelog_case, remove_changelog_file, is_processed, ) rpm_cmd = [ "rpm", "--define", "dist .fc32", "--define", "_changelog_trimage 0", "--define", "_changelog_trimtime 0", "--specfile", ] if target_spec_file_path: test_cmd = rpm_cmd + [target_spec_file_path] else: test_cmd = rpm_cmd + [test_spec_file_path] expected_cmd = rpm_cmd + [expected_spec_file_path] q_release = ["--qf", "%{release}\n"] test_output = check_output(test_cmd + q_release, encoding="utf-8").strip() test_relnum, test_rest = relnum_split(test_output) expected_output = check_output(expected_cmd + q_release, encoding="utf-8").strip() expected_relnum, expected_rest = relnum_split(expected_output) if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): expected_relnum += 1 if branch == "epel8": expected_relnum += 1 assert test_relnum == expected_relnum assert test_rest == expected_rest q_changelog = ["--changelog"] test_output = check_output(test_cmd + q_changelog, encoding="utf-8") expected_output = check_output(expected_cmd + q_changelog, encoding="utf-8") if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): diff = list(difflib.ndiff(expected_output.splitlines(), test_output.splitlines())) # verify entry for uncommitted changes assert all(line.startswith("+ ") for line in diff[:3]) assert diff[0].endswith(f"-{expected_relnum}") assert diff[1] == "+ - Uncommitted changes" assert diff[2] == "+ " # verify the rest is the expected changelog assert all(line.startswith(" ") for line in diff[3:]) assert expected_output.splitlines() == [line[2:] for line in diff[3:]] else: > assert test_output == expected_output E AssertionError: assert '* Mon Apr 26...ncodings!\n\n' == '* Mon Apr 26...ncodings!\n\n' E - * Mon Apr 26 2021 Stephen Coady - 0-11 E ? ------- E + * Mon Apr 26 2021 Stephen Coady E - use autorelease instead of autorel E E * Fri Mar 27 2020 Pierre-Yves Chibon - 0-10 E - Change license to MIT... E E ...Full output truncated (8 lines hidden), use '-vv' to show tests/rpmautospec/subcommands/test_process_distgit.py:355: AssertionError ----------------------------- Captured stdout call ----------------------------- [rawhide e203859] use autorelease instead of autorel Author: Stephen Coady Date: Mon Apr 26 12:30:48 2021 +0100 2 files changed, 2 insertions(+), 15 deletions(-) delete mode 100644 changelog ----------------------------- Captured stderr call ----------------------------- Already on 'rawhide' error: line 6: Empty tag: Release: error: Unable to open dummy-test-package-gloster.spec: No such file or directory warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: Package dummy-test-package-gloster: invalid utf-8 encoding in License: CC� - Invalid argument warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel _ test_process_distgit[rawhide-optional-trailing line-False-False-False-False] _ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_process_distgit_rawhide_o64') overwrite_specfile = False, branch = 'rawhide', dirty_worktree = False autorelease_case = 'optional', autochangelog_case = 'trailing line' remove_changelog_file = False, is_processed = False @pytest.mark.parametrize("overwrite_specfile", (False, True)) @pytest.mark.parametrize("dirty_worktree", (False, True)) @pytest.mark.parametrize( "branch, autorelease_case, autochangelog_case, remove_changelog_file, is_processed", _generate_branch_testcase_combinations(), ) def test_process_distgit( tmp_path, overwrite_specfile, branch, dirty_worktree, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ): """Test the process_distgit() function""" workdir = str(tmp_path) with tarfile.open( os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster-git.tar.gz", ) ) as tar: # Ensure unpackaged files are owned by user for member in tar: member.uid = os.getuid() member.gid = os.getgid() try: tar.extractall(path=workdir, numeric_owner=True, filter="data") except TypeError: # Filtering was introduced in Python 3.12. tar.extractall(path=workdir, numeric_owner=True) unpacked_repo_dir = os.path.join(workdir, "dummy-test-package-gloster") test_spec_file_path = os.path.join( unpacked_repo_dir, "dummy-test-package-gloster.spec", ) with temporary_cd(unpacked_repo_dir): run(["git", "checkout", branch]) if autorelease_case != "unchanged" or autochangelog_case != "unchanged" or is_processed: fuzz_spec_file( test_spec_file_path, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ) if remove_changelog_file: os.unlink(os.path.join(unpacked_repo_dir, "changelog")) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ) and not dirty_worktree: run_git_amend(unpacked_repo_dir) if overwrite_specfile: target_spec_file_path = None else: target_spec_file_path = os.path.join(workdir, "test-this-specfile-please.spec") orig_test_spec_file_stat = os.stat(test_spec_file_path) # Set restrictive umask to check that file mode is preserved. old_umask = os.umask(0o077) real_cls = process_distgit.PkgHistoryProcessor processor_run = None with mock.patch( "rpmautospec.subcommands.process_distgit.PkgHistoryProcessor", ) as processor_cls: def wrap_cls(*args, **kwargs): nonlocal processor_run obj = real_cls(*args, **kwargs) processor_run = obj.run = mock.Mock(wraps=obj.run) return obj processor_cls.side_effect = wrap_cls retval = process_distgit.process_distgit(unpacked_repo_dir, target_spec_file_path) # And restore previous umask. os.umask(old_umask) if is_processed: # No processing should be done if the spec file was processed before already. assert not retval processor_run.assert_not_called() return # Input spec file was not processed before, should have been processed now. assert retval is not False processor_run.assert_called() test_spec_file_stat = os.stat(test_spec_file_path) attrs = ["mode", "ino", "dev", "uid", "gid"] if not overwrite_specfile: attrs.extend(["size", "mtime", "ctime"]) for attr in attrs: assert getattr(test_spec_file_stat, "st_" + attr) == getattr( orig_test_spec_file_stat, "st_" + attr ) expected_spec_file_path = os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster.spec.expected", ) with tempfile.NamedTemporaryFile() as tmpspec: shutil.copy2(expected_spec_file_path, tmpspec.name) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): if autochangelog_case not in ( "changelog case insensitive", "changelog trailing garbage", ): # "%changelog", "%ChAnGeLoG", ... stay verbatim, trick fuzz_spec_file() to # leave the rest of the cases as is, the %autorelease macro is expanded. fuzz_autochangelog_case = "unchanged" else: fuzz_autochangelog_case = autochangelog_case expected_spec_file_path = tmpspec.name fuzz_spec_file( expected_spec_file_path, autorelease_case, fuzz_autochangelog_case, remove_changelog_file, is_processed, ) rpm_cmd = [ "rpm", "--define", "dist .fc32", "--define", "_changelog_trimage 0", "--define", "_changelog_trimtime 0", "--specfile", ] if target_spec_file_path: test_cmd = rpm_cmd + [target_spec_file_path] else: test_cmd = rpm_cmd + [test_spec_file_path] expected_cmd = rpm_cmd + [expected_spec_file_path] q_release = ["--qf", "%{release}\n"] test_output = check_output(test_cmd + q_release, encoding="utf-8").strip() test_relnum, test_rest = relnum_split(test_output) expected_output = check_output(expected_cmd + q_release, encoding="utf-8").strip() expected_relnum, expected_rest = relnum_split(expected_output) if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): expected_relnum += 1 if branch == "epel8": expected_relnum += 1 assert test_relnum == expected_relnum assert test_rest == expected_rest q_changelog = ["--changelog"] test_output = check_output(test_cmd + q_changelog, encoding="utf-8") expected_output = check_output(expected_cmd + q_changelog, encoding="utf-8") if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): diff = list(difflib.ndiff(expected_output.splitlines(), test_output.splitlines())) # verify entry for uncommitted changes assert all(line.startswith("+ ") for line in diff[:3]) assert diff[0].endswith(f"-{expected_relnum}") assert diff[1] == "+ - Uncommitted changes" assert diff[2] == "+ " # verify the rest is the expected changelog assert all(line.startswith(" ") for line in diff[3:]) assert expected_output.splitlines() == [line[2:] for line in diff[3:]] else: > assert test_output == expected_output E AssertionError: assert '* Mon Apr 26...ging work\n\n' == '* Mon Apr 26...ging work\n\n' E - * Mon Apr 26 2021 Stephen Coady - 0-11 E ? ------- E + * Mon Apr 26 2021 Stephen Coady E - use autorelease instead of autorel E E * Fri Mar 27 2020 Pierre-Yves Chibon - 0-10 E - Change license to MIT... E E ...Full output truncated (23 lines hidden), use '-vv' to show tests/rpmautospec/subcommands/test_process_distgit.py:355: AssertionError ----------------------------- Captured stdout call ----------------------------- [rawhide 47c1dd1] use autorelease instead of autorel Author: Stephen Coady Date: Mon Apr 26 12:30:48 2021 +0100 1 file changed, 2 insertions(+), 1 deletion(-) ----------------------------- Captured stderr call ----------------------------- Already on 'rawhide' error: line 6: Empty tag: Release: error: Unable to open dummy-test-package-gloster.spec: No such file or directory warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: Package dummy-test-package-gloster: invalid utf-8 encoding in License: CC� - Invalid argument warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel _ test_process_distgit[rawhide-optional-trailing line-False-False-False-True] __ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_process_distgit_rawhide_o65') overwrite_specfile = True, branch = 'rawhide', dirty_worktree = False autorelease_case = 'optional', autochangelog_case = 'trailing line' remove_changelog_file = False, is_processed = False @pytest.mark.parametrize("overwrite_specfile", (False, True)) @pytest.mark.parametrize("dirty_worktree", (False, True)) @pytest.mark.parametrize( "branch, autorelease_case, autochangelog_case, remove_changelog_file, is_processed", _generate_branch_testcase_combinations(), ) def test_process_distgit( tmp_path, overwrite_specfile, branch, dirty_worktree, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ): """Test the process_distgit() function""" workdir = str(tmp_path) with tarfile.open( os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster-git.tar.gz", ) ) as tar: # Ensure unpackaged files are owned by user for member in tar: member.uid = os.getuid() member.gid = os.getgid() try: tar.extractall(path=workdir, numeric_owner=True, filter="data") except TypeError: # Filtering was introduced in Python 3.12. tar.extractall(path=workdir, numeric_owner=True) unpacked_repo_dir = os.path.join(workdir, "dummy-test-package-gloster") test_spec_file_path = os.path.join( unpacked_repo_dir, "dummy-test-package-gloster.spec", ) with temporary_cd(unpacked_repo_dir): run(["git", "checkout", branch]) if autorelease_case != "unchanged" or autochangelog_case != "unchanged" or is_processed: fuzz_spec_file( test_spec_file_path, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ) if remove_changelog_file: os.unlink(os.path.join(unpacked_repo_dir, "changelog")) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ) and not dirty_worktree: run_git_amend(unpacked_repo_dir) if overwrite_specfile: target_spec_file_path = None else: target_spec_file_path = os.path.join(workdir, "test-this-specfile-please.spec") orig_test_spec_file_stat = os.stat(test_spec_file_path) # Set restrictive umask to check that file mode is preserved. old_umask = os.umask(0o077) real_cls = process_distgit.PkgHistoryProcessor processor_run = None with mock.patch( "rpmautospec.subcommands.process_distgit.PkgHistoryProcessor", ) as processor_cls: def wrap_cls(*args, **kwargs): nonlocal processor_run obj = real_cls(*args, **kwargs) processor_run = obj.run = mock.Mock(wraps=obj.run) return obj processor_cls.side_effect = wrap_cls retval = process_distgit.process_distgit(unpacked_repo_dir, target_spec_file_path) # And restore previous umask. os.umask(old_umask) if is_processed: # No processing should be done if the spec file was processed before already. assert not retval processor_run.assert_not_called() return # Input spec file was not processed before, should have been processed now. assert retval is not False processor_run.assert_called() test_spec_file_stat = os.stat(test_spec_file_path) attrs = ["mode", "ino", "dev", "uid", "gid"] if not overwrite_specfile: attrs.extend(["size", "mtime", "ctime"]) for attr in attrs: assert getattr(test_spec_file_stat, "st_" + attr) == getattr( orig_test_spec_file_stat, "st_" + attr ) expected_spec_file_path = os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster.spec.expected", ) with tempfile.NamedTemporaryFile() as tmpspec: shutil.copy2(expected_spec_file_path, tmpspec.name) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): if autochangelog_case not in ( "changelog case insensitive", "changelog trailing garbage", ): # "%changelog", "%ChAnGeLoG", ... stay verbatim, trick fuzz_spec_file() to # leave the rest of the cases as is, the %autorelease macro is expanded. fuzz_autochangelog_case = "unchanged" else: fuzz_autochangelog_case = autochangelog_case expected_spec_file_path = tmpspec.name fuzz_spec_file( expected_spec_file_path, autorelease_case, fuzz_autochangelog_case, remove_changelog_file, is_processed, ) rpm_cmd = [ "rpm", "--define", "dist .fc32", "--define", "_changelog_trimage 0", "--define", "_changelog_trimtime 0", "--specfile", ] if target_spec_file_path: test_cmd = rpm_cmd + [target_spec_file_path] else: test_cmd = rpm_cmd + [test_spec_file_path] expected_cmd = rpm_cmd + [expected_spec_file_path] q_release = ["--qf", "%{release}\n"] test_output = check_output(test_cmd + q_release, encoding="utf-8").strip() test_relnum, test_rest = relnum_split(test_output) expected_output = check_output(expected_cmd + q_release, encoding="utf-8").strip() expected_relnum, expected_rest = relnum_split(expected_output) if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): expected_relnum += 1 if branch == "epel8": expected_relnum += 1 assert test_relnum == expected_relnum assert test_rest == expected_rest q_changelog = ["--changelog"] test_output = check_output(test_cmd + q_changelog, encoding="utf-8") expected_output = check_output(expected_cmd + q_changelog, encoding="utf-8") if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): diff = list(difflib.ndiff(expected_output.splitlines(), test_output.splitlines())) # verify entry for uncommitted changes assert all(line.startswith("+ ") for line in diff[:3]) assert diff[0].endswith(f"-{expected_relnum}") assert diff[1] == "+ - Uncommitted changes" assert diff[2] == "+ " # verify the rest is the expected changelog assert all(line.startswith(" ") for line in diff[3:]) assert expected_output.splitlines() == [line[2:] for line in diff[3:]] else: > assert test_output == expected_output E AssertionError: assert '* Mon Apr 26...ging work\n\n' == '* Mon Apr 26...ging work\n\n' E - * Mon Apr 26 2021 Stephen Coady - 0-11 E ? ------- E + * Mon Apr 26 2021 Stephen Coady E - use autorelease instead of autorel E E * Fri Mar 27 2020 Pierre-Yves Chibon - 0-10 E - Change license to MIT... E E ...Full output truncated (23 lines hidden), use '-vv' to show tests/rpmautospec/subcommands/test_process_distgit.py:355: AssertionError ----------------------------- Captured stdout call ----------------------------- [rawhide 47c1dd1] use autorelease instead of autorel Author: Stephen Coady Date: Mon Apr 26 12:30:48 2021 +0100 1 file changed, 2 insertions(+), 1 deletion(-) ----------------------------- Captured stderr call ----------------------------- Already on 'rawhide' error: line 6: Empty tag: Release: error: Unable to open dummy-test-package-gloster.spec: No such file or directory warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: Package dummy-test-package-gloster: invalid utf-8 encoding in License: CC� - Invalid argument warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel _ test_process_distgit[rawhide-optional-trailing line-True-False-False-False] __ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_process_distgit_rawhide_o72') overwrite_specfile = False, branch = 'rawhide', dirty_worktree = False autorelease_case = 'optional', autochangelog_case = 'trailing line' remove_changelog_file = True, is_processed = False @pytest.mark.parametrize("overwrite_specfile", (False, True)) @pytest.mark.parametrize("dirty_worktree", (False, True)) @pytest.mark.parametrize( "branch, autorelease_case, autochangelog_case, remove_changelog_file, is_processed", _generate_branch_testcase_combinations(), ) def test_process_distgit( tmp_path, overwrite_specfile, branch, dirty_worktree, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ): """Test the process_distgit() function""" workdir = str(tmp_path) with tarfile.open( os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster-git.tar.gz", ) ) as tar: # Ensure unpackaged files are owned by user for member in tar: member.uid = os.getuid() member.gid = os.getgid() try: tar.extractall(path=workdir, numeric_owner=True, filter="data") except TypeError: # Filtering was introduced in Python 3.12. tar.extractall(path=workdir, numeric_owner=True) unpacked_repo_dir = os.path.join(workdir, "dummy-test-package-gloster") test_spec_file_path = os.path.join( unpacked_repo_dir, "dummy-test-package-gloster.spec", ) with temporary_cd(unpacked_repo_dir): run(["git", "checkout", branch]) if autorelease_case != "unchanged" or autochangelog_case != "unchanged" or is_processed: fuzz_spec_file( test_spec_file_path, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ) if remove_changelog_file: os.unlink(os.path.join(unpacked_repo_dir, "changelog")) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ) and not dirty_worktree: run_git_amend(unpacked_repo_dir) if overwrite_specfile: target_spec_file_path = None else: target_spec_file_path = os.path.join(workdir, "test-this-specfile-please.spec") orig_test_spec_file_stat = os.stat(test_spec_file_path) # Set restrictive umask to check that file mode is preserved. old_umask = os.umask(0o077) real_cls = process_distgit.PkgHistoryProcessor processor_run = None with mock.patch( "rpmautospec.subcommands.process_distgit.PkgHistoryProcessor", ) as processor_cls: def wrap_cls(*args, **kwargs): nonlocal processor_run obj = real_cls(*args, **kwargs) processor_run = obj.run = mock.Mock(wraps=obj.run) return obj processor_cls.side_effect = wrap_cls retval = process_distgit.process_distgit(unpacked_repo_dir, target_spec_file_path) # And restore previous umask. os.umask(old_umask) if is_processed: # No processing should be done if the spec file was processed before already. assert not retval processor_run.assert_not_called() return # Input spec file was not processed before, should have been processed now. assert retval is not False processor_run.assert_called() test_spec_file_stat = os.stat(test_spec_file_path) attrs = ["mode", "ino", "dev", "uid", "gid"] if not overwrite_specfile: attrs.extend(["size", "mtime", "ctime"]) for attr in attrs: assert getattr(test_spec_file_stat, "st_" + attr) == getattr( orig_test_spec_file_stat, "st_" + attr ) expected_spec_file_path = os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster.spec.expected", ) with tempfile.NamedTemporaryFile() as tmpspec: shutil.copy2(expected_spec_file_path, tmpspec.name) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): if autochangelog_case not in ( "changelog case insensitive", "changelog trailing garbage", ): # "%changelog", "%ChAnGeLoG", ... stay verbatim, trick fuzz_spec_file() to # leave the rest of the cases as is, the %autorelease macro is expanded. fuzz_autochangelog_case = "unchanged" else: fuzz_autochangelog_case = autochangelog_case expected_spec_file_path = tmpspec.name fuzz_spec_file( expected_spec_file_path, autorelease_case, fuzz_autochangelog_case, remove_changelog_file, is_processed, ) rpm_cmd = [ "rpm", "--define", "dist .fc32", "--define", "_changelog_trimage 0", "--define", "_changelog_trimtime 0", "--specfile", ] if target_spec_file_path: test_cmd = rpm_cmd + [target_spec_file_path] else: test_cmd = rpm_cmd + [test_spec_file_path] expected_cmd = rpm_cmd + [expected_spec_file_path] q_release = ["--qf", "%{release}\n"] test_output = check_output(test_cmd + q_release, encoding="utf-8").strip() test_relnum, test_rest = relnum_split(test_output) expected_output = check_output(expected_cmd + q_release, encoding="utf-8").strip() expected_relnum, expected_rest = relnum_split(expected_output) if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): expected_relnum += 1 if branch == "epel8": expected_relnum += 1 assert test_relnum == expected_relnum assert test_rest == expected_rest q_changelog = ["--changelog"] test_output = check_output(test_cmd + q_changelog, encoding="utf-8") expected_output = check_output(expected_cmd + q_changelog, encoding="utf-8") if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): diff = list(difflib.ndiff(expected_output.splitlines(), test_output.splitlines())) # verify entry for uncommitted changes assert all(line.startswith("+ ") for line in diff[:3]) assert diff[0].endswith(f"-{expected_relnum}") assert diff[1] == "+ - Uncommitted changes" assert diff[2] == "+ " # verify the rest is the expected changelog assert all(line.startswith(" ") for line in diff[3:]) assert expected_output.splitlines() == [line[2:] for line in diff[3:]] else: > assert test_output == expected_output E AssertionError: assert '* Mon Apr 26...ncodings!\n\n' == '* Mon Apr 26...ncodings!\n\n' E - * Mon Apr 26 2021 Stephen Coady - 0-11 E ? ------- E + * Mon Apr 26 2021 Stephen Coady E - use autorelease instead of autorel E E * Fri Mar 27 2020 Pierre-Yves Chibon - 0-10 E - Change license to MIT... E E ...Full output truncated (8 lines hidden), use '-vv' to show tests/rpmautospec/subcommands/test_process_distgit.py:355: AssertionError ----------------------------- Captured stdout call ----------------------------- [rawhide 9dab855] use autorelease instead of autorel Author: Stephen Coady Date: Mon Apr 26 12:30:48 2021 +0100 2 files changed, 2 insertions(+), 15 deletions(-) delete mode 100644 changelog ----------------------------- Captured stderr call ----------------------------- Already on 'rawhide' error: line 6: Empty tag: Release: error: Unable to open dummy-test-package-gloster.spec: No such file or directory warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: Package dummy-test-package-gloster: invalid utf-8 encoding in License: CC� - Invalid argument warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel __ test_process_distgit[rawhide-optional-trailing line-True-False-False-True] __ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_process_distgit_rawhide_o73') overwrite_specfile = True, branch = 'rawhide', dirty_worktree = False autorelease_case = 'optional', autochangelog_case = 'trailing line' remove_changelog_file = True, is_processed = False @pytest.mark.parametrize("overwrite_specfile", (False, True)) @pytest.mark.parametrize("dirty_worktree", (False, True)) @pytest.mark.parametrize( "branch, autorelease_case, autochangelog_case, remove_changelog_file, is_processed", _generate_branch_testcase_combinations(), ) def test_process_distgit( tmp_path, overwrite_specfile, branch, dirty_worktree, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ): """Test the process_distgit() function""" workdir = str(tmp_path) with tarfile.open( os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster-git.tar.gz", ) ) as tar: # Ensure unpackaged files are owned by user for member in tar: member.uid = os.getuid() member.gid = os.getgid() try: tar.extractall(path=workdir, numeric_owner=True, filter="data") except TypeError: # Filtering was introduced in Python 3.12. tar.extractall(path=workdir, numeric_owner=True) unpacked_repo_dir = os.path.join(workdir, "dummy-test-package-gloster") test_spec_file_path = os.path.join( unpacked_repo_dir, "dummy-test-package-gloster.spec", ) with temporary_cd(unpacked_repo_dir): run(["git", "checkout", branch]) if autorelease_case != "unchanged" or autochangelog_case != "unchanged" or is_processed: fuzz_spec_file( test_spec_file_path, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ) if remove_changelog_file: os.unlink(os.path.join(unpacked_repo_dir, "changelog")) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ) and not dirty_worktree: run_git_amend(unpacked_repo_dir) if overwrite_specfile: target_spec_file_path = None else: target_spec_file_path = os.path.join(workdir, "test-this-specfile-please.spec") orig_test_spec_file_stat = os.stat(test_spec_file_path) # Set restrictive umask to check that file mode is preserved. old_umask = os.umask(0o077) real_cls = process_distgit.PkgHistoryProcessor processor_run = None with mock.patch( "rpmautospec.subcommands.process_distgit.PkgHistoryProcessor", ) as processor_cls: def wrap_cls(*args, **kwargs): nonlocal processor_run obj = real_cls(*args, **kwargs) processor_run = obj.run = mock.Mock(wraps=obj.run) return obj processor_cls.side_effect = wrap_cls retval = process_distgit.process_distgit(unpacked_repo_dir, target_spec_file_path) # And restore previous umask. os.umask(old_umask) if is_processed: # No processing should be done if the spec file was processed before already. assert not retval processor_run.assert_not_called() return # Input spec file was not processed before, should have been processed now. assert retval is not False processor_run.assert_called() test_spec_file_stat = os.stat(test_spec_file_path) attrs = ["mode", "ino", "dev", "uid", "gid"] if not overwrite_specfile: attrs.extend(["size", "mtime", "ctime"]) for attr in attrs: assert getattr(test_spec_file_stat, "st_" + attr) == getattr( orig_test_spec_file_stat, "st_" + attr ) expected_spec_file_path = os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster.spec.expected", ) with tempfile.NamedTemporaryFile() as tmpspec: shutil.copy2(expected_spec_file_path, tmpspec.name) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): if autochangelog_case not in ( "changelog case insensitive", "changelog trailing garbage", ): # "%changelog", "%ChAnGeLoG", ... stay verbatim, trick fuzz_spec_file() to # leave the rest of the cases as is, the %autorelease macro is expanded. fuzz_autochangelog_case = "unchanged" else: fuzz_autochangelog_case = autochangelog_case expected_spec_file_path = tmpspec.name fuzz_spec_file( expected_spec_file_path, autorelease_case, fuzz_autochangelog_case, remove_changelog_file, is_processed, ) rpm_cmd = [ "rpm", "--define", "dist .fc32", "--define", "_changelog_trimage 0", "--define", "_changelog_trimtime 0", "--specfile", ] if target_spec_file_path: test_cmd = rpm_cmd + [target_spec_file_path] else: test_cmd = rpm_cmd + [test_spec_file_path] expected_cmd = rpm_cmd + [expected_spec_file_path] q_release = ["--qf", "%{release}\n"] test_output = check_output(test_cmd + q_release, encoding="utf-8").strip() test_relnum, test_rest = relnum_split(test_output) expected_output = check_output(expected_cmd + q_release, encoding="utf-8").strip() expected_relnum, expected_rest = relnum_split(expected_output) if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): expected_relnum += 1 if branch == "epel8": expected_relnum += 1 assert test_relnum == expected_relnum assert test_rest == expected_rest q_changelog = ["--changelog"] test_output = check_output(test_cmd + q_changelog, encoding="utf-8") expected_output = check_output(expected_cmd + q_changelog, encoding="utf-8") if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): diff = list(difflib.ndiff(expected_output.splitlines(), test_output.splitlines())) # verify entry for uncommitted changes assert all(line.startswith("+ ") for line in diff[:3]) assert diff[0].endswith(f"-{expected_relnum}") assert diff[1] == "+ - Uncommitted changes" assert diff[2] == "+ " # verify the rest is the expected changelog assert all(line.startswith(" ") for line in diff[3:]) assert expected_output.splitlines() == [line[2:] for line in diff[3:]] else: > assert test_output == expected_output E AssertionError: assert '* Mon Apr 26...ncodings!\n\n' == '* Mon Apr 26...ncodings!\n\n' E - * Mon Apr 26 2021 Stephen Coady - 0-11 E ? ------- E + * Mon Apr 26 2021 Stephen Coady E - use autorelease instead of autorel E E * Fri Mar 27 2020 Pierre-Yves Chibon - 0-10 E - Change license to MIT... E E ...Full output truncated (8 lines hidden), use '-vv' to show tests/rpmautospec/subcommands/test_process_distgit.py:355: AssertionError ----------------------------- Captured stdout call ----------------------------- [rawhide 9dab855] use autorelease instead of autorel Author: Stephen Coady Date: Mon Apr 26 12:30:48 2021 +0100 2 files changed, 2 insertions(+), 15 deletions(-) delete mode 100644 changelog ----------------------------- Captured stderr call ----------------------------- Already on 'rawhide' error: line 6: Empty tag: Release: error: Unable to open dummy-test-package-gloster.spec: No such file or directory warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: Package dummy-test-package-gloster: invalid utf-8 encoding in License: CC� - Invalid argument warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel __ test_process_distgit[rawhide-optional-with braces-False-False-False-False] __ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_process_distgit_rawhide_o80') overwrite_specfile = False, branch = 'rawhide', dirty_worktree = False autorelease_case = 'optional', autochangelog_case = 'with braces' remove_changelog_file = False, is_processed = False @pytest.mark.parametrize("overwrite_specfile", (False, True)) @pytest.mark.parametrize("dirty_worktree", (False, True)) @pytest.mark.parametrize( "branch, autorelease_case, autochangelog_case, remove_changelog_file, is_processed", _generate_branch_testcase_combinations(), ) def test_process_distgit( tmp_path, overwrite_specfile, branch, dirty_worktree, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ): """Test the process_distgit() function""" workdir = str(tmp_path) with tarfile.open( os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster-git.tar.gz", ) ) as tar: # Ensure unpackaged files are owned by user for member in tar: member.uid = os.getuid() member.gid = os.getgid() try: tar.extractall(path=workdir, numeric_owner=True, filter="data") except TypeError: # Filtering was introduced in Python 3.12. tar.extractall(path=workdir, numeric_owner=True) unpacked_repo_dir = os.path.join(workdir, "dummy-test-package-gloster") test_spec_file_path = os.path.join( unpacked_repo_dir, "dummy-test-package-gloster.spec", ) with temporary_cd(unpacked_repo_dir): run(["git", "checkout", branch]) if autorelease_case != "unchanged" or autochangelog_case != "unchanged" or is_processed: fuzz_spec_file( test_spec_file_path, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ) if remove_changelog_file: os.unlink(os.path.join(unpacked_repo_dir, "changelog")) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ) and not dirty_worktree: run_git_amend(unpacked_repo_dir) if overwrite_specfile: target_spec_file_path = None else: target_spec_file_path = os.path.join(workdir, "test-this-specfile-please.spec") orig_test_spec_file_stat = os.stat(test_spec_file_path) # Set restrictive umask to check that file mode is preserved. old_umask = os.umask(0o077) real_cls = process_distgit.PkgHistoryProcessor processor_run = None with mock.patch( "rpmautospec.subcommands.process_distgit.PkgHistoryProcessor", ) as processor_cls: def wrap_cls(*args, **kwargs): nonlocal processor_run obj = real_cls(*args, **kwargs) processor_run = obj.run = mock.Mock(wraps=obj.run) return obj processor_cls.side_effect = wrap_cls retval = process_distgit.process_distgit(unpacked_repo_dir, target_spec_file_path) # And restore previous umask. os.umask(old_umask) if is_processed: # No processing should be done if the spec file was processed before already. assert not retval processor_run.assert_not_called() return # Input spec file was not processed before, should have been processed now. assert retval is not False processor_run.assert_called() test_spec_file_stat = os.stat(test_spec_file_path) attrs = ["mode", "ino", "dev", "uid", "gid"] if not overwrite_specfile: attrs.extend(["size", "mtime", "ctime"]) for attr in attrs: assert getattr(test_spec_file_stat, "st_" + attr) == getattr( orig_test_spec_file_stat, "st_" + attr ) expected_spec_file_path = os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster.spec.expected", ) with tempfile.NamedTemporaryFile() as tmpspec: shutil.copy2(expected_spec_file_path, tmpspec.name) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): if autochangelog_case not in ( "changelog case insensitive", "changelog trailing garbage", ): # "%changelog", "%ChAnGeLoG", ... stay verbatim, trick fuzz_spec_file() to # leave the rest of the cases as is, the %autorelease macro is expanded. fuzz_autochangelog_case = "unchanged" else: fuzz_autochangelog_case = autochangelog_case expected_spec_file_path = tmpspec.name fuzz_spec_file( expected_spec_file_path, autorelease_case, fuzz_autochangelog_case, remove_changelog_file, is_processed, ) rpm_cmd = [ "rpm", "--define", "dist .fc32", "--define", "_changelog_trimage 0", "--define", "_changelog_trimtime 0", "--specfile", ] if target_spec_file_path: test_cmd = rpm_cmd + [target_spec_file_path] else: test_cmd = rpm_cmd + [test_spec_file_path] expected_cmd = rpm_cmd + [expected_spec_file_path] q_release = ["--qf", "%{release}\n"] test_output = check_output(test_cmd + q_release, encoding="utf-8").strip() test_relnum, test_rest = relnum_split(test_output) expected_output = check_output(expected_cmd + q_release, encoding="utf-8").strip() expected_relnum, expected_rest = relnum_split(expected_output) if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): expected_relnum += 1 if branch == "epel8": expected_relnum += 1 assert test_relnum == expected_relnum assert test_rest == expected_rest q_changelog = ["--changelog"] test_output = check_output(test_cmd + q_changelog, encoding="utf-8") expected_output = check_output(expected_cmd + q_changelog, encoding="utf-8") if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): diff = list(difflib.ndiff(expected_output.splitlines(), test_output.splitlines())) # verify entry for uncommitted changes assert all(line.startswith("+ ") for line in diff[:3]) assert diff[0].endswith(f"-{expected_relnum}") assert diff[1] == "+ - Uncommitted changes" assert diff[2] == "+ " # verify the rest is the expected changelog assert all(line.startswith(" ") for line in diff[3:]) assert expected_output.splitlines() == [line[2:] for line in diff[3:]] else: > assert test_output == expected_output E AssertionError: assert '* Mon Apr 26...ging work\n\n' == '* Mon Apr 26...ging work\n\n' E - * Mon Apr 26 2021 Stephen Coady - 0-11 E ? ------- E + * Mon Apr 26 2021 Stephen Coady E - use autorelease instead of autorel E E * Fri Mar 27 2020 Pierre-Yves Chibon - 0-10 E - Change license to MIT... E E ...Full output truncated (23 lines hidden), use '-vv' to show tests/rpmautospec/subcommands/test_process_distgit.py:355: AssertionError ----------------------------- Captured stdout call ----------------------------- [rawhide 32eb196] use autorelease instead of autorel Author: Stephen Coady Date: Mon Apr 26 12:30:48 2021 +0100 1 file changed, 2 insertions(+), 2 deletions(-) ----------------------------- Captured stderr call ----------------------------- Already on 'rawhide' error: line 6: Empty tag: Release: error: Unable to open dummy-test-package-gloster.spec: No such file or directory warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: Package dummy-test-package-gloster: invalid utf-8 encoding in License: CC� - Invalid argument warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel __ test_process_distgit[rawhide-optional-with braces-False-False-False-True] ___ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_process_distgit_rawhide_o81') overwrite_specfile = True, branch = 'rawhide', dirty_worktree = False autorelease_case = 'optional', autochangelog_case = 'with braces' remove_changelog_file = False, is_processed = False @pytest.mark.parametrize("overwrite_specfile", (False, True)) @pytest.mark.parametrize("dirty_worktree", (False, True)) @pytest.mark.parametrize( "branch, autorelease_case, autochangelog_case, remove_changelog_file, is_processed", _generate_branch_testcase_combinations(), ) def test_process_distgit( tmp_path, overwrite_specfile, branch, dirty_worktree, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ): """Test the process_distgit() function""" workdir = str(tmp_path) with tarfile.open( os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster-git.tar.gz", ) ) as tar: # Ensure unpackaged files are owned by user for member in tar: member.uid = os.getuid() member.gid = os.getgid() try: tar.extractall(path=workdir, numeric_owner=True, filter="data") except TypeError: # Filtering was introduced in Python 3.12. tar.extractall(path=workdir, numeric_owner=True) unpacked_repo_dir = os.path.join(workdir, "dummy-test-package-gloster") test_spec_file_path = os.path.join( unpacked_repo_dir, "dummy-test-package-gloster.spec", ) with temporary_cd(unpacked_repo_dir): run(["git", "checkout", branch]) if autorelease_case != "unchanged" or autochangelog_case != "unchanged" or is_processed: fuzz_spec_file( test_spec_file_path, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ) if remove_changelog_file: os.unlink(os.path.join(unpacked_repo_dir, "changelog")) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ) and not dirty_worktree: run_git_amend(unpacked_repo_dir) if overwrite_specfile: target_spec_file_path = None else: target_spec_file_path = os.path.join(workdir, "test-this-specfile-please.spec") orig_test_spec_file_stat = os.stat(test_spec_file_path) # Set restrictive umask to check that file mode is preserved. old_umask = os.umask(0o077) real_cls = process_distgit.PkgHistoryProcessor processor_run = None with mock.patch( "rpmautospec.subcommands.process_distgit.PkgHistoryProcessor", ) as processor_cls: def wrap_cls(*args, **kwargs): nonlocal processor_run obj = real_cls(*args, **kwargs) processor_run = obj.run = mock.Mock(wraps=obj.run) return obj processor_cls.side_effect = wrap_cls retval = process_distgit.process_distgit(unpacked_repo_dir, target_spec_file_path) # And restore previous umask. os.umask(old_umask) if is_processed: # No processing should be done if the spec file was processed before already. assert not retval processor_run.assert_not_called() return # Input spec file was not processed before, should have been processed now. assert retval is not False processor_run.assert_called() test_spec_file_stat = os.stat(test_spec_file_path) attrs = ["mode", "ino", "dev", "uid", "gid"] if not overwrite_specfile: attrs.extend(["size", "mtime", "ctime"]) for attr in attrs: assert getattr(test_spec_file_stat, "st_" + attr) == getattr( orig_test_spec_file_stat, "st_" + attr ) expected_spec_file_path = os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster.spec.expected", ) with tempfile.NamedTemporaryFile() as tmpspec: shutil.copy2(expected_spec_file_path, tmpspec.name) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): if autochangelog_case not in ( "changelog case insensitive", "changelog trailing garbage", ): # "%changelog", "%ChAnGeLoG", ... stay verbatim, trick fuzz_spec_file() to # leave the rest of the cases as is, the %autorelease macro is expanded. fuzz_autochangelog_case = "unchanged" else: fuzz_autochangelog_case = autochangelog_case expected_spec_file_path = tmpspec.name fuzz_spec_file( expected_spec_file_path, autorelease_case, fuzz_autochangelog_case, remove_changelog_file, is_processed, ) rpm_cmd = [ "rpm", "--define", "dist .fc32", "--define", "_changelog_trimage 0", "--define", "_changelog_trimtime 0", "--specfile", ] if target_spec_file_path: test_cmd = rpm_cmd + [target_spec_file_path] else: test_cmd = rpm_cmd + [test_spec_file_path] expected_cmd = rpm_cmd + [expected_spec_file_path] q_release = ["--qf", "%{release}\n"] test_output = check_output(test_cmd + q_release, encoding="utf-8").strip() test_relnum, test_rest = relnum_split(test_output) expected_output = check_output(expected_cmd + q_release, encoding="utf-8").strip() expected_relnum, expected_rest = relnum_split(expected_output) if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): expected_relnum += 1 if branch == "epel8": expected_relnum += 1 assert test_relnum == expected_relnum assert test_rest == expected_rest q_changelog = ["--changelog"] test_output = check_output(test_cmd + q_changelog, encoding="utf-8") expected_output = check_output(expected_cmd + q_changelog, encoding="utf-8") if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): diff = list(difflib.ndiff(expected_output.splitlines(), test_output.splitlines())) # verify entry for uncommitted changes assert all(line.startswith("+ ") for line in diff[:3]) assert diff[0].endswith(f"-{expected_relnum}") assert diff[1] == "+ - Uncommitted changes" assert diff[2] == "+ " # verify the rest is the expected changelog assert all(line.startswith(" ") for line in diff[3:]) assert expected_output.splitlines() == [line[2:] for line in diff[3:]] else: > assert test_output == expected_output E AssertionError: assert '* Mon Apr 26...ging work\n\n' == '* Mon Apr 26...ging work\n\n' E - * Mon Apr 26 2021 Stephen Coady - 0-11 E ? ------- E + * Mon Apr 26 2021 Stephen Coady E - use autorelease instead of autorel E E * Fri Mar 27 2020 Pierre-Yves Chibon - 0-10 E - Change license to MIT... E E ...Full output truncated (23 lines hidden), use '-vv' to show tests/rpmautospec/subcommands/test_process_distgit.py:355: AssertionError ----------------------------- Captured stdout call ----------------------------- [rawhide 32eb196] use autorelease instead of autorel Author: Stephen Coady Date: Mon Apr 26 12:30:48 2021 +0100 1 file changed, 2 insertions(+), 2 deletions(-) ----------------------------- Captured stderr call ----------------------------- Already on 'rawhide' error: line 6: Empty tag: Release: error: Unable to open dummy-test-package-gloster.spec: No such file or directory warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: Package dummy-test-package-gloster: invalid utf-8 encoding in License: CC� - Invalid argument warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel __ test_process_distgit[rawhide-optional-with braces-True-False-False-False] ___ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_process_distgit_rawhide_o88') overwrite_specfile = False, branch = 'rawhide', dirty_worktree = False autorelease_case = 'optional', autochangelog_case = 'with braces' remove_changelog_file = True, is_processed = False @pytest.mark.parametrize("overwrite_specfile", (False, True)) @pytest.mark.parametrize("dirty_worktree", (False, True)) @pytest.mark.parametrize( "branch, autorelease_case, autochangelog_case, remove_changelog_file, is_processed", _generate_branch_testcase_combinations(), ) def test_process_distgit( tmp_path, overwrite_specfile, branch, dirty_worktree, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ): """Test the process_distgit() function""" workdir = str(tmp_path) with tarfile.open( os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster-git.tar.gz", ) ) as tar: # Ensure unpackaged files are owned by user for member in tar: member.uid = os.getuid() member.gid = os.getgid() try: tar.extractall(path=workdir, numeric_owner=True, filter="data") except TypeError: # Filtering was introduced in Python 3.12. tar.extractall(path=workdir, numeric_owner=True) unpacked_repo_dir = os.path.join(workdir, "dummy-test-package-gloster") test_spec_file_path = os.path.join( unpacked_repo_dir, "dummy-test-package-gloster.spec", ) with temporary_cd(unpacked_repo_dir): run(["git", "checkout", branch]) if autorelease_case != "unchanged" or autochangelog_case != "unchanged" or is_processed: fuzz_spec_file( test_spec_file_path, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ) if remove_changelog_file: os.unlink(os.path.join(unpacked_repo_dir, "changelog")) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ) and not dirty_worktree: run_git_amend(unpacked_repo_dir) if overwrite_specfile: target_spec_file_path = None else: target_spec_file_path = os.path.join(workdir, "test-this-specfile-please.spec") orig_test_spec_file_stat = os.stat(test_spec_file_path) # Set restrictive umask to check that file mode is preserved. old_umask = os.umask(0o077) real_cls = process_distgit.PkgHistoryProcessor processor_run = None with mock.patch( "rpmautospec.subcommands.process_distgit.PkgHistoryProcessor", ) as processor_cls: def wrap_cls(*args, **kwargs): nonlocal processor_run obj = real_cls(*args, **kwargs) processor_run = obj.run = mock.Mock(wraps=obj.run) return obj processor_cls.side_effect = wrap_cls retval = process_distgit.process_distgit(unpacked_repo_dir, target_spec_file_path) # And restore previous umask. os.umask(old_umask) if is_processed: # No processing should be done if the spec file was processed before already. assert not retval processor_run.assert_not_called() return # Input spec file was not processed before, should have been processed now. assert retval is not False processor_run.assert_called() test_spec_file_stat = os.stat(test_spec_file_path) attrs = ["mode", "ino", "dev", "uid", "gid"] if not overwrite_specfile: attrs.extend(["size", "mtime", "ctime"]) for attr in attrs: assert getattr(test_spec_file_stat, "st_" + attr) == getattr( orig_test_spec_file_stat, "st_" + attr ) expected_spec_file_path = os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster.spec.expected", ) with tempfile.NamedTemporaryFile() as tmpspec: shutil.copy2(expected_spec_file_path, tmpspec.name) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): if autochangelog_case not in ( "changelog case insensitive", "changelog trailing garbage", ): # "%changelog", "%ChAnGeLoG", ... stay verbatim, trick fuzz_spec_file() to # leave the rest of the cases as is, the %autorelease macro is expanded. fuzz_autochangelog_case = "unchanged" else: fuzz_autochangelog_case = autochangelog_case expected_spec_file_path = tmpspec.name fuzz_spec_file( expected_spec_file_path, autorelease_case, fuzz_autochangelog_case, remove_changelog_file, is_processed, ) rpm_cmd = [ "rpm", "--define", "dist .fc32", "--define", "_changelog_trimage 0", "--define", "_changelog_trimtime 0", "--specfile", ] if target_spec_file_path: test_cmd = rpm_cmd + [target_spec_file_path] else: test_cmd = rpm_cmd + [test_spec_file_path] expected_cmd = rpm_cmd + [expected_spec_file_path] q_release = ["--qf", "%{release}\n"] test_output = check_output(test_cmd + q_release, encoding="utf-8").strip() test_relnum, test_rest = relnum_split(test_output) expected_output = check_output(expected_cmd + q_release, encoding="utf-8").strip() expected_relnum, expected_rest = relnum_split(expected_output) if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): expected_relnum += 1 if branch == "epel8": expected_relnum += 1 assert test_relnum == expected_relnum assert test_rest == expected_rest q_changelog = ["--changelog"] test_output = check_output(test_cmd + q_changelog, encoding="utf-8") expected_output = check_output(expected_cmd + q_changelog, encoding="utf-8") if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): diff = list(difflib.ndiff(expected_output.splitlines(), test_output.splitlines())) # verify entry for uncommitted changes assert all(line.startswith("+ ") for line in diff[:3]) assert diff[0].endswith(f"-{expected_relnum}") assert diff[1] == "+ - Uncommitted changes" assert diff[2] == "+ " # verify the rest is the expected changelog assert all(line.startswith(" ") for line in diff[3:]) assert expected_output.splitlines() == [line[2:] for line in diff[3:]] else: > assert test_output == expected_output E AssertionError: assert '* Mon Apr 26...ncodings!\n\n' == '* Mon Apr 26...ncodings!\n\n' E - * Mon Apr 26 2021 Stephen Coady - 0-11 E ? ------- E + * Mon Apr 26 2021 Stephen Coady E - use autorelease instead of autorel E E * Fri Mar 27 2020 Pierre-Yves Chibon - 0-10 E - Change license to MIT... E E ...Full output truncated (8 lines hidden), use '-vv' to show tests/rpmautospec/subcommands/test_process_distgit.py:355: AssertionError ----------------------------- Captured stdout call ----------------------------- [rawhide 8a15743] use autorelease instead of autorel Author: Stephen Coady Date: Mon Apr 26 12:30:48 2021 +0100 2 files changed, 2 insertions(+), 16 deletions(-) delete mode 100644 changelog ----------------------------- Captured stderr call ----------------------------- Already on 'rawhide' error: line 6: Empty tag: Release: error: Unable to open dummy-test-package-gloster.spec: No such file or directory warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: Package dummy-test-package-gloster: invalid utf-8 encoding in License: CC� - Invalid argument warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel ___ test_process_distgit[rawhide-optional-with braces-True-False-False-True] ___ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_process_distgit_rawhide_o89') overwrite_specfile = True, branch = 'rawhide', dirty_worktree = False autorelease_case = 'optional', autochangelog_case = 'with braces' remove_changelog_file = True, is_processed = False @pytest.mark.parametrize("overwrite_specfile", (False, True)) @pytest.mark.parametrize("dirty_worktree", (False, True)) @pytest.mark.parametrize( "branch, autorelease_case, autochangelog_case, remove_changelog_file, is_processed", _generate_branch_testcase_combinations(), ) def test_process_distgit( tmp_path, overwrite_specfile, branch, dirty_worktree, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ): """Test the process_distgit() function""" workdir = str(tmp_path) with tarfile.open( os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster-git.tar.gz", ) ) as tar: # Ensure unpackaged files are owned by user for member in tar: member.uid = os.getuid() member.gid = os.getgid() try: tar.extractall(path=workdir, numeric_owner=True, filter="data") except TypeError: # Filtering was introduced in Python 3.12. tar.extractall(path=workdir, numeric_owner=True) unpacked_repo_dir = os.path.join(workdir, "dummy-test-package-gloster") test_spec_file_path = os.path.join( unpacked_repo_dir, "dummy-test-package-gloster.spec", ) with temporary_cd(unpacked_repo_dir): run(["git", "checkout", branch]) if autorelease_case != "unchanged" or autochangelog_case != "unchanged" or is_processed: fuzz_spec_file( test_spec_file_path, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ) if remove_changelog_file: os.unlink(os.path.join(unpacked_repo_dir, "changelog")) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ) and not dirty_worktree: run_git_amend(unpacked_repo_dir) if overwrite_specfile: target_spec_file_path = None else: target_spec_file_path = os.path.join(workdir, "test-this-specfile-please.spec") orig_test_spec_file_stat = os.stat(test_spec_file_path) # Set restrictive umask to check that file mode is preserved. old_umask = os.umask(0o077) real_cls = process_distgit.PkgHistoryProcessor processor_run = None with mock.patch( "rpmautospec.subcommands.process_distgit.PkgHistoryProcessor", ) as processor_cls: def wrap_cls(*args, **kwargs): nonlocal processor_run obj = real_cls(*args, **kwargs) processor_run = obj.run = mock.Mock(wraps=obj.run) return obj processor_cls.side_effect = wrap_cls retval = process_distgit.process_distgit(unpacked_repo_dir, target_spec_file_path) # And restore previous umask. os.umask(old_umask) if is_processed: # No processing should be done if the spec file was processed before already. assert not retval processor_run.assert_not_called() return # Input spec file was not processed before, should have been processed now. assert retval is not False processor_run.assert_called() test_spec_file_stat = os.stat(test_spec_file_path) attrs = ["mode", "ino", "dev", "uid", "gid"] if not overwrite_specfile: attrs.extend(["size", "mtime", "ctime"]) for attr in attrs: assert getattr(test_spec_file_stat, "st_" + attr) == getattr( orig_test_spec_file_stat, "st_" + attr ) expected_spec_file_path = os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster.spec.expected", ) with tempfile.NamedTemporaryFile() as tmpspec: shutil.copy2(expected_spec_file_path, tmpspec.name) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): if autochangelog_case not in ( "changelog case insensitive", "changelog trailing garbage", ): # "%changelog", "%ChAnGeLoG", ... stay verbatim, trick fuzz_spec_file() to # leave the rest of the cases as is, the %autorelease macro is expanded. fuzz_autochangelog_case = "unchanged" else: fuzz_autochangelog_case = autochangelog_case expected_spec_file_path = tmpspec.name fuzz_spec_file( expected_spec_file_path, autorelease_case, fuzz_autochangelog_case, remove_changelog_file, is_processed, ) rpm_cmd = [ "rpm", "--define", "dist .fc32", "--define", "_changelog_trimage 0", "--define", "_changelog_trimtime 0", "--specfile", ] if target_spec_file_path: test_cmd = rpm_cmd + [target_spec_file_path] else: test_cmd = rpm_cmd + [test_spec_file_path] expected_cmd = rpm_cmd + [expected_spec_file_path] q_release = ["--qf", "%{release}\n"] test_output = check_output(test_cmd + q_release, encoding="utf-8").strip() test_relnum, test_rest = relnum_split(test_output) expected_output = check_output(expected_cmd + q_release, encoding="utf-8").strip() expected_relnum, expected_rest = relnum_split(expected_output) if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): expected_relnum += 1 if branch == "epel8": expected_relnum += 1 assert test_relnum == expected_relnum assert test_rest == expected_rest q_changelog = ["--changelog"] test_output = check_output(test_cmd + q_changelog, encoding="utf-8") expected_output = check_output(expected_cmd + q_changelog, encoding="utf-8") if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): diff = list(difflib.ndiff(expected_output.splitlines(), test_output.splitlines())) # verify entry for uncommitted changes assert all(line.startswith("+ ") for line in diff[:3]) assert diff[0].endswith(f"-{expected_relnum}") assert diff[1] == "+ - Uncommitted changes" assert diff[2] == "+ " # verify the rest is the expected changelog assert all(line.startswith(" ") for line in diff[3:]) assert expected_output.splitlines() == [line[2:] for line in diff[3:]] else: > assert test_output == expected_output E AssertionError: assert '* Mon Apr 26...ncodings!\n\n' == '* Mon Apr 26...ncodings!\n\n' E - * Mon Apr 26 2021 Stephen Coady - 0-11 E ? ------- E + * Mon Apr 26 2021 Stephen Coady E - use autorelease instead of autorel E E * Fri Mar 27 2020 Pierre-Yves Chibon - 0-10 E - Change license to MIT... E E ...Full output truncated (8 lines hidden), use '-vv' to show tests/rpmautospec/subcommands/test_process_distgit.py:355: AssertionError ----------------------------- Captured stdout call ----------------------------- [rawhide 8a15743] use autorelease instead of autorel Author: Stephen Coady Date: Mon Apr 26 12:30:48 2021 +0100 2 files changed, 2 insertions(+), 16 deletions(-) delete mode 100644 changelog ----------------------------- Captured stderr call ----------------------------- Already on 'rawhide' error: line 6: Empty tag: Release: error: Unable to open dummy-test-package-gloster.spec: No such file or directory warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: Package dummy-test-package-gloster: invalid utf-8 encoding in License: CC� - Invalid argument warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel ____ test_process_distgit[rawhide-optional-missing-False-False-False-False] ____ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_process_distgit_rawhide_o96') overwrite_specfile = False, branch = 'rawhide', dirty_worktree = False autorelease_case = 'optional', autochangelog_case = 'missing' remove_changelog_file = False, is_processed = False @pytest.mark.parametrize("overwrite_specfile", (False, True)) @pytest.mark.parametrize("dirty_worktree", (False, True)) @pytest.mark.parametrize( "branch, autorelease_case, autochangelog_case, remove_changelog_file, is_processed", _generate_branch_testcase_combinations(), ) def test_process_distgit( tmp_path, overwrite_specfile, branch, dirty_worktree, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ): """Test the process_distgit() function""" workdir = str(tmp_path) with tarfile.open( os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster-git.tar.gz", ) ) as tar: # Ensure unpackaged files are owned by user for member in tar: member.uid = os.getuid() member.gid = os.getgid() try: tar.extractall(path=workdir, numeric_owner=True, filter="data") except TypeError: # Filtering was introduced in Python 3.12. tar.extractall(path=workdir, numeric_owner=True) unpacked_repo_dir = os.path.join(workdir, "dummy-test-package-gloster") test_spec_file_path = os.path.join( unpacked_repo_dir, "dummy-test-package-gloster.spec", ) with temporary_cd(unpacked_repo_dir): run(["git", "checkout", branch]) if autorelease_case != "unchanged" or autochangelog_case != "unchanged" or is_processed: fuzz_spec_file( test_spec_file_path, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ) if remove_changelog_file: os.unlink(os.path.join(unpacked_repo_dir, "changelog")) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ) and not dirty_worktree: run_git_amend(unpacked_repo_dir) if overwrite_specfile: target_spec_file_path = None else: target_spec_file_path = os.path.join(workdir, "test-this-specfile-please.spec") orig_test_spec_file_stat = os.stat(test_spec_file_path) # Set restrictive umask to check that file mode is preserved. old_umask = os.umask(0o077) real_cls = process_distgit.PkgHistoryProcessor processor_run = None with mock.patch( "rpmautospec.subcommands.process_distgit.PkgHistoryProcessor", ) as processor_cls: def wrap_cls(*args, **kwargs): nonlocal processor_run obj = real_cls(*args, **kwargs) processor_run = obj.run = mock.Mock(wraps=obj.run) return obj processor_cls.side_effect = wrap_cls retval = process_distgit.process_distgit(unpacked_repo_dir, target_spec_file_path) # And restore previous umask. os.umask(old_umask) if is_processed: # No processing should be done if the spec file was processed before already. assert not retval processor_run.assert_not_called() return # Input spec file was not processed before, should have been processed now. assert retval is not False processor_run.assert_called() test_spec_file_stat = os.stat(test_spec_file_path) attrs = ["mode", "ino", "dev", "uid", "gid"] if not overwrite_specfile: attrs.extend(["size", "mtime", "ctime"]) for attr in attrs: assert getattr(test_spec_file_stat, "st_" + attr) == getattr( orig_test_spec_file_stat, "st_" + attr ) expected_spec_file_path = os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster.spec.expected", ) with tempfile.NamedTemporaryFile() as tmpspec: shutil.copy2(expected_spec_file_path, tmpspec.name) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): if autochangelog_case not in ( "changelog case insensitive", "changelog trailing garbage", ): # "%changelog", "%ChAnGeLoG", ... stay verbatim, trick fuzz_spec_file() to # leave the rest of the cases as is, the %autorelease macro is expanded. fuzz_autochangelog_case = "unchanged" else: fuzz_autochangelog_case = autochangelog_case expected_spec_file_path = tmpspec.name fuzz_spec_file( expected_spec_file_path, autorelease_case, fuzz_autochangelog_case, remove_changelog_file, is_processed, ) rpm_cmd = [ "rpm", "--define", "dist .fc32", "--define", "_changelog_trimage 0", "--define", "_changelog_trimtime 0", "--specfile", ] if target_spec_file_path: test_cmd = rpm_cmd + [target_spec_file_path] else: test_cmd = rpm_cmd + [test_spec_file_path] expected_cmd = rpm_cmd + [expected_spec_file_path] q_release = ["--qf", "%{release}\n"] test_output = check_output(test_cmd + q_release, encoding="utf-8").strip() test_relnum, test_rest = relnum_split(test_output) expected_output = check_output(expected_cmd + q_release, encoding="utf-8").strip() expected_relnum, expected_rest = relnum_split(expected_output) if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): expected_relnum += 1 if branch == "epel8": expected_relnum += 1 assert test_relnum == expected_relnum assert test_rest == expected_rest q_changelog = ["--changelog"] test_output = check_output(test_cmd + q_changelog, encoding="utf-8") expected_output = check_output(expected_cmd + q_changelog, encoding="utf-8") if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): diff = list(difflib.ndiff(expected_output.splitlines(), test_output.splitlines())) # verify entry for uncommitted changes assert all(line.startswith("+ ") for line in diff[:3]) assert diff[0].endswith(f"-{expected_relnum}") assert diff[1] == "+ - Uncommitted changes" assert diff[2] == "+ " # verify the rest is the expected changelog assert all(line.startswith(" ") for line in diff[3:]) assert expected_output.splitlines() == [line[2:] for line in diff[3:]] else: > assert test_output == expected_output E AssertionError: assert '* Mon Apr 26...ging work\n\n' == '* Mon Apr 26...ging work\n\n' E - * Mon Apr 26 2021 Stephen Coady - 0-11 E ? ------- E + * Mon Apr 26 2021 Stephen Coady E - use autorelease instead of autorel E E * Fri Mar 27 2020 Pierre-Yves Chibon - 0-10 E - Change license to MIT... E E ...Full output truncated (23 lines hidden), use '-vv' to show tests/rpmautospec/subcommands/test_process_distgit.py:355: AssertionError ----------------------------- Captured stdout call ----------------------------- [rawhide 75519d5] use autorelease instead of autorel Author: Stephen Coady Date: Mon Apr 26 12:30:48 2021 +0100 1 file changed, 1 insertion(+), 3 deletions(-) ----------------------------- Captured stderr call ----------------------------- Already on 'rawhide' error: line 6: Empty tag: Release: error: Unable to open dummy-test-package-gloster.spec: No such file or directory warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: Package dummy-test-package-gloster: invalid utf-8 encoding in License: CC� - Invalid argument warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel ____ test_process_distgit[rawhide-optional-missing-False-False-False-True] _____ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_process_distgit_rawhide_o97') overwrite_specfile = True, branch = 'rawhide', dirty_worktree = False autorelease_case = 'optional', autochangelog_case = 'missing' remove_changelog_file = False, is_processed = False @pytest.mark.parametrize("overwrite_specfile", (False, True)) @pytest.mark.parametrize("dirty_worktree", (False, True)) @pytest.mark.parametrize( "branch, autorelease_case, autochangelog_case, remove_changelog_file, is_processed", _generate_branch_testcase_combinations(), ) def test_process_distgit( tmp_path, overwrite_specfile, branch, dirty_worktree, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ): """Test the process_distgit() function""" workdir = str(tmp_path) with tarfile.open( os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster-git.tar.gz", ) ) as tar: # Ensure unpackaged files are owned by user for member in tar: member.uid = os.getuid() member.gid = os.getgid() try: tar.extractall(path=workdir, numeric_owner=True, filter="data") except TypeError: # Filtering was introduced in Python 3.12. tar.extractall(path=workdir, numeric_owner=True) unpacked_repo_dir = os.path.join(workdir, "dummy-test-package-gloster") test_spec_file_path = os.path.join( unpacked_repo_dir, "dummy-test-package-gloster.spec", ) with temporary_cd(unpacked_repo_dir): run(["git", "checkout", branch]) if autorelease_case != "unchanged" or autochangelog_case != "unchanged" or is_processed: fuzz_spec_file( test_spec_file_path, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ) if remove_changelog_file: os.unlink(os.path.join(unpacked_repo_dir, "changelog")) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ) and not dirty_worktree: run_git_amend(unpacked_repo_dir) if overwrite_specfile: target_spec_file_path = None else: target_spec_file_path = os.path.join(workdir, "test-this-specfile-please.spec") orig_test_spec_file_stat = os.stat(test_spec_file_path) # Set restrictive umask to check that file mode is preserved. old_umask = os.umask(0o077) real_cls = process_distgit.PkgHistoryProcessor processor_run = None with mock.patch( "rpmautospec.subcommands.process_distgit.PkgHistoryProcessor", ) as processor_cls: def wrap_cls(*args, **kwargs): nonlocal processor_run obj = real_cls(*args, **kwargs) processor_run = obj.run = mock.Mock(wraps=obj.run) return obj processor_cls.side_effect = wrap_cls retval = process_distgit.process_distgit(unpacked_repo_dir, target_spec_file_path) # And restore previous umask. os.umask(old_umask) if is_processed: # No processing should be done if the spec file was processed before already. assert not retval processor_run.assert_not_called() return # Input spec file was not processed before, should have been processed now. assert retval is not False processor_run.assert_called() test_spec_file_stat = os.stat(test_spec_file_path) attrs = ["mode", "ino", "dev", "uid", "gid"] if not overwrite_specfile: attrs.extend(["size", "mtime", "ctime"]) for attr in attrs: assert getattr(test_spec_file_stat, "st_" + attr) == getattr( orig_test_spec_file_stat, "st_" + attr ) expected_spec_file_path = os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster.spec.expected", ) with tempfile.NamedTemporaryFile() as tmpspec: shutil.copy2(expected_spec_file_path, tmpspec.name) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): if autochangelog_case not in ( "changelog case insensitive", "changelog trailing garbage", ): # "%changelog", "%ChAnGeLoG", ... stay verbatim, trick fuzz_spec_file() to # leave the rest of the cases as is, the %autorelease macro is expanded. fuzz_autochangelog_case = "unchanged" else: fuzz_autochangelog_case = autochangelog_case expected_spec_file_path = tmpspec.name fuzz_spec_file( expected_spec_file_path, autorelease_case, fuzz_autochangelog_case, remove_changelog_file, is_processed, ) rpm_cmd = [ "rpm", "--define", "dist .fc32", "--define", "_changelog_trimage 0", "--define", "_changelog_trimtime 0", "--specfile", ] if target_spec_file_path: test_cmd = rpm_cmd + [target_spec_file_path] else: test_cmd = rpm_cmd + [test_spec_file_path] expected_cmd = rpm_cmd + [expected_spec_file_path] q_release = ["--qf", "%{release}\n"] test_output = check_output(test_cmd + q_release, encoding="utf-8").strip() test_relnum, test_rest = relnum_split(test_output) expected_output = check_output(expected_cmd + q_release, encoding="utf-8").strip() expected_relnum, expected_rest = relnum_split(expected_output) if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): expected_relnum += 1 if branch == "epel8": expected_relnum += 1 assert test_relnum == expected_relnum assert test_rest == expected_rest q_changelog = ["--changelog"] test_output = check_output(test_cmd + q_changelog, encoding="utf-8") expected_output = check_output(expected_cmd + q_changelog, encoding="utf-8") if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): diff = list(difflib.ndiff(expected_output.splitlines(), test_output.splitlines())) # verify entry for uncommitted changes assert all(line.startswith("+ ") for line in diff[:3]) assert diff[0].endswith(f"-{expected_relnum}") assert diff[1] == "+ - Uncommitted changes" assert diff[2] == "+ " # verify the rest is the expected changelog assert all(line.startswith(" ") for line in diff[3:]) assert expected_output.splitlines() == [line[2:] for line in diff[3:]] else: > assert test_output == expected_output E AssertionError: assert '* Mon Apr 26...ging work\n\n' == '* Mon Apr 26...ging work\n\n' E - * Mon Apr 26 2021 Stephen Coady - 0-11 E ? ------- E + * Mon Apr 26 2021 Stephen Coady E - use autorelease instead of autorel E E * Fri Mar 27 2020 Pierre-Yves Chibon - 0-10 E - Change license to MIT... E E ...Full output truncated (23 lines hidden), use '-vv' to show tests/rpmautospec/subcommands/test_process_distgit.py:355: AssertionError ----------------------------- Captured stdout call ----------------------------- [rawhide 75519d5] use autorelease instead of autorel Author: Stephen Coady Date: Mon Apr 26 12:30:48 2021 +0100 1 file changed, 1 insertion(+), 3 deletions(-) ----------------------------- Captured stderr call ----------------------------- Already on 'rawhide' error: line 6: Empty tag: Release: error: Unable to open dummy-test-package-gloster.spec: No such file or directory warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: Package dummy-test-package-gloster: invalid utf-8 encoding in License: CC� - Invalid argument warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel ____ test_process_distgit[rawhide-optional-missing-True-False-False-False] _____ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_process_distgit_rawhide_o104') overwrite_specfile = False, branch = 'rawhide', dirty_worktree = False autorelease_case = 'optional', autochangelog_case = 'missing' remove_changelog_file = True, is_processed = False @pytest.mark.parametrize("overwrite_specfile", (False, True)) @pytest.mark.parametrize("dirty_worktree", (False, True)) @pytest.mark.parametrize( "branch, autorelease_case, autochangelog_case, remove_changelog_file, is_processed", _generate_branch_testcase_combinations(), ) def test_process_distgit( tmp_path, overwrite_specfile, branch, dirty_worktree, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ): """Test the process_distgit() function""" workdir = str(tmp_path) with tarfile.open( os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster-git.tar.gz", ) ) as tar: # Ensure unpackaged files are owned by user for member in tar: member.uid = os.getuid() member.gid = os.getgid() try: tar.extractall(path=workdir, numeric_owner=True, filter="data") except TypeError: # Filtering was introduced in Python 3.12. tar.extractall(path=workdir, numeric_owner=True) unpacked_repo_dir = os.path.join(workdir, "dummy-test-package-gloster") test_spec_file_path = os.path.join( unpacked_repo_dir, "dummy-test-package-gloster.spec", ) with temporary_cd(unpacked_repo_dir): run(["git", "checkout", branch]) if autorelease_case != "unchanged" or autochangelog_case != "unchanged" or is_processed: fuzz_spec_file( test_spec_file_path, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ) if remove_changelog_file: os.unlink(os.path.join(unpacked_repo_dir, "changelog")) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ) and not dirty_worktree: run_git_amend(unpacked_repo_dir) if overwrite_specfile: target_spec_file_path = None else: target_spec_file_path = os.path.join(workdir, "test-this-specfile-please.spec") orig_test_spec_file_stat = os.stat(test_spec_file_path) # Set restrictive umask to check that file mode is preserved. old_umask = os.umask(0o077) real_cls = process_distgit.PkgHistoryProcessor processor_run = None with mock.patch( "rpmautospec.subcommands.process_distgit.PkgHistoryProcessor", ) as processor_cls: def wrap_cls(*args, **kwargs): nonlocal processor_run obj = real_cls(*args, **kwargs) processor_run = obj.run = mock.Mock(wraps=obj.run) return obj processor_cls.side_effect = wrap_cls retval = process_distgit.process_distgit(unpacked_repo_dir, target_spec_file_path) # And restore previous umask. os.umask(old_umask) if is_processed: # No processing should be done if the spec file was processed before already. assert not retval processor_run.assert_not_called() return # Input spec file was not processed before, should have been processed now. assert retval is not False processor_run.assert_called() test_spec_file_stat = os.stat(test_spec_file_path) attrs = ["mode", "ino", "dev", "uid", "gid"] if not overwrite_specfile: attrs.extend(["size", "mtime", "ctime"]) for attr in attrs: assert getattr(test_spec_file_stat, "st_" + attr) == getattr( orig_test_spec_file_stat, "st_" + attr ) expected_spec_file_path = os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster.spec.expected", ) with tempfile.NamedTemporaryFile() as tmpspec: shutil.copy2(expected_spec_file_path, tmpspec.name) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): if autochangelog_case not in ( "changelog case insensitive", "changelog trailing garbage", ): # "%changelog", "%ChAnGeLoG", ... stay verbatim, trick fuzz_spec_file() to # leave the rest of the cases as is, the %autorelease macro is expanded. fuzz_autochangelog_case = "unchanged" else: fuzz_autochangelog_case = autochangelog_case expected_spec_file_path = tmpspec.name fuzz_spec_file( expected_spec_file_path, autorelease_case, fuzz_autochangelog_case, remove_changelog_file, is_processed, ) rpm_cmd = [ "rpm", "--define", "dist .fc32", "--define", "_changelog_trimage 0", "--define", "_changelog_trimtime 0", "--specfile", ] if target_spec_file_path: test_cmd = rpm_cmd + [target_spec_file_path] else: test_cmd = rpm_cmd + [test_spec_file_path] expected_cmd = rpm_cmd + [expected_spec_file_path] q_release = ["--qf", "%{release}\n"] test_output = check_output(test_cmd + q_release, encoding="utf-8").strip() test_relnum, test_rest = relnum_split(test_output) expected_output = check_output(expected_cmd + q_release, encoding="utf-8").strip() expected_relnum, expected_rest = relnum_split(expected_output) if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): expected_relnum += 1 if branch == "epel8": expected_relnum += 1 assert test_relnum == expected_relnum assert test_rest == expected_rest q_changelog = ["--changelog"] test_output = check_output(test_cmd + q_changelog, encoding="utf-8") expected_output = check_output(expected_cmd + q_changelog, encoding="utf-8") if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): diff = list(difflib.ndiff(expected_output.splitlines(), test_output.splitlines())) # verify entry for uncommitted changes assert all(line.startswith("+ ") for line in diff[:3]) assert diff[0].endswith(f"-{expected_relnum}") assert diff[1] == "+ - Uncommitted changes" assert diff[2] == "+ " # verify the rest is the expected changelog assert all(line.startswith(" ") for line in diff[3:]) assert expected_output.splitlines() == [line[2:] for line in diff[3:]] else: > assert test_output == expected_output E AssertionError: assert '* Mon Apr 26...ncodings!\n\n' == '* Mon Apr 26...ncodings!\n\n' E - * Mon Apr 26 2021 Stephen Coady - 0-11 E ? ------- E + * Mon Apr 26 2021 Stephen Coady E - use autorelease instead of autorel E E * Fri Mar 27 2020 Pierre-Yves Chibon - 0-10 E - Change license to MIT... E E ...Full output truncated (8 lines hidden), use '-vv' to show tests/rpmautospec/subcommands/test_process_distgit.py:355: AssertionError ----------------------------- Captured stdout call ----------------------------- [rawhide 282d7ad] use autorelease instead of autorel Author: Stephen Coady Date: Mon Apr 26 12:30:48 2021 +0100 2 files changed, 1 insertion(+), 17 deletions(-) delete mode 100644 changelog ----------------------------- Captured stderr call ----------------------------- Already on 'rawhide' error: line 6: Empty tag: Release: error: Unable to open dummy-test-package-gloster.spec: No such file or directory warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: Package dummy-test-package-gloster: invalid utf-8 encoding in License: CC� - Invalid argument warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel _____ test_process_distgit[rawhide-optional-missing-True-False-False-True] _____ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_process_distgit_rawhide_o105') overwrite_specfile = True, branch = 'rawhide', dirty_worktree = False autorelease_case = 'optional', autochangelog_case = 'missing' remove_changelog_file = True, is_processed = False @pytest.mark.parametrize("overwrite_specfile", (False, True)) @pytest.mark.parametrize("dirty_worktree", (False, True)) @pytest.mark.parametrize( "branch, autorelease_case, autochangelog_case, remove_changelog_file, is_processed", _generate_branch_testcase_combinations(), ) def test_process_distgit( tmp_path, overwrite_specfile, branch, dirty_worktree, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ): """Test the process_distgit() function""" workdir = str(tmp_path) with tarfile.open( os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster-git.tar.gz", ) ) as tar: # Ensure unpackaged files are owned by user for member in tar: member.uid = os.getuid() member.gid = os.getgid() try: tar.extractall(path=workdir, numeric_owner=True, filter="data") except TypeError: # Filtering was introduced in Python 3.12. tar.extractall(path=workdir, numeric_owner=True) unpacked_repo_dir = os.path.join(workdir, "dummy-test-package-gloster") test_spec_file_path = os.path.join( unpacked_repo_dir, "dummy-test-package-gloster.spec", ) with temporary_cd(unpacked_repo_dir): run(["git", "checkout", branch]) if autorelease_case != "unchanged" or autochangelog_case != "unchanged" or is_processed: fuzz_spec_file( test_spec_file_path, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ) if remove_changelog_file: os.unlink(os.path.join(unpacked_repo_dir, "changelog")) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ) and not dirty_worktree: run_git_amend(unpacked_repo_dir) if overwrite_specfile: target_spec_file_path = None else: target_spec_file_path = os.path.join(workdir, "test-this-specfile-please.spec") orig_test_spec_file_stat = os.stat(test_spec_file_path) # Set restrictive umask to check that file mode is preserved. old_umask = os.umask(0o077) real_cls = process_distgit.PkgHistoryProcessor processor_run = None with mock.patch( "rpmautospec.subcommands.process_distgit.PkgHistoryProcessor", ) as processor_cls: def wrap_cls(*args, **kwargs): nonlocal processor_run obj = real_cls(*args, **kwargs) processor_run = obj.run = mock.Mock(wraps=obj.run) return obj processor_cls.side_effect = wrap_cls retval = process_distgit.process_distgit(unpacked_repo_dir, target_spec_file_path) # And restore previous umask. os.umask(old_umask) if is_processed: # No processing should be done if the spec file was processed before already. assert not retval processor_run.assert_not_called() return # Input spec file was not processed before, should have been processed now. assert retval is not False processor_run.assert_called() test_spec_file_stat = os.stat(test_spec_file_path) attrs = ["mode", "ino", "dev", "uid", "gid"] if not overwrite_specfile: attrs.extend(["size", "mtime", "ctime"]) for attr in attrs: assert getattr(test_spec_file_stat, "st_" + attr) == getattr( orig_test_spec_file_stat, "st_" + attr ) expected_spec_file_path = os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster.spec.expected", ) with tempfile.NamedTemporaryFile() as tmpspec: shutil.copy2(expected_spec_file_path, tmpspec.name) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): if autochangelog_case not in ( "changelog case insensitive", "changelog trailing garbage", ): # "%changelog", "%ChAnGeLoG", ... stay verbatim, trick fuzz_spec_file() to # leave the rest of the cases as is, the %autorelease macro is expanded. fuzz_autochangelog_case = "unchanged" else: fuzz_autochangelog_case = autochangelog_case expected_spec_file_path = tmpspec.name fuzz_spec_file( expected_spec_file_path, autorelease_case, fuzz_autochangelog_case, remove_changelog_file, is_processed, ) rpm_cmd = [ "rpm", "--define", "dist .fc32", "--define", "_changelog_trimage 0", "--define", "_changelog_trimtime 0", "--specfile", ] if target_spec_file_path: test_cmd = rpm_cmd + [target_spec_file_path] else: test_cmd = rpm_cmd + [test_spec_file_path] expected_cmd = rpm_cmd + [expected_spec_file_path] q_release = ["--qf", "%{release}\n"] test_output = check_output(test_cmd + q_release, encoding="utf-8").strip() test_relnum, test_rest = relnum_split(test_output) expected_output = check_output(expected_cmd + q_release, encoding="utf-8").strip() expected_relnum, expected_rest = relnum_split(expected_output) if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): expected_relnum += 1 if branch == "epel8": expected_relnum += 1 assert test_relnum == expected_relnum assert test_rest == expected_rest q_changelog = ["--changelog"] test_output = check_output(test_cmd + q_changelog, encoding="utf-8") expected_output = check_output(expected_cmd + q_changelog, encoding="utf-8") if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): diff = list(difflib.ndiff(expected_output.splitlines(), test_output.splitlines())) # verify entry for uncommitted changes assert all(line.startswith("+ ") for line in diff[:3]) assert diff[0].endswith(f"-{expected_relnum}") assert diff[1] == "+ - Uncommitted changes" assert diff[2] == "+ " # verify the rest is the expected changelog assert all(line.startswith(" ") for line in diff[3:]) assert expected_output.splitlines() == [line[2:] for line in diff[3:]] else: > assert test_output == expected_output E AssertionError: assert '* Mon Apr 26...ncodings!\n\n' == '* Mon Apr 26...ncodings!\n\n' E - * Mon Apr 26 2021 Stephen Coady - 0-11 E ? ------- E + * Mon Apr 26 2021 Stephen Coady E - use autorelease instead of autorel E E * Fri Mar 27 2020 Pierre-Yves Chibon - 0-10 E - Change license to MIT... E E ...Full output truncated (8 lines hidden), use '-vv' to show tests/rpmautospec/subcommands/test_process_distgit.py:355: AssertionError ----------------------------- Captured stdout call ----------------------------- [rawhide 282d7ad] use autorelease instead of autorel Author: Stephen Coady Date: Mon Apr 26 12:30:48 2021 +0100 2 files changed, 1 insertion(+), 17 deletions(-) delete mode 100644 changelog ----------------------------- Captured stderr call ----------------------------- Already on 'rawhide' error: line 6: Empty tag: Release: error: Unable to open dummy-test-package-gloster.spec: No such file or directory warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: Package dummy-test-package-gloster: invalid utf-8 encoding in License: CC� - Invalid argument warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel ___ test_process_distgit[rawhide-optional-optional-False-False-False-False] ____ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_process_distgit_rawhide_o112') overwrite_specfile = False, branch = 'rawhide', dirty_worktree = False autorelease_case = 'optional', autochangelog_case = 'optional' remove_changelog_file = False, is_processed = False @pytest.mark.parametrize("overwrite_specfile", (False, True)) @pytest.mark.parametrize("dirty_worktree", (False, True)) @pytest.mark.parametrize( "branch, autorelease_case, autochangelog_case, remove_changelog_file, is_processed", _generate_branch_testcase_combinations(), ) def test_process_distgit( tmp_path, overwrite_specfile, branch, dirty_worktree, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ): """Test the process_distgit() function""" workdir = str(tmp_path) with tarfile.open( os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster-git.tar.gz", ) ) as tar: # Ensure unpackaged files are owned by user for member in tar: member.uid = os.getuid() member.gid = os.getgid() try: tar.extractall(path=workdir, numeric_owner=True, filter="data") except TypeError: # Filtering was introduced in Python 3.12. tar.extractall(path=workdir, numeric_owner=True) unpacked_repo_dir = os.path.join(workdir, "dummy-test-package-gloster") test_spec_file_path = os.path.join( unpacked_repo_dir, "dummy-test-package-gloster.spec", ) with temporary_cd(unpacked_repo_dir): run(["git", "checkout", branch]) if autorelease_case != "unchanged" or autochangelog_case != "unchanged" or is_processed: fuzz_spec_file( test_spec_file_path, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ) if remove_changelog_file: os.unlink(os.path.join(unpacked_repo_dir, "changelog")) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ) and not dirty_worktree: run_git_amend(unpacked_repo_dir) if overwrite_specfile: target_spec_file_path = None else: target_spec_file_path = os.path.join(workdir, "test-this-specfile-please.spec") orig_test_spec_file_stat = os.stat(test_spec_file_path) # Set restrictive umask to check that file mode is preserved. old_umask = os.umask(0o077) real_cls = process_distgit.PkgHistoryProcessor processor_run = None with mock.patch( "rpmautospec.subcommands.process_distgit.PkgHistoryProcessor", ) as processor_cls: def wrap_cls(*args, **kwargs): nonlocal processor_run obj = real_cls(*args, **kwargs) processor_run = obj.run = mock.Mock(wraps=obj.run) return obj processor_cls.side_effect = wrap_cls retval = process_distgit.process_distgit(unpacked_repo_dir, target_spec_file_path) # And restore previous umask. os.umask(old_umask) if is_processed: # No processing should be done if the spec file was processed before already. assert not retval processor_run.assert_not_called() return # Input spec file was not processed before, should have been processed now. assert retval is not False processor_run.assert_called() test_spec_file_stat = os.stat(test_spec_file_path) attrs = ["mode", "ino", "dev", "uid", "gid"] if not overwrite_specfile: attrs.extend(["size", "mtime", "ctime"]) for attr in attrs: assert getattr(test_spec_file_stat, "st_" + attr) == getattr( orig_test_spec_file_stat, "st_" + attr ) expected_spec_file_path = os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster.spec.expected", ) with tempfile.NamedTemporaryFile() as tmpspec: shutil.copy2(expected_spec_file_path, tmpspec.name) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): if autochangelog_case not in ( "changelog case insensitive", "changelog trailing garbage", ): # "%changelog", "%ChAnGeLoG", ... stay verbatim, trick fuzz_spec_file() to # leave the rest of the cases as is, the %autorelease macro is expanded. fuzz_autochangelog_case = "unchanged" else: fuzz_autochangelog_case = autochangelog_case expected_spec_file_path = tmpspec.name fuzz_spec_file( expected_spec_file_path, autorelease_case, fuzz_autochangelog_case, remove_changelog_file, is_processed, ) rpm_cmd = [ "rpm", "--define", "dist .fc32", "--define", "_changelog_trimage 0", "--define", "_changelog_trimtime 0", "--specfile", ] if target_spec_file_path: test_cmd = rpm_cmd + [target_spec_file_path] else: test_cmd = rpm_cmd + [test_spec_file_path] expected_cmd = rpm_cmd + [expected_spec_file_path] q_release = ["--qf", "%{release}\n"] test_output = check_output(test_cmd + q_release, encoding="utf-8").strip() test_relnum, test_rest = relnum_split(test_output) expected_output = check_output(expected_cmd + q_release, encoding="utf-8").strip() expected_relnum, expected_rest = relnum_split(expected_output) if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): expected_relnum += 1 if branch == "epel8": expected_relnum += 1 assert test_relnum == expected_relnum assert test_rest == expected_rest q_changelog = ["--changelog"] test_output = check_output(test_cmd + q_changelog, encoding="utf-8") expected_output = check_output(expected_cmd + q_changelog, encoding="utf-8") if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): diff = list(difflib.ndiff(expected_output.splitlines(), test_output.splitlines())) # verify entry for uncommitted changes assert all(line.startswith("+ ") for line in diff[:3]) assert diff[0].endswith(f"-{expected_relnum}") assert diff[1] == "+ - Uncommitted changes" assert diff[2] == "+ " # verify the rest is the expected changelog assert all(line.startswith(" ") for line in diff[3:]) assert expected_output.splitlines() == [line[2:] for line in diff[3:]] else: > assert test_output == expected_output E AssertionError: assert '* Mon Apr 26...ging work\n\n' == '* Mon Apr 26...ging work\n\n' E - * Mon Apr 26 2021 Stephen Coady - 0-11 E ? ------- E + * Mon Apr 26 2021 Stephen Coady E - use autorelease instead of autorel E E * Fri Mar 27 2020 Pierre-Yves Chibon - 0-10 E - Change license to MIT... E E ...Full output truncated (23 lines hidden), use '-vv' to show tests/rpmautospec/subcommands/test_process_distgit.py:355: AssertionError ----------------------------- Captured stdout call ----------------------------- [rawhide 78cb2d1] use autorelease instead of autorel Author: Stephen Coady Date: Mon Apr 26 12:30:48 2021 +0100 1 file changed, 2 insertions(+), 2 deletions(-) ----------------------------- Captured stderr call ----------------------------- Already on 'rawhide' error: line 6: Empty tag: Release: error: Unable to open dummy-test-package-gloster.spec: No such file or directory warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: Package dummy-test-package-gloster: invalid utf-8 encoding in License: CC� - Invalid argument warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel ____ test_process_distgit[rawhide-optional-optional-False-False-False-True] ____ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_process_distgit_rawhide_o113') overwrite_specfile = True, branch = 'rawhide', dirty_worktree = False autorelease_case = 'optional', autochangelog_case = 'optional' remove_changelog_file = False, is_processed = False @pytest.mark.parametrize("overwrite_specfile", (False, True)) @pytest.mark.parametrize("dirty_worktree", (False, True)) @pytest.mark.parametrize( "branch, autorelease_case, autochangelog_case, remove_changelog_file, is_processed", _generate_branch_testcase_combinations(), ) def test_process_distgit( tmp_path, overwrite_specfile, branch, dirty_worktree, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ): """Test the process_distgit() function""" workdir = str(tmp_path) with tarfile.open( os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster-git.tar.gz", ) ) as tar: # Ensure unpackaged files are owned by user for member in tar: member.uid = os.getuid() member.gid = os.getgid() try: tar.extractall(path=workdir, numeric_owner=True, filter="data") except TypeError: # Filtering was introduced in Python 3.12. tar.extractall(path=workdir, numeric_owner=True) unpacked_repo_dir = os.path.join(workdir, "dummy-test-package-gloster") test_spec_file_path = os.path.join( unpacked_repo_dir, "dummy-test-package-gloster.spec", ) with temporary_cd(unpacked_repo_dir): run(["git", "checkout", branch]) if autorelease_case != "unchanged" or autochangelog_case != "unchanged" or is_processed: fuzz_spec_file( test_spec_file_path, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ) if remove_changelog_file: os.unlink(os.path.join(unpacked_repo_dir, "changelog")) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ) and not dirty_worktree: run_git_amend(unpacked_repo_dir) if overwrite_specfile: target_spec_file_path = None else: target_spec_file_path = os.path.join(workdir, "test-this-specfile-please.spec") orig_test_spec_file_stat = os.stat(test_spec_file_path) # Set restrictive umask to check that file mode is preserved. old_umask = os.umask(0o077) real_cls = process_distgit.PkgHistoryProcessor processor_run = None with mock.patch( "rpmautospec.subcommands.process_distgit.PkgHistoryProcessor", ) as processor_cls: def wrap_cls(*args, **kwargs): nonlocal processor_run obj = real_cls(*args, **kwargs) processor_run = obj.run = mock.Mock(wraps=obj.run) return obj processor_cls.side_effect = wrap_cls retval = process_distgit.process_distgit(unpacked_repo_dir, target_spec_file_path) # And restore previous umask. os.umask(old_umask) if is_processed: # No processing should be done if the spec file was processed before already. assert not retval processor_run.assert_not_called() return # Input spec file was not processed before, should have been processed now. assert retval is not False processor_run.assert_called() test_spec_file_stat = os.stat(test_spec_file_path) attrs = ["mode", "ino", "dev", "uid", "gid"] if not overwrite_specfile: attrs.extend(["size", "mtime", "ctime"]) for attr in attrs: assert getattr(test_spec_file_stat, "st_" + attr) == getattr( orig_test_spec_file_stat, "st_" + attr ) expected_spec_file_path = os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster.spec.expected", ) with tempfile.NamedTemporaryFile() as tmpspec: shutil.copy2(expected_spec_file_path, tmpspec.name) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): if autochangelog_case not in ( "changelog case insensitive", "changelog trailing garbage", ): # "%changelog", "%ChAnGeLoG", ... stay verbatim, trick fuzz_spec_file() to # leave the rest of the cases as is, the %autorelease macro is expanded. fuzz_autochangelog_case = "unchanged" else: fuzz_autochangelog_case = autochangelog_case expected_spec_file_path = tmpspec.name fuzz_spec_file( expected_spec_file_path, autorelease_case, fuzz_autochangelog_case, remove_changelog_file, is_processed, ) rpm_cmd = [ "rpm", "--define", "dist .fc32", "--define", "_changelog_trimage 0", "--define", "_changelog_trimtime 0", "--specfile", ] if target_spec_file_path: test_cmd = rpm_cmd + [target_spec_file_path] else: test_cmd = rpm_cmd + [test_spec_file_path] expected_cmd = rpm_cmd + [expected_spec_file_path] q_release = ["--qf", "%{release}\n"] test_output = check_output(test_cmd + q_release, encoding="utf-8").strip() test_relnum, test_rest = relnum_split(test_output) expected_output = check_output(expected_cmd + q_release, encoding="utf-8").strip() expected_relnum, expected_rest = relnum_split(expected_output) if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): expected_relnum += 1 if branch == "epel8": expected_relnum += 1 assert test_relnum == expected_relnum assert test_rest == expected_rest q_changelog = ["--changelog"] test_output = check_output(test_cmd + q_changelog, encoding="utf-8") expected_output = check_output(expected_cmd + q_changelog, encoding="utf-8") if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): diff = list(difflib.ndiff(expected_output.splitlines(), test_output.splitlines())) # verify entry for uncommitted changes assert all(line.startswith("+ ") for line in diff[:3]) assert diff[0].endswith(f"-{expected_relnum}") assert diff[1] == "+ - Uncommitted changes" assert diff[2] == "+ " # verify the rest is the expected changelog assert all(line.startswith(" ") for line in diff[3:]) assert expected_output.splitlines() == [line[2:] for line in diff[3:]] else: > assert test_output == expected_output E AssertionError: assert '* Mon Apr 26...ging work\n\n' == '* Mon Apr 26...ging work\n\n' E - * Mon Apr 26 2021 Stephen Coady - 0-11 E ? ------- E + * Mon Apr 26 2021 Stephen Coady E - use autorelease instead of autorel E E * Fri Mar 27 2020 Pierre-Yves Chibon - 0-10 E - Change license to MIT... E E ...Full output truncated (23 lines hidden), use '-vv' to show tests/rpmautospec/subcommands/test_process_distgit.py:355: AssertionError ----------------------------- Captured stdout call ----------------------------- [rawhide 78cb2d1] use autorelease instead of autorel Author: Stephen Coady Date: Mon Apr 26 12:30:48 2021 +0100 1 file changed, 2 insertions(+), 2 deletions(-) ----------------------------- Captured stderr call ----------------------------- Already on 'rawhide' error: line 6: Empty tag: Release: error: Unable to open dummy-test-package-gloster.spec: No such file or directory warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: Package dummy-test-package-gloster: invalid utf-8 encoding in License: CC� - Invalid argument warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel ____ test_process_distgit[rawhide-optional-optional-True-False-False-False] ____ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_process_distgit_rawhide_o120') overwrite_specfile = False, branch = 'rawhide', dirty_worktree = False autorelease_case = 'optional', autochangelog_case = 'optional' remove_changelog_file = True, is_processed = False @pytest.mark.parametrize("overwrite_specfile", (False, True)) @pytest.mark.parametrize("dirty_worktree", (False, True)) @pytest.mark.parametrize( "branch, autorelease_case, autochangelog_case, remove_changelog_file, is_processed", _generate_branch_testcase_combinations(), ) def test_process_distgit( tmp_path, overwrite_specfile, branch, dirty_worktree, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ): """Test the process_distgit() function""" workdir = str(tmp_path) with tarfile.open( os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster-git.tar.gz", ) ) as tar: # Ensure unpackaged files are owned by user for member in tar: member.uid = os.getuid() member.gid = os.getgid() try: tar.extractall(path=workdir, numeric_owner=True, filter="data") except TypeError: # Filtering was introduced in Python 3.12. tar.extractall(path=workdir, numeric_owner=True) unpacked_repo_dir = os.path.join(workdir, "dummy-test-package-gloster") test_spec_file_path = os.path.join( unpacked_repo_dir, "dummy-test-package-gloster.spec", ) with temporary_cd(unpacked_repo_dir): run(["git", "checkout", branch]) if autorelease_case != "unchanged" or autochangelog_case != "unchanged" or is_processed: fuzz_spec_file( test_spec_file_path, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ) if remove_changelog_file: os.unlink(os.path.join(unpacked_repo_dir, "changelog")) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ) and not dirty_worktree: run_git_amend(unpacked_repo_dir) if overwrite_specfile: target_spec_file_path = None else: target_spec_file_path = os.path.join(workdir, "test-this-specfile-please.spec") orig_test_spec_file_stat = os.stat(test_spec_file_path) # Set restrictive umask to check that file mode is preserved. old_umask = os.umask(0o077) real_cls = process_distgit.PkgHistoryProcessor processor_run = None with mock.patch( "rpmautospec.subcommands.process_distgit.PkgHistoryProcessor", ) as processor_cls: def wrap_cls(*args, **kwargs): nonlocal processor_run obj = real_cls(*args, **kwargs) processor_run = obj.run = mock.Mock(wraps=obj.run) return obj processor_cls.side_effect = wrap_cls retval = process_distgit.process_distgit(unpacked_repo_dir, target_spec_file_path) # And restore previous umask. os.umask(old_umask) if is_processed: # No processing should be done if the spec file was processed before already. assert not retval processor_run.assert_not_called() return # Input spec file was not processed before, should have been processed now. assert retval is not False processor_run.assert_called() test_spec_file_stat = os.stat(test_spec_file_path) attrs = ["mode", "ino", "dev", "uid", "gid"] if not overwrite_specfile: attrs.extend(["size", "mtime", "ctime"]) for attr in attrs: assert getattr(test_spec_file_stat, "st_" + attr) == getattr( orig_test_spec_file_stat, "st_" + attr ) expected_spec_file_path = os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster.spec.expected", ) with tempfile.NamedTemporaryFile() as tmpspec: shutil.copy2(expected_spec_file_path, tmpspec.name) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): if autochangelog_case not in ( "changelog case insensitive", "changelog trailing garbage", ): # "%changelog", "%ChAnGeLoG", ... stay verbatim, trick fuzz_spec_file() to # leave the rest of the cases as is, the %autorelease macro is expanded. fuzz_autochangelog_case = "unchanged" else: fuzz_autochangelog_case = autochangelog_case expected_spec_file_path = tmpspec.name fuzz_spec_file( expected_spec_file_path, autorelease_case, fuzz_autochangelog_case, remove_changelog_file, is_processed, ) rpm_cmd = [ "rpm", "--define", "dist .fc32", "--define", "_changelog_trimage 0", "--define", "_changelog_trimtime 0", "--specfile", ] if target_spec_file_path: test_cmd = rpm_cmd + [target_spec_file_path] else: test_cmd = rpm_cmd + [test_spec_file_path] expected_cmd = rpm_cmd + [expected_spec_file_path] q_release = ["--qf", "%{release}\n"] test_output = check_output(test_cmd + q_release, encoding="utf-8").strip() test_relnum, test_rest = relnum_split(test_output) expected_output = check_output(expected_cmd + q_release, encoding="utf-8").strip() expected_relnum, expected_rest = relnum_split(expected_output) if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): expected_relnum += 1 if branch == "epel8": expected_relnum += 1 assert test_relnum == expected_relnum assert test_rest == expected_rest q_changelog = ["--changelog"] test_output = check_output(test_cmd + q_changelog, encoding="utf-8") expected_output = check_output(expected_cmd + q_changelog, encoding="utf-8") if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): diff = list(difflib.ndiff(expected_output.splitlines(), test_output.splitlines())) # verify entry for uncommitted changes assert all(line.startswith("+ ") for line in diff[:3]) assert diff[0].endswith(f"-{expected_relnum}") assert diff[1] == "+ - Uncommitted changes" assert diff[2] == "+ " # verify the rest is the expected changelog assert all(line.startswith(" ") for line in diff[3:]) assert expected_output.splitlines() == [line[2:] for line in diff[3:]] else: > assert test_output == expected_output E AssertionError: assert '* Mon Apr 26...ncodings!\n\n' == '* Mon Apr 26...ncodings!\n\n' E - * Mon Apr 26 2021 Stephen Coady - 0-11 E ? ------- E + * Mon Apr 26 2021 Stephen Coady E - use autorelease instead of autorel E E * Fri Mar 27 2020 Pierre-Yves Chibon - 0-10 E - Change license to MIT... E E ...Full output truncated (8 lines hidden), use '-vv' to show tests/rpmautospec/subcommands/test_process_distgit.py:355: AssertionError ----------------------------- Captured stdout call ----------------------------- [rawhide a7133e3] use autorelease instead of autorel Author: Stephen Coady Date: Mon Apr 26 12:30:48 2021 +0100 2 files changed, 2 insertions(+), 16 deletions(-) delete mode 100644 changelog ----------------------------- Captured stderr call ----------------------------- Already on 'rawhide' error: line 6: Empty tag: Release: error: Unable to open dummy-test-package-gloster.spec: No such file or directory warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: Package dummy-test-package-gloster: invalid utf-8 encoding in License: CC� - Invalid argument warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel ____ test_process_distgit[rawhide-optional-optional-True-False-False-True] _____ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_process_distgit_rawhide_o121') overwrite_specfile = True, branch = 'rawhide', dirty_worktree = False autorelease_case = 'optional', autochangelog_case = 'optional' remove_changelog_file = True, is_processed = False @pytest.mark.parametrize("overwrite_specfile", (False, True)) @pytest.mark.parametrize("dirty_worktree", (False, True)) @pytest.mark.parametrize( "branch, autorelease_case, autochangelog_case, remove_changelog_file, is_processed", _generate_branch_testcase_combinations(), ) def test_process_distgit( tmp_path, overwrite_specfile, branch, dirty_worktree, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ): """Test the process_distgit() function""" workdir = str(tmp_path) with tarfile.open( os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster-git.tar.gz", ) ) as tar: # Ensure unpackaged files are owned by user for member in tar: member.uid = os.getuid() member.gid = os.getgid() try: tar.extractall(path=workdir, numeric_owner=True, filter="data") except TypeError: # Filtering was introduced in Python 3.12. tar.extractall(path=workdir, numeric_owner=True) unpacked_repo_dir = os.path.join(workdir, "dummy-test-package-gloster") test_spec_file_path = os.path.join( unpacked_repo_dir, "dummy-test-package-gloster.spec", ) with temporary_cd(unpacked_repo_dir): run(["git", "checkout", branch]) if autorelease_case != "unchanged" or autochangelog_case != "unchanged" or is_processed: fuzz_spec_file( test_spec_file_path, autorelease_case, autochangelog_case, remove_changelog_file, is_processed, ) if remove_changelog_file: os.unlink(os.path.join(unpacked_repo_dir, "changelog")) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ) and not dirty_worktree: run_git_amend(unpacked_repo_dir) if overwrite_specfile: target_spec_file_path = None else: target_spec_file_path = os.path.join(workdir, "test-this-specfile-please.spec") orig_test_spec_file_stat = os.stat(test_spec_file_path) # Set restrictive umask to check that file mode is preserved. old_umask = os.umask(0o077) real_cls = process_distgit.PkgHistoryProcessor processor_run = None with mock.patch( "rpmautospec.subcommands.process_distgit.PkgHistoryProcessor", ) as processor_cls: def wrap_cls(*args, **kwargs): nonlocal processor_run obj = real_cls(*args, **kwargs) processor_run = obj.run = mock.Mock(wraps=obj.run) return obj processor_cls.side_effect = wrap_cls retval = process_distgit.process_distgit(unpacked_repo_dir, target_spec_file_path) # And restore previous umask. os.umask(old_umask) if is_processed: # No processing should be done if the spec file was processed before already. assert not retval processor_run.assert_not_called() return # Input spec file was not processed before, should have been processed now. assert retval is not False processor_run.assert_called() test_spec_file_stat = os.stat(test_spec_file_path) attrs = ["mode", "ino", "dev", "uid", "gid"] if not overwrite_specfile: attrs.extend(["size", "mtime", "ctime"]) for attr in attrs: assert getattr(test_spec_file_stat, "st_" + attr) == getattr( orig_test_spec_file_stat, "st_" + attr ) expected_spec_file_path = os.path.join( __here__, os.path.pardir, os.path.pardir, "test-data", "repodata", "dummy-test-package-gloster.spec.expected", ) with tempfile.NamedTemporaryFile() as tmpspec: shutil.copy2(expected_spec_file_path, tmpspec.name) if ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): if autochangelog_case not in ( "changelog case insensitive", "changelog trailing garbage", ): # "%changelog", "%ChAnGeLoG", ... stay verbatim, trick fuzz_spec_file() to # leave the rest of the cases as is, the %autorelease macro is expanded. fuzz_autochangelog_case = "unchanged" else: fuzz_autochangelog_case = autochangelog_case expected_spec_file_path = tmpspec.name fuzz_spec_file( expected_spec_file_path, autorelease_case, fuzz_autochangelog_case, remove_changelog_file, is_processed, ) rpm_cmd = [ "rpm", "--define", "dist .fc32", "--define", "_changelog_trimage 0", "--define", "_changelog_trimtime 0", "--specfile", ] if target_spec_file_path: test_cmd = rpm_cmd + [target_spec_file_path] else: test_cmd = rpm_cmd + [test_spec_file_path] expected_cmd = rpm_cmd + [expected_spec_file_path] q_release = ["--qf", "%{release}\n"] test_output = check_output(test_cmd + q_release, encoding="utf-8").strip() test_relnum, test_rest = relnum_split(test_output) expected_output = check_output(expected_cmd + q_release, encoding="utf-8").strip() expected_relnum, expected_rest = relnum_split(expected_output) if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): expected_relnum += 1 if branch == "epel8": expected_relnum += 1 assert test_relnum == expected_relnum assert test_rest == expected_rest q_changelog = ["--changelog"] test_output = check_output(test_cmd + q_changelog, encoding="utf-8") expected_output = check_output(expected_cmd + q_changelog, encoding="utf-8") if dirty_worktree and ( autorelease_case != "unchanged" or autochangelog_case != "unchanged" or remove_changelog_file ): diff = list(difflib.ndiff(expected_output.splitlines(), test_output.splitlines())) # verify entry for uncommitted changes assert all(line.startswith("+ ") for line in diff[:3]) assert diff[0].endswith(f"-{expected_relnum}") assert diff[1] == "+ - Uncommitted changes" assert diff[2] == "+ " # verify the rest is the expected changelog assert all(line.startswith(" ") for line in diff[3:]) assert expected_output.splitlines() == [line[2:] for line in diff[3:]] else: > assert test_output == expected_output E AssertionError: assert '* Mon Apr 26...ncodings!\n\n' == '* Mon Apr 26...ncodings!\n\n' E - * Mon Apr 26 2021 Stephen Coady - 0-11 E ? ------- E + * Mon Apr 26 2021 Stephen Coady E - use autorelease instead of autorel E E * Fri Mar 27 2020 Pierre-Yves Chibon - 0-10 E - Change license to MIT... E E ...Full output truncated (8 lines hidden), use '-vv' to show tests/rpmautospec/subcommands/test_process_distgit.py:355: AssertionError ----------------------------- Captured stdout call ----------------------------- [rawhide a7133e3] use autorelease instead of autorel Author: Stephen Coady Date: Mon Apr 26 12:30:48 2021 +0100 2 files changed, 2 insertions(+), 16 deletions(-) delete mode 100644 changelog ----------------------------- Captured stderr call ----------------------------- Already on 'rawhide' error: line 6: Empty tag: Release: error: Unable to open dummy-test-package-gloster.spec: No such file or directory warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel warning: Package dummy-test-package-gloster: invalid utf-8 encoding in License: CC� - Invalid argument warning: line 6: Possible unexpanded macro in: Release: %autorel warning: line 6: Possible unexpanded macro in: Release: %autorel =========================== short test summary info ============================ FAILED tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-unchanged-False-False-False-False] FAILED tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-unchanged-False-False-False-True] FAILED tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-unchanged-True-False-False-False] FAILED tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-unchanged-True-False-False-True] FAILED tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog case insensitive-False-False-False-False] FAILED tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog case insensitive-False-False-False-True] FAILED tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog case insensitive-True-False-False-False] FAILED tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog case insensitive-True-False-False-True] FAILED tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog trailing garbage-False-False-False-False] FAILED tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog trailing garbage-False-False-False-True] FAILED tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog trailing garbage-True-False-False-False] FAILED tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-changelog trailing garbage-True-False-False-True] FAILED tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-line in between-False-False-False-False] FAILED tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-line in between-False-False-False-True] FAILED tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-line in between-True-False-False-False] FAILED tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-line in between-True-False-False-True] FAILED tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-trailing line-False-False-False-False] FAILED tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-trailing line-False-False-False-True] FAILED tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-trailing line-True-False-False-False] FAILED tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-trailing line-True-False-False-True] FAILED tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-with braces-False-False-False-False] FAILED tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-with braces-False-False-False-True] FAILED tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-with braces-True-False-False-False] FAILED tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-with braces-True-False-False-True] FAILED tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-missing-False-False-False-False] FAILED tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-missing-False-False-False-True] FAILED tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-missing-True-False-False-False] FAILED tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-missing-True-False-False-True] FAILED tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-optional-False-False-False-False] FAILED tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-optional-False-False-False-True] FAILED tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-optional-True-False-False-False] FAILED tests/rpmautospec/subcommands/test_process_distgit.py::test_process_distgit[rawhide-optional-optional-True-False-False-True] ============= 32 failed, 586 passed, 1 skipped in 61.04s (0:01:01) ============= RPM build errors: error: Bad exit status from /var/tmp/rpm-tmp.N7CjeX (%check) Bad exit status from /var/tmp/rpm-tmp.N7CjeX (%check) Child return code was: 1 EXCEPTION: [Error('Command failed: \n # /usr/bin/systemd-nspawn -q -M 37ebe8c681534199ac8eb370e50e9bda -D /var/lib/mock/inferit-9_3-extras-build-29922-52588/root -a -u mockbuild --capability=cap_ipc_lock --bind=/tmp/mock-resolv.hxa50dg9:/etc/resolv.conf --bind=/dev/mapper/control --bind=/dev/loop-control --bind=/dev/loop0 --bind=/dev/loop1 --bind=/dev/loop2 --bind=/dev/loop3 --bind=/dev/loop4 --bind=/dev/loop5 --bind=/dev/loop6 --bind=/dev/loop7 --bind=/dev/loop8 --bind=/dev/loop9 --bind=/dev/loop10 --bind=/dev/loop11 --console=pipe --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/builddir --setenv=HOSTNAME=mock --setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin --setenv=PROMPT_COMMAND=printf "\\033]0;\\007" --setenv=PS1= \\s-\\v\\$ --setenv=LANG=C.UTF-8 --resolv-conf=off bash --login -c /usr/bin/rpmbuild -ba --noprep --noclean --target noarch --nodeps /builddir/build/SPECS/python-rpmautospec.spec\n', 1)] Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/mockbuild/trace_decorator.py", line 93, in trace result = func(*args, **kw) File "/usr/lib/python3.9/site-packages/mockbuild/util.py", line 597, in do_with_status raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode) mockbuild.exception.Error: Command failed: # /usr/bin/systemd-nspawn -q -M 37ebe8c681534199ac8eb370e50e9bda -D /var/lib/mock/inferit-9_3-extras-build-29922-52588/root -a -u mockbuild --capability=cap_ipc_lock --bind=/tmp/mock-resolv.hxa50dg9:/etc/resolv.conf --bind=/dev/mapper/control --bind=/dev/loop-control --bind=/dev/loop0 --bind=/dev/loop1 --bind=/dev/loop2 --bind=/dev/loop3 --bind=/dev/loop4 --bind=/dev/loop5 --bind=/dev/loop6 --bind=/dev/loop7 --bind=/dev/loop8 --bind=/dev/loop9 --bind=/dev/loop10 --bind=/dev/loop11 --console=pipe --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/builddir --setenv=HOSTNAME=mock --setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin --setenv=PROMPT_COMMAND=printf "\033]0;\007" --setenv=PS1= \s-\v\$ --setenv=LANG=C.UTF-8 --resolv-conf=off bash --login -c /usr/bin/rpmbuild -ba --noprep --noclean --target noarch --nodeps /builddir/build/SPECS/python-rpmautospec.spec