Release 3-2-4

Marc Wäckerlin 18 years ago
commit 448c682b32
  1. 2
      ChangeLog
  2. 14
      mrw-c++-minimal.spec.in
  3. 8
      mrw-c++.spec.in
  4. 17
      mrw/exec_test.cpp
  5. 4
      mrw/makefile.am

@ -1,3 +1,5 @@
* Tue Aug 16 2007 Marc Waeckerlin - mrw-c++-3.2.4 (mrw)
- Changed specfiles to eilminate build problems
* Sun Aug 5 2007 Marc Waeckerlin - mrw-c++-3.2.3 (mrw)
- Spec-file changed for SuSEBuild.org
* Sun Aug 5 2007 Marc Waeckerlin - mrw-c++-3.2.2 (mrw)

@ -39,14 +39,22 @@ http://marc.waeckerlin.org/videorekorder/index.html
%prep
%setup -q
CXXFLAGS="-O3" ./configure --prefix=$RPM_BUILD_ROOT/usr --datadir=$RPM_BUILD_ROOT/usr/share/doc/packages --disable-threads --disable-autofntrace --disable-log4cxx --disable-ltdl --disable-stacktrace
CXXFLAGS="-O3" ./configure --prefix=/usr \
--datadir=/usr/share/doc/packages \
--disable-threads --disable-autofntrace \
--disable-log4cxx --disable-ltdl --disable-stacktrace \
--disable-doxygen --disable-dot \
%ifarch x86_64
--libdir=/usr/lib64
%else
--libdir=/usr/lib
%endif
%build
make
%install
make install
find "$RPM_BUILD_ROOT" -name '*.la' | xargs perl -pi -e 's#'"${RPM_BUILD_ROOT//+/\\+}"'##g'
DESTDIR=$RPM_BUILD_ROOT make all install
rm -r $RPM_BUILD_ROOT/usr/include/mrw
rmdir $RPM_BUILD_ROOT/usr/include
rm $RPM_BUILD_ROOT/usr/lib/libmrw-mt*

@ -32,8 +32,9 @@ This package contains only the shared libraries required at runtime.
%prep
%setup -q
CXXFLAGS="-O3" ./configure --prefix=$RPM_BUILD_ROOT/usr \
--datadir=$RPM_BUILD_ROOT/usr/share/doc/packages \
CXXFLAGS="-O3" ./configure --prefix=/usr \
--datadir=/usr/share/doc/packages \
--enable-doxygen \
%ifarch x86_64
--libdir=/usr/lib64
%else
@ -44,8 +45,7 @@ CXXFLAGS="-O3" ./configure --prefix=$RPM_BUILD_ROOT/usr \
make
%install
make install
find "$RPM_BUILD_ROOT" -name '*.la' | xargs perl -pi -e 's#'"${RPM_BUILD_ROOT//+/\\+}"'##g'
DESTDIR=$RPM_BUILD_ROOT make all install
%clean
rm -rf $RPM_BUILD_ROOT

@ -48,27 +48,40 @@
#include <string>
#include <stdlib.h>
#include <iostream>
#ifdef __GNUG__
#define LOG std::clog<<__PRETTY_FUNCTION__<<'@'<<__FILE__<<':'<<__LINE__;
#else
#define LOG std::clog<<__FUNCTION__<<'@'<<__FILE__<<':'<<__LINE__;
#endif
class ExecTest: public CppUnit::TestFixture {
public:
void lsTest() {
LOG;
std::string res = (mrw::Cmd("/bin/ls"), "-l",
std::string(getenv("srcdir"))+"/..").execute();
CPPUNIT_ASSERT(res.find("COPYING")<res.size());
}
void catTest() {
LOG;
std::string res = mrw::Cmd("/bin/cat").execute("This is a test");
CPPUNIT_ASSERT(res=="This is a test");
}
void excTest1() {
LOG;
std::string res = (mrw::Cmd("/bin/false")).execute().result();
}
void excTest2() {
LOG;
std::string res = (mrw::Cmd("/bin/false")).execute("").result();
}
void unexpectedExc() throw(std::bad_exception) {
LOG;
std::string res = (mrw::Cmd("/bin/false")).execute().result();
}
void lsTest2() {
LOG;
std::string res;
mrw::PartialExec exec = (mrw::Cmd("/bin/ls"), "-l",
std::string(getenv("srcdir"))+"/..").start();
@ -76,6 +89,7 @@ public:
CPPUNIT_ASSERT(res.find("COPYING")<res.size());
}
void catTest2() {
LOG;
mrw::PartialExec exec = mrw::Cmd("/bin/cat").start(true);
std::string res = exec.read("This is a test\n").first;
res += exec.read("More to come...\n").first;
@ -84,14 +98,17 @@ public:
CPPUNIT_ASSERT(res=="This is a test\nMore to come...\n");
}
void excTest12() {
LOG;
mrw::PartialExec exec = (mrw::Cmd("/bin/false")).start();
while (!exec.finished()) exec.read();
}
void excTest22() {
LOG;
mrw::PartialExec exec = (mrw::Cmd("/bin/false")).start(true);
while (!exec.finished()) exec.read("xxx");
}
void unexpectedExc2() throw(std::bad_exception) {
LOG;
mrw::PartialExec exec = (mrw::Cmd("/bin/false")).start();
while (!exec.finished()) exec.read();
}

@ -374,7 +374,7 @@ TESTS = $(check_PROGRAMS) $(dist_check_SCRIPTS)
endif
check_PROGRAMS = $(VALGRIND_CHECKS) $(NO_VALGRIND_CHECKS)
.PHONY: doc clean-local distclean-local dist-hool install-data-hook \
.PHONY: doc clean-local distclean-local dist-hook install-data-hook \
uninstall-hook
deps = $(top_srcdir)/COPYING $(top_srcdir)/README $(top_srcdir)/INSTALL $(top_srcdir)/NEWS $(top_srcdir)/ChangeLog
@ -411,6 +411,7 @@ dist-hook:
mkdir -p $(distdir)/doc/html
cp $(top_builddir)/doc/html/* $(distdir)/doc/html/.
if HAVE_DOXYGEN
install-data-hook:
env | grep -i tmp
test -d "$(DESTDIR)$(pkgdatadir)/doc" || \
@ -421,3 +422,4 @@ install-data-hook:
uninstall-hook:
chmod -R u+w "$(DESTDIR)$(pkgdatadir)/doc"
rm -rf "$(DESTDIR)$(pkgdatadir)/doc/html"
endif

Loading…
Cancel
Save