diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2017-08-11 21:25:42 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2017-08-11 21:25:42 +0100 |
commit | 596bb10e4696da12cec968917b2e440162449456 (patch) | |
tree | bb0bd3e580ad92313655053723b7fb264b44ed14 /p2pvr/daemon | |
parent | Fix comically broken DateTime stream writer (diff) | |
download | p2pvr-596bb10e4696da12cec968917b2e440162449456.tar.bz2 p2pvr-596bb10e4696da12cec968917b2e440162449456.tar.xz p2pvr-596bb10e4696da12cec968917b2e440162449456.zip |
Make mockTuner extend TunerI and override mostly just low level IO
Diffstat (limited to 'p2pvr/daemon')
-rw-r--r-- | p2pvr/daemon/unittests/Jamfile.jam | 2 | ||||
-rw-r--r-- | p2pvr/daemon/unittests/mockDevices.cpp | 6 | ||||
-rw-r--r-- | p2pvr/daemon/unittests/testRecording.cpp | 5 |
3 files changed, 7 insertions, 6 deletions
diff --git a/p2pvr/daemon/unittests/Jamfile.jam b/p2pvr/daemon/unittests/Jamfile.jam index eb4bf2e..2ea4691 100644 --- a/p2pvr/daemon/unittests/Jamfile.jam +++ b/p2pvr/daemon/unittests/Jamfile.jam @@ -8,6 +8,7 @@ lib IceBox ; lib dbppcore : : : : <include>/usr/include/dbpp ; lib dbpp-postgresql : : : : <include>/usr/include/dbpp-postgresql ; lib dryice : : : : <include>/usr/include/icetray ; +lib icetray : : : : <include>/usr/include/icetray ; path-constant me : . ; @@ -33,6 +34,7 @@ lib testCommon : <define>ROOT=\"$(me)\" <library>../..//adhocutil <library>dryice + <library>icetray <library>Ice <library>IceUtil <library>IceBox diff --git a/p2pvr/daemon/unittests/mockDevices.cpp b/p2pvr/daemon/unittests/mockDevices.cpp index 12203b0..5ff2cb9 100644 --- a/p2pvr/daemon/unittests/mockDevices.cpp +++ b/p2pvr/daemon/unittests/mockDevices.cpp @@ -7,13 +7,13 @@ namespace P2PVR { MockDevices::MockDevices(Ice::CommunicatorPtr c) : ic(c) { - devices.push_back("/dev/dvb/dummy"); + devices.push_back("/dev/null"); } TunerPtr - MockDevices::openTuner(const boost::filesystem::path &) const + MockDevices::openTuner(const boost::filesystem::path & path) const { - return new MockTuner(ic); + return new MockTuner(path, ic); } } } diff --git a/p2pvr/daemon/unittests/testRecording.cpp b/p2pvr/daemon/unittests/testRecording.cpp index ae3a3a3..d875130 100644 --- a/p2pvr/daemon/unittests/testRecording.cpp +++ b/p2pvr/daemon/unittests/testRecording.cpp @@ -63,13 +63,12 @@ BOOST_AUTO_TEST_CASE( streamServiceToTarget ) BOOST_TEST_CHECKPOINT("Start"); ss->Start(); - sleep(2); + sleep(8); BOOST_TEST_CHECKPOINT("Stop"); ss->Stop(); - BOOST_TEST_MESSAGE("Received bytes: " << target->bytesReceived); - BOOST_REQUIRE(target->bytesReceived > 150000); + BOOST_REQUIRE_EQUAL(target->bytesReceived, 3111117); } BOOST_AUTO_TEST_SUITE_END(); |