summaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/bcfg2.spec13
1 files changed, 13 insertions, 0 deletions
diff --git a/misc/bcfg2.spec b/misc/bcfg2.spec
index e3a2a675a..a855ae102 100644
--- a/misc/bcfg2.spec
+++ b/misc/bcfg2.spec
@@ -397,6 +397,19 @@ This package includes the examples files for Bcfg2.
%prep
%setup -q -n %{name}-%{version}%{?_pre_rc}
+# The pylint and pep8 unit tests fail on RH-derivative distros
+%if "%{_vendor}" == "redhat"
+mv testsuite/Testsrc/test_code_checks.py \
+ testsuite/Testsrc/test_code_checks.py.disable_unit_tests
+awk '
+ BEGIN {line=0}
+ /class Test(Pylint|PEP8)/ {line=FNR+1}
+ FNR==line {sub("True","False")}
+ {print $0}
+ ' testsuite/Testsrc/test_code_checks.py.disable_unit_tests \
+ > testsuite/Testsrc/test_code_checks.py
+%endif
+
# Fixup some paths
%{__perl} -pi -e 's@/etc/default@%{_sysconfdir}/sysconfig@g' tools/bcfg2-cron