Hello community, here is the log from the commit of package snapper for openSUSE:Factory checked in at 2014-12-16 14:47:36 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/snapper (Old) and /work/SRC/openSUSE:Factory/.snapper.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "snapper" Changes: -------- --- /work/SRC/openSUSE:Factory/snapper/snapper.changes 2014-10-08 22:13:38.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.snapper.new/snapper.changes 2014-12-16 14:46:55.000000000 +0100 @@ -1,0 +2,21 @@ +Fri Dec 12 10:34:37 CET 2014 - aschn...@suse.de + +- improved error messages (bsc#889928 and bsc#903834) + +------------------------------------------------------------------- +Thu Dec 11 17:58:14 CET 2014 - aschn...@suse.de + +- support weekly snapshots in cleanup algorithm (see + gh#openSUSE/snapper#135) + +------------------------------------------------------------------- +Thu Oct 23 12:05:12 CEST 2014 - aschn...@suse.de + +- use boost unit test framework and automake check feature + +------------------------------------------------------------------- +Fri Oct 10 12:15:36 CEST 2014 - aschn...@suse.de + +- improved fadvise usage + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ snapper-0.2.4.tar.bz2 ++++++ ++++ 1866 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.2.4/client/Makefile.am new/snapper-0.2.4/client/Makefile.am --- old/snapper-0.2.4/client/Makefile.am 2014-04-10 12:28:10.000000000 +0200 +++ new/snapper-0.2.4/client/Makefile.am 2014-12-11 18:21:17.000000000 +0100 @@ -4,7 +4,7 @@ SUBDIRS = utils -INCLUDES = -I$(top_srcdir) $(DBUS_CFLAGS) +AM_CPPFLAGS = -I$(top_srcdir) $(DBUS_CFLAGS) bin_PROGRAMS = snapper diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.2.4/client/cleanup.cc new/snapper-0.2.4/client/cleanup.cc --- old/snapper-0.2.4/client/cleanup.cc 2014-03-03 17:32:41.000000000 +0100 +++ new/snapper-0.2.4/client/cleanup.cc 2014-12-11 18:21:17.000000000 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) [2011-2013] Novell, Inc. + * Copyright (c) [2011-2014] Novell, Inc. * * All Rights Reserved. * @@ -24,6 +24,8 @@ #include <snapper/SnapperTmpl.h> +#include "utils/equal-date.h" + #include "commands.h" using namespace std; @@ -189,31 +191,6 @@ bool -equal_year(const struct tm& tmp1, const struct tm& tmp2) -{ - return tmp1.tm_year == tmp2.tm_year; -} - -bool -equal_month(const struct tm& tmp1, const struct tm& tmp2) -{ - return equal_year(tmp1, tmp2) && tmp1.tm_mon == tmp2.tm_mon; -} - -bool -equal_day(const struct tm& tmp1, const struct tm& tmp2) -{ - return equal_month(tmp1, tmp2) && tmp1.tm_mday == tmp2.tm_mday; -} - -bool -equal_hour(const struct tm& tmp1, const struct tm& tmp2) -{ - return equal_day(tmp1, tmp2) && tmp1.tm_hour == tmp2.tm_hour; -} - - -bool is_first_yearly(list<XSnapshots::const_iterator>::const_iterator first, list<XSnapshots::const_iterator>::const_iterator last, XSnapshots::const_iterator it1) @@ -230,6 +207,14 @@ } bool +is_first_weekly(list<XSnapshots::const_iterator>::const_iterator first, + list<XSnapshots::const_iterator>::const_iterator last, + XSnapshots::const_iterator it1) +{ + return is_first(first, last, it1, equal_week); +} + +bool is_first_daily(list<XSnapshots::const_iterator>::const_iterator first, list<XSnapshots::const_iterator>::const_iterator last, XSnapshots::const_iterator it1) @@ -253,6 +238,7 @@ size_t limit_hourly = 10; size_t limit_daily = 10; size_t limit_monthly = 10; + size_t limit_weekly = 0; size_t limit_yearly = 10; XConfigInfo ci = command_get_xconfig(conn, config_name); @@ -263,6 +249,8 @@ pos->second >> limit_hourly; if ((pos = ci.raw.find("TIMELINE_LIMIT_DAILY")) != ci.raw.end()) pos->second >> limit_daily; + if ((pos = ci.raw.find("TIMELINE_LIMIT_WEEKLY")) != ci.raw.end()) + pos->second >> limit_weekly; if ((pos = ci.raw.find("TIMELINE_LIMIT_MONTHLY")) != ci.raw.end()) pos->second >> limit_monthly; if ((pos = ci.raw.find("TIMELINE_LIMIT_YEARLY")) != ci.raw.end()) @@ -270,6 +258,7 @@ size_t num_hourly = 0; size_t num_daily = 0; + size_t num_weekly = 0; size_t num_monthly = 0; size_t num_yearly = 0; @@ -298,6 +287,11 @@ ++num_daily; keep = true; } + if (num_weekly < limit_weekly && is_first_weekly(it, tmp.end(), *it)) + { + ++num_weekly; + keep = true; + } if (num_monthly < limit_monthly && is_first_monthly(it, tmp.end(), *it)) { ++num_monthly; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.2.4/client/errors.cc new/snapper-0.2.4/client/errors.cc --- old/snapper-0.2.4/client/errors.cc 2014-03-06 17:44:45.000000000 +0100 +++ new/snapper-0.2.4/client/errors.cc 2014-12-12 14:01:22.000000000 +0100 @@ -60,9 +60,6 @@ if (name == "error.snapshot_in_use") return _("Snapshot is in use."); - if (name == "error.unknown_file") - return _("Unknown file."); - if (name == "error.io_error") return _("IO Error."); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.2.4/client/misc.cc new/snapper-0.2.4/client/misc.cc --- old/snapper-0.2.4/client/misc.cc 2014-10-02 15:46:25.000000000 +0200 +++ new/snapper-0.2.4/client/misc.cc 2014-12-12 14:01:22.000000000 +0100 @@ -83,6 +83,13 @@ string::size_type pos = str.find(delim); if (pos == string::npos) { + if (delim == "..") + { + cerr << _("Missing delimiter '..' between snapshot numbers.") << endl + << _("See 'man snapper' for further instructions.") << endl; + exit(EXIT_FAILURE); + } + cerr << _("Invalid snapshots.") << endl; exit(EXIT_FAILURE); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.2.4/client/snapper.cc new/snapper-0.2.4/client/snapper.cc --- old/snapper-0.2.4/client/snapper.cc 2014-10-06 10:44:19.000000000 +0200 +++ new/snapper-0.2.4/client/snapper.cc 2014-12-12 14:01:22.000000000 +0100 @@ -140,10 +140,10 @@ } -list<pair<string, string> > +list<pair<string, string>> enum_configs(DBus::Connection* conn) { - list<pair<string, string> > configs; + list<pair<string, string>> configs; if (no_dbus) { @@ -967,6 +967,13 @@ if (getopts.numArgs() != 1) { cerr << _("Command 'status' needs one argument.") << endl; + + if (getopts.numArgs() == 2) + { + cerr << _("Maybe you forgot the delimiter '..' between the snapshot numbers.") << endl + << _("See 'man snapper' for further instructions.") << endl; + } + exit(EXIT_FAILURE); } @@ -1022,7 +1029,8 @@ GetOpts::parsed_opts opts = getopts.parse("diff", options); - if (getopts.numArgs() < 1) { + if (getopts.numArgs() < 1) + { cerr << _("Command 'diff' needs at least one argument.") << endl; exit(EXIT_FAILURE); } @@ -1455,7 +1463,8 @@ { GetOpts::parsed_opts opts = getopts.parse("xadiff", GetOpts::no_options); - if (getopts.numArgs() < 1) { + if (getopts.numArgs() < 1) + { cerr << _("Command 'xadiff' needs at least one argument.") << endl; exit(EXIT_FAILURE); } @@ -1466,9 +1475,11 @@ MyFiles& files = comparison.files; if (getopts.numArgs() == 0) - for (Files::const_iterator it1 = files.begin(); it1 != files.end(); ++it1) + { + for (Files::const_iterator it1 = files.begin(); it1 != files.end(); ++it1) if (it1->getPreToPostStatus() & XATTRS) print_xa_diff(it1->getAbsolutePath(LOC_PRE), it1->getAbsolutePath(LOC_POST)); + } else { while (getopts.numArgs() > 0) @@ -1734,6 +1745,13 @@ } catch (const DBus::ErrorException& e) { + if (strcmp(e.name(), "error.unknown_config") == 0 && config_name == "root") + { + cerr << _("The config 'root' does not exist. Likely snapper is not configured.") << endl + << _("See 'man snapper' for further instructions.") << endl; + exit(EXIT_FAILURE); + } + cerr << error_description(e) << endl; exit(EXIT_FAILURE); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.2.4/client/utils/Makefile.am new/snapper-0.2.4/client/utils/Makefile.am --- old/snapper-0.2.4/client/utils/Makefile.am 2014-03-06 17:44:45.000000000 +0100 +++ new/snapper-0.2.4/client/utils/Makefile.am 2014-12-11 18:21:17.000000000 +0100 @@ -2,7 +2,7 @@ # Makefile.am for snapper/client/utils # -INCLUDES = -I$(top_srcdir) +AM_CPPFLAGS = -I$(top_srcdir) noinst_LTLIBRARIES = libutils.la @@ -10,6 +10,7 @@ Table.cc Table.h \ text.cc text.h \ console.cc console.h \ + equal-date.cc equal-date.h \ GetOpts.cc GetOpts.h libutils_la_LIBADD = ../../snapper/libsnapper.la diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.2.4/client/utils/equal-date.cc new/snapper-0.2.4/client/utils/equal-date.cc --- old/snapper-0.2.4/client/utils/equal-date.cc 1970-01-01 01:00:00.000000000 +0100 +++ new/snapper-0.2.4/client/utils/equal-date.cc 2014-12-11 18:21:17.000000000 +0100 @@ -0,0 +1,83 @@ +/* + * Copyright (c) [2011-2014] Novell, Inc. + * + * All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of version 2 of the GNU General Public License as published + * by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, contact Novell, Inc. + * + * To contact Novell about this file by physical or electronic mail, you may + * find current contact information at www.novell.com. + */ + + +#include <time.h> + +#include "equal-date.h" + + +int +yday_of_weeks_monday(const struct tm& tmp) +{ + return tmp.tm_yday - (tmp.tm_wday != 0 ? tmp.tm_wday : 7); +} + + +int +days_in_year(const struct tm& tmp) +{ + return __isleap(tmp.tm_year) ? 366 : 365; +} + + +bool +equal_year(const struct tm& tmp1, const struct tm& tmp2) +{ + return tmp1.tm_year == tmp2.tm_year; +} + + +bool +equal_month(const struct tm& tmp1, const struct tm& tmp2) +{ + return equal_year(tmp1, tmp2) && tmp1.tm_mon == tmp2.tm_mon; +} + + +bool +equal_week(const struct tm& tmp1, const struct tm& tmp2) +{ + if (tmp1.tm_year == tmp2.tm_year) + return yday_of_weeks_monday(tmp1) == yday_of_weeks_monday(tmp2); + + if (tmp1.tm_year + 1 == tmp2.tm_year) + return yday_of_weeks_monday(tmp1) == yday_of_weeks_monday(tmp2) + days_in_year(tmp1); + + if (tmp1.tm_year == tmp2.tm_year + 1) + return yday_of_weeks_monday(tmp1) + days_in_year(tmp2) == yday_of_weeks_monday(tmp2); + + return false; +} + + +bool +equal_day(const struct tm& tmp1, const struct tm& tmp2) +{ + return equal_month(tmp1, tmp2) && tmp1.tm_mday == tmp2.tm_mday; +} + + +bool +equal_hour(const struct tm& tmp1, const struct tm& tmp2) +{ + return equal_day(tmp1, tmp2) && tmp1.tm_hour == tmp2.tm_hour; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.2.4/client/utils/equal-date.h new/snapper-0.2.4/client/utils/equal-date.h --- old/snapper-0.2.4/client/utils/equal-date.h 1970-01-01 01:00:00.000000000 +0100 +++ new/snapper-0.2.4/client/utils/equal-date.h 2014-12-11 18:21:17.000000000 +0100 @@ -0,0 +1,37 @@ +/* + * Copyright (c) [2011-2014] Novell, Inc. + * + * All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of version 2 of the GNU General Public License as published + * by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, contact Novell, Inc. + * + * To contact Novell about this file by physical or electronic mail, you may + * find current contact information at www.novell.com. + */ + + +bool +equal_year(const struct tm& tmp1, const struct tm& tmp2); + +bool +equal_month(const struct tm& tmp1, const struct tm& tmp2); + +bool +equal_week(const struct tm& tmp1, const struct tm& tmp2); + +bool +equal_day(const struct tm& tmp1, const struct tm& tmp2); + +bool +equal_hour(const struct tm& tmp1, const struct tm& tmp2); + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.2.4/data/default-config new/snapper-0.2.4/data/default-config --- old/snapper-0.2.4/data/default-config 2014-01-29 16:48:30.000000000 +0100 +++ new/snapper-0.2.4/data/default-config 2014-12-11 18:21:17.000000000 +0100 @@ -39,6 +39,7 @@ TIMELINE_MIN_AGE="1800" TIMELINE_LIMIT_HOURLY="10" TIMELINE_LIMIT_DAILY="10" +TIMELINE_LIMIT_WEEKLY="0" TIMELINE_LIMIT_MONTHLY="10" TIMELINE_LIMIT_YEARLY="10" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.2.4/dbus/Makefile.am new/snapper-0.2.4/dbus/Makefile.am --- old/snapper-0.2.4/dbus/Makefile.am 2014-01-29 16:48:30.000000000 +0100 +++ new/snapper-0.2.4/dbus/Makefile.am 2014-12-11 18:21:17.000000000 +0100 @@ -2,7 +2,7 @@ # Makefile.am for snapper/dbus # -INCLUDES = -I$(top_srcdir) $(DBUS_CFLAGS) +AM_CPPFLAGS = -I$(top_srcdir) $(DBUS_CFLAGS) noinst_LTLIBRARIES = libdbus.la diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.2.4/doc/snapper-configs.xml.in new/snapper-0.2.4/doc/snapper-configs.xml.in --- old/snapper-0.2.4/doc/snapper-configs.xml.in 2014-05-20 17:12:42.000000000 +0200 +++ new/snapper-0.2.4/doc/snapper-configs.xml.in 2014-12-12 14:01:22.000000000 +0100 @@ -188,6 +188,17 @@ </varlistentry> <varlistentry> + <term><option>TIMELINE_LIMIT_WEEKLY=<replaceable>number</replaceable></option></term> + <listitem> + <para>Defines how many weekly snapshots the timeline cleanup + algorithm should keep. A weekly snapshot is the first snapshot in a week. The + youngest weekly snapshots will be kept. In compliance with ISO 8601 + weeks start on Monday.</para> + <para>Default value is "0".</para> + </listitem> + </varlistentry> + + <varlistentry> <term><option>TIMELINE_LIMIT_MONTHLY=<replaceable>number</replaceable></option></term> <listitem> <para>Defines how many monthly snapshots the timeline cleanup diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.2.4/doc/snapper.xml.in new/snapper-0.2.4/doc/snapper.xml.in --- old/snapper-0.2.4/doc/snapper.xml.in 2014-10-06 10:44:19.000000000 +0200 +++ new/snapper-0.2.4/doc/snapper.xml.in 2014-12-11 18:21:17.000000000 +0100 @@ -124,7 +124,7 @@ <glossterm>timeline</glossterm> <glossdef> <para>Deletes old snapshots but keeps a number of hourly, daily, - monthly and yearly snapshots.</para> + weekly, monthly and yearly snapshots.</para> </glossdef> </glossentry> <glossentry> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.2.4/examples/c/Makefile.am new/snapper-0.2.4/examples/c/Makefile.am --- old/snapper-0.2.4/examples/c/Makefile.am 2014-01-29 16:48:30.000000000 +0100 +++ new/snapper-0.2.4/examples/c/Makefile.am 2014-12-11 18:21:17.000000000 +0100 @@ -2,7 +2,7 @@ # Makefile.am for snapper/examples/c # -INCLUDES = -I$(top_srcdir) $(DBUS_CFLAGS) +AM_CPPFLAGS = -I$(top_srcdir) $(DBUS_CFLAGS) noinst_PROGRAMS = csnap diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.2.4/examples/c++-lib/Makefile.am new/snapper-0.2.4/examples/c++-lib/Makefile.am --- old/snapper-0.2.4/examples/c++-lib/Makefile.am 2014-01-29 16:48:30.000000000 +0100 +++ new/snapper-0.2.4/examples/c++-lib/Makefile.am 2014-12-11 18:21:17.000000000 +0100 @@ -2,7 +2,7 @@ # Makefile.am for snapper/examples/c++-lib # -INCLUDES = -I$(top_srcdir) +AM_CPPFLAGS = -I$(top_srcdir) LDADD = ../../snapper/libsnapper.la diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.2.4/pam/Makefile.am new/snapper-0.2.4/pam/Makefile.am --- old/snapper-0.2.4/pam/Makefile.am 2014-01-29 16:48:30.000000000 +0100 +++ new/snapper-0.2.4/pam/Makefile.am 2014-12-11 18:21:17.000000000 +0100 @@ -6,7 +6,7 @@ AM_CFLAGS = -D_GNU_SOURCE -Wwrite-strings -INCLUDES = -I$(top_srcdir) $(DBUS_CFLAGS) +AM_CPPFLAGS = -I$(top_srcdir) $(DBUS_CFLAGS) securelibdir = $(shell echo /`basename $(libdir)`/security) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.2.4/server/Client.cc new/snapper-0.2.4/server/Client.cc --- old/snapper-0.2.4/server/Client.cc 2014-09-12 11:53:52.000000000 +0200 +++ new/snapper-0.2.4/server/Client.cc 2014-12-12 14:01:22.000000000 +0100 @@ -545,13 +545,6 @@ } -struct UnknownFile : public std::exception -{ - explicit UnknownFile() throw() {} - virtual const char* what() const throw() { return "unknown config"; } -}; - - void Client::list_configs(DBus::Connection& conn, DBus::Message& msg) { @@ -1504,11 +1497,6 @@ DBus::MessageError reply(msg, "error.delete_snapshot_failed", DBUS_ERROR_FAILED); conn.send(reply); } - catch (const UnknownFile& e) - { - DBus::MessageError reply(msg, "error.unknown_file", DBUS_ERROR_FAILED); - conn.send(reply); - } catch (const InvalidConfigdataException& e) { DBus::MessageError reply(msg, "error.invalid_configdata", DBUS_ERROR_FAILED); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.2.4/server/Makefile.am new/snapper-0.2.4/server/Makefile.am --- old/snapper-0.2.4/server/Makefile.am 2014-01-29 16:48:30.000000000 +0100 +++ new/snapper-0.2.4/server/Makefile.am 2014-12-11 18:21:17.000000000 +0100 @@ -2,8 +2,7 @@ # Makefile.am for snapper/server # -INCLUDES = -I$(top_srcdir) $(DBUS_CFLAGS) - +AM_CPPFLAGS = -I$(top_srcdir) $(DBUS_CFLAGS) sbin_PROGRAMS = snapperd diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.2.4/snapper/AppUtil.cc new/snapper-0.2.4/snapper/AppUtil.cc --- old/snapper-0.2.4/snapper/AppUtil.cc 2014-09-23 17:52:24.000000000 +0200 +++ new/snapper-0.2.4/snapper/AppUtil.cc 2014-10-10 12:40:06.000000000 +0200 @@ -91,6 +91,11 @@ bool copyfile(int src_fd, int dest_fd) { + posix_fadvise(src_fd, 0, 0, POSIX_FADV_SEQUENTIAL); + + // TODO: maybe use POSIX_FADV_DONTNEED on dest_fd, but this could + // trigger a kernel bug (see bsc #888259) + while (true) { // use small value for count to make function better interruptible diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.2.4/snapper/Compare.cc new/snapper-0.2.4/snapper/Compare.cc --- old/snapper-0.2.4/snapper/Compare.cc 2014-06-04 12:23:25.000000000 +0200 +++ new/snapper-0.2.4/snapper/Compare.cc 2014-10-10 12:40:06.000000000 +0200 @@ -77,8 +77,8 @@ return false; } - posix_fadvise(fd1, 0, stat1.st_size, POSIX_FADV_SEQUENTIAL); - posix_fadvise(fd2, 0, stat2.st_size, POSIX_FADV_SEQUENTIAL); + posix_fadvise(fd1, 0, 0, POSIX_FADV_SEQUENTIAL); + posix_fadvise(fd2, 0, 0, POSIX_FADV_SEQUENTIAL); static_assert(sizeof(off_t) >= 8, "off_t is too small"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.2.4/snapper/Makefile.am new/snapper-0.2.4/snapper/Makefile.am --- old/snapper-0.2.4/snapper/Makefile.am 2014-04-02 14:27:32.000000000 +0200 +++ new/snapper-0.2.4/snapper/Makefile.am 2014-12-11 18:21:17.000000000 +0100 @@ -4,7 +4,7 @@ AM_CXXFLAGS = -D_FILE_OFFSET_BITS=64 -INCLUDES = -I/usr/include/libxml2 +AM_CPPFLAGS = -I/usr/include/libxml2 lib_LTLIBRARIES = libsnapper.la diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.2.4/test-driver new/snapper-0.2.4/test-driver --- old/snapper-0.2.4/test-driver 1970-01-01 01:00:00.000000000 +0100 +++ new/snapper-0.2.4/test-driver 2014-12-12 14:04:10.000000000 +0100 @@ -0,0 +1,127 @@ +#! /bin/sh +# test-driver - basic testsuite driver script. + +scriptversion=2012-06-27.10; # UTC + +# Copyright (C) 2011-2013 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to <bug-autom...@gnu.org> or send patches to +# <automake-patc...@gnu.org>. + +# Make unconditional expansion of undefined variables an error. This +# helps a lot in preventing typo-related bugs. +set -u + +usage_error () +{ + echo "$0: $*" >&2 + print_usage >&2 + exit 2 +} + +print_usage () +{ + cat <<END +Usage: + test-driver --test-name=NAME --log-file=PATH --trs-file=PATH + [--expect-failure={yes|no}] [--color-tests={yes|no}] + [--enable-hard-errors={yes|no}] [--] TEST-SCRIPT +The '--test-name', '--log-file' and '--trs-file' options are mandatory. +END +} + +# TODO: better error handling in option parsing (in particular, ensure +# TODO: $log_file, $trs_file and $test_name are defined). +test_name= # Used for reporting. +log_file= # Where to save the output of the test script. +trs_file= # Where to save the metadata of the test run. +expect_failure=no +color_tests=no +enable_hard_errors=yes +while test $# -gt 0; do + case $1 in + --help) print_usage; exit $?;; + --version) echo "test-driver $scriptversion"; exit $?;; + --test-name) test_name=$2; shift;; + --log-file) log_file=$2; shift;; + --trs-file) trs_file=$2; shift;; + --color-tests) color_tests=$2; shift;; + --expect-failure) expect_failure=$2; shift;; + --enable-hard-errors) enable_hard_errors=$2; shift;; + --) shift; break;; + -*) usage_error "invalid option: '$1'";; + esac + shift +done + +if test $color_tests = yes; then + # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'. + red='[0;31m' # Red. + grn='[0;32m' # Green. + lgn='[1;32m' # Light green. + blu='[1;34m' # Blue. + mgn='[0;35m' # Magenta. + std='[m' # No color. +else + red= grn= lgn= blu= mgn= std= +fi + +do_exit='rm -f $log_file $trs_file; (exit $st); exit $st' +trap "st=129; $do_exit" 1 +trap "st=130; $do_exit" 2 +trap "st=141; $do_exit" 13 +trap "st=143; $do_exit" 15 + +# Test script is run here. +"$@" >$log_file 2>&1 +estatus=$? +if test $enable_hard_errors = no && test $estatus -eq 99; then + estatus=1 +fi + +case $estatus:$expect_failure in + 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; + 0:*) col=$grn res=PASS recheck=no gcopy=no;; + 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; + 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; + *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; + *:*) col=$red res=FAIL recheck=yes gcopy=yes;; +esac + +# Report outcome to console. +echo "${col}${res}${std}: $test_name" + +# Register the test result, and other relevant metadata. +echo ":test-result: $res" > $trs_file +echo ":global-test-result: $res" >> $trs_file +echo ":recheck: $recheck" >> $trs_file +echo ":copy-in-global-log: $gcopy" >> $trs_file + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.2.4/testsuite/Makefile.am new/snapper-0.2.4/testsuite/Makefile.am --- old/snapper-0.2.4/testsuite/Makefile.am 2014-01-29 16:48:30.000000000 +0100 +++ new/snapper-0.2.4/testsuite/Makefile.am 2014-12-11 18:21:17.000000000 +0100 @@ -2,23 +2,17 @@ # Makefile.am for snapper/testsuite # -CXXFLAGS += -std=gnu++0x +AM_CPPFLAGS = -I$(top_srcdir) -INCLUDES = -I$(top_srcdir) +LDADD = ../snapper/libsnapper.la -lboost_unit_test_framework -LDADD = ../snapper/libsnapper.la +check_PROGRAMS = sysconfig-get1.test dirname1.test basename1.test equal-date.test -noinst_SCRIPTS = run-all +TESTS = $(check_PROGRAMS) -noinst_PROGRAMS = sysconfig-get1 dirname1 basename1 - -sysconfig_get1_SOURCES = sysconfig-get1.cc common.h - -dirname1_SOURCES = dirname1.cc common.h -basename1_SOURCES = basename1.cc common.h +AM_DEFAULT_SOURCE_EXT = .cc EXTRA_DIST = $(noinst_SCRIPTS) sysconfig-get1.txt -check: - ./run-all +equal_date_test_LDADD = -lboost_unit_test_framework ../client/utils/libutils.la diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.2.4/testsuite/basename1.cc new/snapper-0.2.4/testsuite/basename1.cc --- old/snapper-0.2.4/testsuite/basename1.cc 2014-01-29 16:48:30.000000000 +0100 +++ new/snapper-0.2.4/testsuite/basename1.cc 2014-10-23 12:20:40.000000000 +0200 @@ -1,21 +1,23 @@ -#include "common.h" +#define BOOST_TEST_DYN_LINK +#define BOOST_TEST_MODULE basename1 + +#include <boost/test/unit_test.hpp> #include <snapper/AppUtil.h> using namespace snapper; -int -main() +BOOST_AUTO_TEST_CASE(basename1) { - check_equal(basename("/hello/world"), string("world")); - check_equal(basename("hello/world"), string("world")); - check_equal(basename("/hello"), string("hello")); - check_equal(basename("hello"), string("hello")); - check_equal(basename("/"), string("")); - check_equal(basename(""), string("")); - check_equal(basename("."), string(".")); - check_equal(basename(".."), string("..")); - check_equal(basename("../.."), string("..")); + BOOST_CHECK_EQUAL(basename("/hello/world"), "world"); + BOOST_CHECK_EQUAL(basename("hello/world"), "world"); + BOOST_CHECK_EQUAL(basename("/hello"), "hello"); + BOOST_CHECK_EQUAL(basename("hello"), "hello"); + BOOST_CHECK_EQUAL(basename("/"), ""); + BOOST_CHECK_EQUAL(basename(""), ""); + BOOST_CHECK_EQUAL(basename("."), "."); + BOOST_CHECK_EQUAL(basename(".."), ".."); + BOOST_CHECK_EQUAL(basename("../.."), ".."); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.2.4/testsuite/common.h new/snapper-0.2.4/testsuite/common.h --- old/snapper-0.2.4/testsuite/common.h 2014-01-29 16:48:30.000000000 +0100 +++ new/snapper-0.2.4/testsuite/common.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,46 +0,0 @@ - -#include <stdlib.h> - -#include <iostream> - -using namespace std; - - -template <typename Type> void -check_failure(const char* str, Type actual, Type expected, const char* file, - int line, const char* func) -{ - std::cerr << file << ":" << line << ": \"" << func << "\"" << std::endl; - std::cerr << "check \"" << str << "\"" << " failed. expected " << expected - << ", actual " << actual << "." << std::endl; - - exit(EXIT_FAILURE); -} - - -#define check_true(expr) \ - do { \ - bool actual = (expr); \ - if (!actual) \ - check_failure(#expr, actual, true, __FILE__, __LINE__, \ - __PRETTY_FUNCTION__); \ - } while (0) - - -#define check_zero(expr) \ - do { \ - int actual = (expr); \ - if (actual != 0) \ - check_failure(#expr, actual, 0, __FILE__, __LINE__, \ - __PRETTY_FUNCTION__); \ - } while (0) - - -#define check_equal(expr, expected) \ - do { \ - typeof (expected) actual = (expr); \ - if (actual != expected) \ - check_failure(#expr, actual, expected, __FILE__, __LINE__, \ - __PRETTY_FUNCTION__); \ - } while (0) - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.2.4/testsuite/dirname1.cc new/snapper-0.2.4/testsuite/dirname1.cc --- old/snapper-0.2.4/testsuite/dirname1.cc 2014-01-29 16:48:30.000000000 +0100 +++ new/snapper-0.2.4/testsuite/dirname1.cc 2014-10-23 12:20:40.000000000 +0200 @@ -1,21 +1,23 @@ -#include "common.h" +#define BOOST_TEST_DYN_LINK +#define BOOST_TEST_MODULE dirname1 + +#include <boost/test/unit_test.hpp> #include <snapper/AppUtil.h> using namespace snapper; -int -main() +BOOST_AUTO_TEST_CASE(dirname1) { - check_equal(dirname("/hello/world"), string("/hello")); - check_equal(dirname("hello/world"), string("hello")); - check_equal(dirname("/hello"), string("/")); - check_equal(dirname("hello"), string(".")); - check_equal(dirname("/"), string("/")); - check_equal(dirname(""), string(".")); - check_equal(dirname("."), string(".")); - check_equal(dirname(".."), string(".")); - check_equal(dirname("../.."), string("..")); + BOOST_CHECK_EQUAL(dirname("/hello/world"), "/hello"); + BOOST_CHECK_EQUAL(dirname("hello/world"), "hello"); + BOOST_CHECK_EQUAL(dirname("/hello"), "/"); + BOOST_CHECK_EQUAL(dirname("hello"), "."); + BOOST_CHECK_EQUAL(dirname("/"), "/"); + BOOST_CHECK_EQUAL(dirname(""), "."); + BOOST_CHECK_EQUAL(dirname("."), "."); + BOOST_CHECK_EQUAL(dirname(".."), "."); + BOOST_CHECK_EQUAL(dirname("../.."), ".."); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.2.4/testsuite/equal-date.cc new/snapper-0.2.4/testsuite/equal-date.cc --- old/snapper-0.2.4/testsuite/equal-date.cc 1970-01-01 01:00:00.000000000 +0100 +++ new/snapper-0.2.4/testsuite/equal-date.cc 2014-12-11 18:21:17.000000000 +0100 @@ -0,0 +1,70 @@ + +#define BOOST_TEST_DYN_LINK +#define BOOST_TEST_MODULE snapper + +#include <boost/test/unit_test.hpp> + +#include "../client/utils/equal-date.h" + + +bool +equal_week(const char* s1, const char* s2) +{ + struct tm tmp1; + memset(&tmp1, 0, sizeof(tmp1)); + strptime(s1, "%Y-%m-%d", &tmp1); + + struct tm tmp2; + memset(&tmp2, 0, sizeof(tmp2)); + strptime(s2, "%Y-%m-%d", &tmp2); + + return equal_week(tmp1, tmp2); +} + + +BOOST_AUTO_TEST_CASE(test1) +{ + // 2012 is a leap year + BOOST_CHECK(equal_week("2011-12-31", "2012-01-01")); + BOOST_CHECK(equal_week("2012-01-01", "2011-12-31")); +} + + +BOOST_AUTO_TEST_CASE(test2) +{ + // 2012 is a leap year + BOOST_CHECK(equal_week("2012-12-31", "2013-01-01")); + BOOST_CHECK(equal_week("2013-01-01", "2012-12-31")); +} + + +BOOST_AUTO_TEST_CASE(test3) +{ + // Saturday and Sunday + BOOST_CHECK(equal_week("2014-01-04", "2014-01-05")); + BOOST_CHECK(equal_week("2014-01-05", "2014-01-04")); + + // Sunday and Monday + BOOST_CHECK(!equal_week("2014-01-05", "2014-01-06")); + BOOST_CHECK(!equal_week("2014-01-06", "2014-01-05")); + + // Monday and Tuesday + BOOST_CHECK(equal_week("2014-01-06", "2014-01-07")); + BOOST_CHECK(equal_week("2014-01-07", "2014-01-06")); +} + + +BOOST_AUTO_TEST_CASE(test4) +{ + // 2014-12-31 is a Wednesday, 2015-01-01 is a Thursday + BOOST_CHECK(equal_week("2014-12-31", "2015-01-01")); + BOOST_CHECK(equal_week("2015-01-01", "2014-12-31")); +} + + +BOOST_AUTO_TEST_CASE(test5) +{ + // 2017-12-31 is a Sunday, 2018-01-01 is a Monday + BOOST_CHECK(!equal_week("2017-12-31", "2018-01-01")); + BOOST_CHECK(!equal_week("2018-01-01", "2017-12-31")); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.2.4/testsuite/run-all new/snapper-0.2.4/testsuite/run-all --- old/snapper-0.2.4/testsuite/run-all 2014-01-29 16:48:30.000000000 +0100 +++ new/snapper-0.2.4/testsuite/run-all 1970-01-01 01:00:00.000000000 +0100 @@ -1,25 +0,0 @@ -#!/bin/bash - - -function run() -{ - cmd=$1 - - echo - echo "*** running $cmd ***" - echo - - ./$cmd - - if [ $? != 0 ] ; then - echo "failed" - exit 1 - fi -} - - -run dirname1 -run basename1 - -run sysconfig-get1 - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.2.4/testsuite/sysconfig-get1.cc new/snapper-0.2.4/testsuite/sysconfig-get1.cc --- old/snapper-0.2.4/testsuite/sysconfig-get1.cc 2014-01-29 16:48:30.000000000 +0100 +++ new/snapper-0.2.4/testsuite/sysconfig-get1.cc 2014-10-23 12:20:40.000000000 +0200 @@ -1,46 +1,45 @@ -#include <boost/algorithm/string.hpp> +#define BOOST_TEST_DYN_LINK +#define BOOST_TEST_MODULE sysconfig_get1 -#include "common.h" +#include <boost/test/unit_test.hpp> +#include <boost/algorithm/string.hpp> #include <snapper/AsciiFile.h> using namespace snapper; -int -main() +BOOST_AUTO_TEST_CASE(sysconfig_get1) { SysconfigFile s("sysconfig-get1.txt"); string tmp_string; - check_true(s.getValue("S1", tmp_string)); - check_equal(tmp_string, string("hello")); + BOOST_CHECK(s.getValue("S1", tmp_string)); + BOOST_CHECK_EQUAL(tmp_string, "hello"); bool tmp_bool; - check_true(s.getValue("B1", tmp_bool)); - check_equal(tmp_bool, true); + BOOST_CHECK(s.getValue("B1", tmp_bool)); + BOOST_CHECK_EQUAL(tmp_bool, true); - check_true(s.getValue("B2", tmp_bool)); - check_equal(tmp_bool, false); + BOOST_CHECK(s.getValue("B2", tmp_bool)); + BOOST_CHECK_EQUAL(tmp_bool, false); vector<string> tmp_vector; - check_true(s.getValue("V1", tmp_vector)); - check_equal(boost::join(tmp_vector, "-"), string("one word")); - - check_true(s.getValue("V2", tmp_vector)); - check_equal(boost::join(tmp_vector, "-"), string("two-words")); + BOOST_CHECK(s.getValue("V1", tmp_vector)); + BOOST_CHECK_EQUAL(boost::join(tmp_vector, "-"), "one word"); - check_true(s.getValue("V3", tmp_vector)); - check_equal(boost::join(tmp_vector, "-"), string("now-three-words")); + BOOST_CHECK(s.getValue("V2", tmp_vector)); + BOOST_CHECK_EQUAL(boost::join(tmp_vector, "-"), "two-words"); - check_true(s.getValue("V4", tmp_vector)); - check_equal(boost::join(tmp_vector, "-"), string("c:\\io.sys")); + BOOST_CHECK(s.getValue("V3", tmp_vector)); + BOOST_CHECK_EQUAL(boost::join(tmp_vector, "-"), "now-three-words"); - check_true(!s.getValue("V5", tmp_vector)); + BOOST_CHECK(s.getValue("V4", tmp_vector)); + BOOST_CHECK_EQUAL(boost::join(tmp_vector, "-"), "c:\\io.sys"); - exit(EXIT_SUCCESS); + BOOST_CHECK(!s.getValue("V5", tmp_vector)); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.2.4/testsuite-cmp/Makefile.am new/snapper-0.2.4/testsuite-cmp/Makefile.am --- old/snapper-0.2.4/testsuite-cmp/Makefile.am 2014-01-29 16:48:30.000000000 +0100 +++ new/snapper-0.2.4/testsuite-cmp/Makefile.am 2014-12-11 18:21:17.000000000 +0100 @@ -2,7 +2,7 @@ # Makefile.am for snapper/testsuite-cmp # -INCLUDES = -I$(top_srcdir) +AM_CPPFLAGS = -I$(top_srcdir) LDADD = ../snapper/libsnapper.la diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.2.4/testsuite-real/Makefile.am new/snapper-0.2.4/testsuite-real/Makefile.am --- old/snapper-0.2.4/testsuite-real/Makefile.am 2014-02-28 13:36:50.000000000 +0100 +++ new/snapper-0.2.4/testsuite-real/Makefile.am 2014-12-11 18:21:17.000000000 +0100 @@ -4,7 +4,7 @@ CXXFLAGS += -std=gnu++0x -INCLUDES = -I$(top_srcdir) +AM_CPPFLAGS = -I$(top_srcdir) LDADD = ../snapper/libsnapper.la -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org