diff --git a/.gitignore b/.gitignore index ee32db3..c5cbf4e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ dejagnu-1.4.4.tar.gz dejagnu.texi +/dejagnu-1.5.tar.gz diff --git a/dejagnu-1.4.4-runtest.patch b/dejagnu-1.4.4-runtest.patch deleted file mode 100644 index 2d75f4c..0000000 --- a/dejagnu-1.4.4-runtest.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- dejagnu-1.4.4/runtest.exp.old 2003-10-15 15:22:52.000000000 +0200 -+++ dejagnu-1.4.4/runtest.exp 2008-08-27 16:22:18.000000000 +0200 -@@ -1443,8 +1443,7 @@ - global tool - - clone_output "Running $test_file_name ..." -- set prms_id 0 -- set bug_id 0 -+ reset_vars - set test_result "" - - if [file exists $test_file_name] { diff --git a/dejagnu-1.4.4-testsuite.patch b/dejagnu-1.4.4-testsuite.patch deleted file mode 100644 index d9e07ea..0000000 --- a/dejagnu-1.4.4-testsuite.patch +++ /dev/null @@ -1,93 +0,0 @@ -diff -Burp dejagnu-1.4.4/testsuite/libdejagnu/unit.cc dejagnu-1.4.4-pm/testsuite/libdejagnu/unit.cc ---- dejagnu-1.4.4/testsuite/libdejagnu/unit.cc 2003-08-17 03:33:06.000000000 +0200 -+++ dejagnu-1.4.4-pm/testsuite/libdejagnu/unit.cc 2007-10-03 18:31:03.000000000 +0200 -@@ -7,6 +7,7 @@ - #include - #include - #include -+#include - - using namespace std; - -@@ -49,12 +50,8 @@ main (int argc, char *argv[]) { - // Replace the output buffer for cout, so we can examine it to - // see what was displayed. Otherwise, there is no way we can test - // the logging functions completely. -- char bbuuff[5120]; --#ifdef __STDC_HOSTED__ -- cout.rdbuf()->pubsetbuf(bbuuff, 5120); --#else -- cout.rdbuf()->setbuf(bbuuff, 5120); --#endif -+ stringstream stream; -+ streambuf * buf = cout.rdbuf(stream.rdbuf()); - - testClass1.tname = "testType1"; - testClass1.tnum = 1; -@@ -65,53 +62,59 @@ main (int argc, char *argv[]) { - - // Test the pass message - test.pass ("bogus pass message for testing"); -+ cout.flush(); - outstate = os2; -- if (strncmp(bbuuff, "\tPAS: bogus pass message", 22) == 0) { -+ if (strncmp(stream.str().c_str(), "\tPAS: bogus pass message", 22) == 0) { - runtest.pass ("Pass message"); - } else { - runtest.fail ("Pass message"); - } -+ stream.str(""); - - // Test the fail message - outstate = os1; - test.fail ("bogus fail message for testing"); - cout.flush(); - outstate = os2; -- if (strncmp(bbuuff, "\tFAI: bogus fail message", 22) == 0) { -+ if (strncmp(stream.str().c_str(), "\tFAI: bogus fail message", 22) == 0) { - runtest.pass ("Fail message"); - } else { - runtest.fail ("Fail message"); - } -+ stream.str(""); - - // Test the untested message - outstate = os1; - test.untested ("bogus untested message for testing"); - cout.flush(); - outstate = os2; -- if (strncmp(bbuuff, "\tUNT: bogus untested message", 21) == 0) { -+ if (strncmp(stream.str().c_str(), "\tUNT: bogus untested message", 21) == 0) { - runtest.pass ("Untested message"); - } else { - runtest.fail ("Untested message"); - } -+ stream.str(""); - - // Test the unresolved message - outstate = os1; - test.unresolved ("bogus unresolved message for testing"); - cout.flush(); - outstate = os2; -- if (strncmp(bbuuff, "\tUNR: bogus unresolved message", 21) == 0) { -+ if (strncmp(stream.str().c_str(), "\tUNR: bogus unresolved message", 21) == 0) { - runtest.pass ("Unresolved message"); - } else { - runtest.fail ("Unresolved message"); - } -+ stream.str(""); - - // Make sure we got everything in the totals - regcomp (®ex_pat, "\r\n\t#passed.*#failed.*#untested.*#unresolved", REG_NOSUB|REG_NEWLINE); -- if (regexec (®ex_pat, bbuuff, 0, (regmatch_t *)0, 0)) { -+ if (regexec (®ex_pat, stream.str().c_str(), 0, (regmatch_t *)0, 0)) { - runtest.pass ("Totals message"); - } else { - runtest.fail ("Totals message"); - } --} -- -+ stream.str(""); - -+ cout.rdbuf(buf); -+} diff --git a/dejagnu-1.4.4-utils-speedup.patch b/dejagnu-1.4.4-utils-speedup.patch deleted file mode 100644 index 2823d5d..0000000 --- a/dejagnu-1.4.4-utils-speedup.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- dejagnu-1.4.4/lib/utils.exp 2009-10-16 12:58:38.000000000 +0200 -+++ dejagnu-1.4.4/lib/utils.exp 2010-01-21 21:12:54.144855458 +0100 -@@ -106,7 +106,7 @@ proc find { rootdir pattern } { - foreach i $dirs { - verbose "Looking in $i" 3 - foreach match [glob -nocomplain $i/$pattern] { -- if ![file isdirectory $match] { -+ if {![file isdirectory $match]} { - lappend files $match - verbose "Adding $match to file list" 3 - } -@@ -216,7 +216,7 @@ proc prune { list pattern } { - set tmp {} - foreach i $list { - verbose "Checking pattern \"$pattern\" against $i" 3 -- if ![string match $pattern $i] { -+ if {![string match $pattern $i]} { - lappend tmp $i - } else { - verbose "Removing element $i from list" 3 diff --git a/dejagnu-1.5-runtest.patch b/dejagnu-1.5-runtest.patch new file mode 100644 index 0000000..6813cbc --- /dev/null +++ b/dejagnu-1.5-runtest.patch @@ -0,0 +1,13 @@ +diff -up dejagnu-1.5/runtest.exp.orig dejagnu-1.5/runtest.exp +--- dejagnu-1.5/runtest.exp.orig 2011-03-04 13:09:59.000000000 +0100 ++++ dejagnu-1.5/runtest.exp 2011-03-22 14:43:06.090850456 +0100 +@@ -1443,8 +1443,7 @@ proc runtest { test_file_name } { + global tool + + clone_output "Running $test_file_name ..." +- set prms_id 0 +- set bug_id 0 ++ reset_vars + set test_result "" + + if {[file exists $test_file_name]} { diff --git a/dejagnu-1.4.4-smp-1.patch b/dejagnu-1.5-smp-1.patch similarity index 68% rename from dejagnu-1.4.4-smp-1.patch rename to dejagnu-1.5-smp-1.patch index 0a30f45..ff53c23 100644 --- a/dejagnu-1.4.4-smp-1.patch +++ b/dejagnu-1.5-smp-1.patch @@ -1,13 +1,17 @@ ---- dejagnu-1.4.4/lib/remote.exp.smp 2003-10-10 23:42:46.000000000 -0700 -+++ dejagnu-1.4.4/lib/remote.exp 2005-08-05 12:32:10.107161990 -0700 -@@ -91,9 +91,13 @@ proc local_exec { commandline inp outp t +diff -up dejagnu-1.5/lib/remote.exp.smp-1 dejagnu-1.5/lib/remote.exp +--- dejagnu-1.5/lib/remote.exp.smp-1 2011-03-22 14:51:40.962914270 +0100 ++++ dejagnu-1.5/lib/remote.exp 2011-03-22 14:54:36.152608589 +0100 +@@ -86,11 +86,16 @@ proc local_exec { commandline inp outp t + # doesn't assign process groups correctly and we can't reliably kill # programs that bear children. We can't use tcl's exec because it has # no way to timeout programs that hang. *sigh* - # ++ # + # The expect command will close the connection when it sees EOF. On + # SMP machine, close the connection may send SIGHUP to the child + # and cause it to exit before it can exit normally. We should make + # the child to ignore SIGHUP. + + global errorInfo if { "$inp" == "" && "$outp" == "" } { set id -1 - set result [catch "eval spawn \{${commandline}\}" pid] @@ -15,7 +19,7 @@ if { $result == 0 } { set result2 0 } else { -@@ -134,7 +138,7 @@ proc local_exec { commandline inp outp t +@@ -130,7 +135,7 @@ proc local_exec { commandline inp outp t return [list -1 "open of $commandline $inp $outp failed: $errorInfo"] } set pid [pid $id] diff --git a/dejagnu.spec b/dejagnu.spec index 0634748..3d48b5e 100644 --- a/dejagnu.spec +++ b/dejagnu.spec @@ -1,9 +1,9 @@ Summary: A front end for testing other programs Name: dejagnu -Version: 1.4.4 -Release: 18%{?dist} +Version: 1.5 +Release: 1%{?dist} Epoch: 1 -License: GPLv2+ +License: GPLv3+ Source: ftp://ftp.gnu.org/gnu/dejagnu/dejagnu-%{version}.tar.gz Source2: dejagnu.texi Group: Development/Tools @@ -12,10 +12,8 @@ Requires: expect BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: expect screen texinfo -Patch1: dejagnu-1.4.4-smp-1.patch -Patch3: dejagnu-1.4.4-testsuite.patch -Patch4: dejagnu-1.4.4-runtest.patch -Patch5: dejagnu-1.4.4-utils-speedup.patch +Patch1: dejagnu-1.5-smp-1.patch +Patch2: dejagnu-1.5-runtest.patch %description DejaGnu is an Expect/Tcl based framework for testing other programs. @@ -28,9 +26,7 @@ into software development). %prep %setup -q %patch1 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 +%patch2 -p1 %build %configure -v @@ -53,8 +49,9 @@ exit $RESULT %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install +rm -f $RPM_BUILD_ROOT%{_infodir}/dir chmod a-x $RPM_BUILD_ROOT/%{_datadir}/dejagnu/runtest.exp -make -C doc DESTDIR=$RPM_BUILD_ROOT install-man +make DESTDIR=$RPM_BUILD_ROOT install-man install -D -m 644 doc/dejagnu.info $RPM_BUILD_ROOT/%{_infodir}/%{name}.info %post @@ -72,14 +69,17 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) -%doc COPYING NEWS README AUTHORS ChangeLog doc/overview.pdf +%doc COPYING NEWS README AUTHORS ChangeLog doc/dejagnu.texi %{_bindir}/runtest %{_datadir}/dejagnu %{_includedir}/dejagnu.h %{_mandir}/*/* -%{_infodir}/* +%{_infodir}/dejagnu* %changelog +* Tue Mar 22 2011 Honza Horak 1:1.5-1 +- Update to 1.5, license changed to GPLv3+ + * Tue Feb 08 2011 Fedora Release Engineering - 1:1.4.4-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild diff --git a/sources b/sources index 96898f2..f0a5687 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -053f18fd5d00873de365413cab17a666 dejagnu-1.4.4.tar.gz -d70aca4d793a8fbdd6906b8ac5333195 dejagnu.texi +3df1cbca885e751e22d3ebd1ac64dc3c dejagnu-1.5.tar.gz