From c295ad52f058c71f584d20c57376092f2a1d5c54 Mon Sep 17 00:00:00 2001 From: yang_zhuang_zhuang <1162011203@qq.com> Date: Sat, 22 May 2021 17:10:43 +0800 Subject: [PATCH] enable make check Signed-off-by: yang_zhuang_zhuang <1162011203@qq.com> --- cloud-init.spec | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/cloud-init.spec b/cloud-init.spec index 271cee9..d50cd3e 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -1,6 +1,6 @@ Name: cloud-init Version: 20.3 -Release: 1 +Release: 2 Summary: the defacto multi-distribution package that handles early initialization of a cloud instance. License: ASL 2.0 or GPLv3 URL: http://launchpad.net/cloud-init @@ -20,7 +20,7 @@ BuildRequires: iproute python3-configobj python3-httpretty >= 0.8.14-2 BuildRequires: python3-jinja2 python3-jsonpatch python3-jsonschema BuildRequires: python3-mock python3-nose python3-oauthlib python3-prettytable BuildRequires: python3-pyserial python3-PyYAML python3-requests python3-six -BuildRequires: python3-unittest2 dnf %{_vendor}-release +BuildRequires: python3-unittest2 dnf %{_vendor}-release passwd python3-pytest Requires: e2fsprogs iproute python3-libselinux net-tools python3-policycoreutils Requires: procps python3-configobj python3-jinja2 python3-jsonpatch xfsprogs @@ -43,6 +43,9 @@ sed -i -e 's|#!/usr/bin/env python|#!/usr/bin/env python3|' \ -e 's|#!/usr/bin/python|#!/usr/bin/python3|' tools/* cloudinit/ssh_util.py sed -i 's/\/etc\/redhat-release/\/etc\/%{_vendor}-release/g' setup.py +find cloudinit/tests tests/ -type f | xargs sed -i s/unittest2/unittest/ +find cloudinit/tests tests/ -type f | xargs sed -i s/assertItemsEqual/assertCountEqual/ + %build %py3_build @@ -58,7 +61,7 @@ install -D -m 0644 tools/21-cloudinit.conf %{buildroot}/%{_sysconfdir}/rsyslog.d rm -f $RPM_BUILD_DIR/%{name}-%{version}/tests/unittests/test_handler/test_handler_ntp.py rm -f $RPM_BUILD_DIR/%{name}-%{version}/tests/unittests/test_datasource/test_opennebula.py -#nosetests-%%{python3_version} tests/unittests/ +nosetests-%{python3_version} tests/unittests/ %pre @@ -120,6 +123,12 @@ fi %exclude /usr/share/doc/* %changelog +* Sat May 22 2021 yangzhuangzhuang - 20.3-2 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:enable make check + * Wed Nov 4 2020 yangzhuangzhuang - 20.3-1 - Type:update - ID:NA -- Gitee