summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Jamroot.jam16
-rw-r--r--p2pvr/daemon/unittests/testMaint.cpp36
-rw-r--r--slice.jam11
3 files changed, 42 insertions, 21 deletions
diff --git a/Jamroot.jam b/Jamroot.jam
index a0b4d73..cc16698 100644
--- a/Jamroot.jam
+++ b/Jamroot.jam
@@ -9,7 +9,7 @@ variant coverage : debug ;
project
: requirements
<variant>release:<cflags>"-std=c++1y"
- <variant>release:<linkflags>"-Wl,-z,defs,--warn-once"
+ <variant>release:<linkflags>"-Wl,-z,defs,--warn-once,--gc-sections"
<variant>debug:<cflags>"-W -Wall -Werror -Wwrite-strings -std=c++1y"
<variant>debug:<linkflags>"-Wl,-z,defs,--warn-once"
<variant>coverage:<cflags>"-W -Wall -Werror -Wwrite-strings -std=c++1y --coverage"
@@ -44,14 +44,14 @@ lib sigc-2.0 ;
alias libxmlpp : : : :
<include>/usr/include/libxml++-2.6
- <include>/usr/lib64/libxml++-2.6/include
+ <include>/usr/lib/libxml++-2.6/include
<include>/usr/include/libxml2
<include>/usr/include/glibmm-2.4
- <include>/usr/lib64/glibmm-2.4/include
+ <include>/usr/lib/glibmm-2.4/include
<include>/usr/include/glib-2.0
- <include>/usr/lib64/glib-2.0/include
+ <include>/usr/lib/glib-2.0/include
<include>/usr/include/sigc++-2.0
- <include>/usr/lib64/sigc++-2.0/include
+ <include>/usr/lib/sigc++-2.0/include
<library>xml++-2.6
<library>xml2
<library>glibmm-2.4
@@ -62,11 +62,11 @@ alias libxmlpp : : : :
alias glibmm : : : :
<include>/usr/include/glibmm-2.4
- <include>/usr/lib64/glibmm-2.4/include
+ <include>/usr/lib/glibmm-2.4/include
<include>/usr/include/glib-2.0
- <include>/usr/lib64/glib-2.0/include
+ <include>/usr/lib/glib-2.0/include
<include>/usr/include/sigc++-2.0
- <include>/usr/lib64/sigc++-2.0/include
+ <include>/usr/lib/sigc++-2.0/include
<library>glibmm-2.4
<library>gobject-2.0
<library>glib-2.0
diff --git a/p2pvr/daemon/unittests/testMaint.cpp b/p2pvr/daemon/unittests/testMaint.cpp
index a794e5e..ec04649 100644
--- a/p2pvr/daemon/unittests/testMaint.cpp
+++ b/p2pvr/daemon/unittests/testMaint.cpp
@@ -223,15 +223,25 @@ BOOST_AUTO_TEST_CASE( update_events )
BOOST_REQUIRE_THROW(s->GetEvent(15856, 3591), P2PVR::NotFound);
BOOST_CHECKPOINT("Fake some recorded stuff");
+ auto keyEvent1 = s->GetEvent(25664, 55689);
+ auto keyEvent2 = s->GetEvent(24256, 1014);
db->execute("INSERT INTO schedules(repeats) VALUES(false)");
- db->execute("INSERT INTO recorded(scheduleId, eventUid) VALUES(1, 3)");
- db->execute("INSERT INTO recordings(storageAddress, guid, scheduleId, eventUid) VALUES('', '', 1, 8)");
- auto keyEvents = s->GetEvents({3, 8});
- BOOST_REQUIRE_EQUAL(keyEvents.size(), 2);
- BOOST_REQUIRE(keyEvents[0]->Current);
- BOOST_REQUIRE_EQUAL(keyEvents[0]->StartTime, Common::DateTime({2014, 12, 18, 21, 0}));
- BOOST_REQUIRE(keyEvents[1]->Current);
- BOOST_REQUIRE_EQUAL(keyEvents[1]->StartTime, Common::DateTime({2014, 12, 17, 5, 30}));
+ auto irecorded = boost::shared_ptr<DB::ModifyCommand>(
+ db->newModifyCommand("INSERT INTO recorded(scheduleId, eventUid) VALUES(?, ?)"));
+ irecorded->bindParamI(0, 1);
+ irecorded->bindParamI(1, keyEvent1->EventUid);
+ irecorded->execute();
+ auto irecordings = boost::shared_ptr<DB::ModifyCommand>(
+ db->newModifyCommand("INSERT INTO recordings(storageAddress, guid, scheduleId, eventUid) VALUES('', '', ?, ?)"));
+ irecordings->bindParamI(0, 1);
+ irecordings->bindParamI(1, keyEvent2->EventUid);
+ irecordings->execute();
+ BOOST_REQUIRE(keyEvent1);
+ BOOST_REQUIRE(keyEvent2);
+ BOOST_REQUIRE(keyEvent1->Current);
+ BOOST_REQUIRE_EQUAL(keyEvent1->StartTime, Common::DateTime({2014, 12, 18, 21, 0}));
+ BOOST_REQUIRE(keyEvent2->Current);
+ BOOST_REQUIRE_EQUAL(keyEvent2->StartTime, Common::DateTime({2014, 12, 17, 5, 30}));
BOOST_CHECKPOINT("Write second events");
MockTuner::SetEventsSet(1);
@@ -245,14 +255,16 @@ BOOST_AUTO_TEST_CASE( update_events )
// Some datetime range overlap, but most are gone
BOOST_REQUIRE_EQUAL(dayOneEventsOnDayTwo.size(), 373);
BOOST_REQUIRE_EQUAL(std::count_if(dayOneEventsOnDayTwo.begin(), dayOneEventsOnDayTwo.end(),
- [](const P2PVR::EventPtr & e) { return e->EventUid == 3 || e->EventUid == 8; }), 0);
- auto keyEventsOnDayTwo = s->GetEvents({3, 8});
+ [](const P2PVR::EventPtr & e) {
+ return (e->ServiceId == 25664 && e->EventId == 55689)
+ || (e->ServiceId == 24256 && e->EventId == 1014); }), 0);
+ auto keyEventsOnDayTwo = s->GetEvents({keyEvent1->EventUid, keyEvent2->EventUid});
BOOST_REQUIRE_EQUAL(keyEventsOnDayTwo.size(), 2);
BOOST_REQUIRE(!keyEventsOnDayTwo[0]->Current);
BOOST_REQUIRE(!keyEventsOnDayTwo[1]->Current);
- BOOST_REQUIRE_EQUAL(keyEvents[0]->Title, keyEventsOnDayTwo[0]->Title);
- BOOST_REQUIRE_EQUAL(keyEvents[1]->Title, keyEventsOnDayTwo[1]->Title);
+ BOOST_REQUIRE_EQUAL(keyEvent1->Title, keyEventsOnDayTwo[0]->Title);
+ BOOST_REQUIRE_EQUAL(keyEvent2->Title, keyEventsOnDayTwo[1]->Title);
}
BOOST_AUTO_TEST_CASE( test_titleFiltering )
diff --git a/slice.jam b/slice.jam
index 5534092..bc038c1 100644
--- a/slice.jam
+++ b/slice.jam
@@ -7,7 +7,7 @@ import toolset ;
type.register SLICE : ice ;
-feature slicer : no yes ;
+feature slicer : no yes pure ;
class slice-scanner : common-scanner
{
@@ -23,9 +23,11 @@ type.set-scanner SLICE : slice-scanner ;
generators.register-standard slice.slice2cpp : SLICE : CPP H : <slicer>no ;
generators.register-standard slice.slicer : SLICE : CPP H : <slicer>yes ;
+generators.register-standard slice.slicer.pure : SLICE : CPP : <slicer>pure ;
toolset.flags slice.slice2cpp INCLUDES <include> ;
toolset.flags slice.slicer INCLUDES <include> ;
+toolset.flags slice.slicer.pure INCLUDES <include> ;
actions slice.slice2cpp
{
@@ -38,6 +40,13 @@ actions slice.slicer
slicer -I"$(INCLUDES)" $(2) $(1[1])
}
+actions slice.slicer.pure
+{
+ truncate -c -s 0 $(1[1])
+ slicer -I"$(INCLUDES)" $(2) $(1[1])
+}
+
IMPORT $(__name__) : slice.slice2cpp : : slice.slice2cpp ;
IMPORT $(__name__) : slice.slicer : : slice.slicer ;
+IMPORT $(__name__) : slice.slicer.pure : : slice.slicer.pure ;