[cxxtest] fix handling of GetoptError objects (bug #768869)
Martin Gieseking
mgieseki at fedoraproject.org
Mon Dec 19 12:19:28 UTC 2011
commit c56bc5a19ad6899ac9153cb3648913b16c749288
Author: Martin Gieseking <martin.gieseking at uos.de>
Date: Mon Dec 19 13:19:12 2011 +0100
fix handling of GetoptError objects (bug #768869)
cxxtest-fix-abort.patch | 23 +++++++++++++++++++++++
cxxtest.spec | 8 +++++++-
2 files changed, 30 insertions(+), 1 deletions(-)
---
diff --git a/cxxtest-fix-abort.patch b/cxxtest-fix-abort.patch
new file mode 100644
index 0000000..b2e6e3e
--- /dev/null
+++ b/cxxtest-fix-abort.patch
@@ -0,0 +1,23 @@
+diff --git a/cxxtestgen.py b/cxxtestgen.py
+--- a/cxxtestgen.py
++++ b/cxxtestgen.py
+@@ -70,14 +70,17 @@
+ def abort( problem ):
+ '''Print error message and exit'''
+ sys.stderr.write( '\n' )
+- sys.stderr.write( problem )
++ if type(problem).__name__ == 'GetoptError':
++ sys.stderr.write( problem[0] )
++ else:
++ sys.stderr.write( problem )
+ sys.stderr.write( '\n\n' )
+ sys.exit(2)
+
+ def parseCommandline():
+ '''Analyze command line arguments'''
+ try:
+- options, patterns = getopt.getopt( sys.argv[1:], 'o:r:',
++ options, patterns = getopt.getopt( sys.argv[1:], 'o:r:v',
+ ['version', 'output=', 'runner=', 'gui=',
+ 'error-printer', 'abort-on-fail', 'have-std', 'no-std',
+ 'have-eh', 'no-eh', 'template=', 'include=',
diff --git a/cxxtest.spec b/cxxtest.spec
index 202b992..ea3d497 100644
--- a/cxxtest.spec
+++ b/cxxtest.spec
@@ -1,6 +1,6 @@
Name: cxxtest
Version: 3.10.1
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: A JUnit-like testing framework for C++
Group: Development/Tools
@@ -11,6 +11,8 @@ Source0: http://cxxtest.tigris.org/files/documents/6421/43281/%{name}-%{v
# Documentation
Source1: http://cxxtest.tigris.org/files/documents/6421/43284/%{name}-guide-%{version}.pdf
+Patch0: %{name}-fix-abort.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -36,6 +38,7 @@ This package contains the documentation on how to use CxxTest.
%prep
%setup -q -n %{name}
+%patch0 -p1
cp -a %{SOURCE1} .
%build
@@ -72,6 +75,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Mon Dec 19 2011 Martin Gieseking <martin.gieseking at uos.de> - 3.10.1-5
+- Fixed https://bugzilla.redhat.com/show_bug.cgi?id=768869
+
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.10.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
More information about the scm-commits
mailing list