summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--p2pvr/Jamfile.jam3
-rw-r--r--p2pvr/daemon/unittests/Jamfile.jam4
-rw-r--r--p2pvr/daemon/unittests/datasources/data.sql22
-rw-r--r--p2pvr/daemon/unittests/mockDefs.cpp6
-rw-r--r--p2pvr/daemon/unittests/mockDefs.h5
5 files changed, 20 insertions, 20 deletions
diff --git a/p2pvr/Jamfile.jam b/p2pvr/Jamfile.jam
index 9be3180..d380de0 100644
--- a/p2pvr/Jamfile.jam
+++ b/p2pvr/Jamfile.jam
@@ -23,9 +23,10 @@ alias p2xml : glibmm : : :
<linkflags>"-lp2xml"
;
alias p2sql : glibmm : : :
+ <include>/usr/include/dbpp
<include>/usr/include/project2/sql
<include>/usr/include/project2/basics
- <linkflags>"-lp2sql -ldbpp"
+ <linkflags>"-lp2sql -ldbppcore"
;
alias p2streams : glibmm : : :
<include>/usr/include/project2/streams
diff --git a/p2pvr/daemon/unittests/Jamfile.jam b/p2pvr/daemon/unittests/Jamfile.jam
index 2097b7a..86bb906 100644
--- a/p2pvr/daemon/unittests/Jamfile.jam
+++ b/p2pvr/daemon/unittests/Jamfile.jam
@@ -4,7 +4,7 @@ lib boost_system ;
lib boost_filesystem ;
lib IceUtil ;
lib Ice ;
-lib p2sqlmodPQ ;
+lib dbpp-postgresql : : : : <include>/usr/include/dbpp-postgresql ;
path-constant me : . ;
@@ -26,7 +26,7 @@ alias test-data :
lib testCommon :
mockDefs.cpp
:
- <library>p2sqlmodPQ
+ <library>dbpp-postgresql
<library>../..//p2sql
<library>../..//p2common
<library>../..//adhocutil
diff --git a/p2pvr/daemon/unittests/datasources/data.sql b/p2pvr/daemon/unittests/datasources/data.sql
index 3fd9260..5c91ecd 100644
--- a/p2pvr/daemon/unittests/datasources/data.sql
+++ b/p2pvr/daemon/unittests/datasources/data.sql
@@ -15,42 +15,42 @@ SET search_path = public, pg_catalog;
-- Data for Name: networks; Type: TABLE DATA; Schema: public; Owner: p2pvr
--
-COPY networks (networkid, name) FROM '$P2MOCKSCRIPTDIR/networks';
+COPY networks (networkid, name) FROM '$SCRIPTDIR/networks';
--
-- Data for Name: transportstreams; Type: TABLE DATA; Schema: public; Owner: p2pvr
--
-COPY transportstreams (transportstreamid, networkid, originalnetworkid) FROM '$P2MOCKSCRIPTDIR/transportstreams';
+COPY transportstreams (transportstreamid, networkid, originalnetworkid) FROM '$SCRIPTDIR/transportstreams';
--
-- Data for Name: delivery_dvbc; Type: TABLE DATA; Schema: public; Owner: p2pvr
--
-COPY delivery_dvbc (frequency, transportstreamid, fecouter, modulation, symbolrate, fecinner) FROM '$P2MOCKSCRIPTDIR/delivery_dvbc';
+COPY delivery_dvbc (frequency, transportstreamid, fecouter, modulation, symbolrate, fecinner) FROM '$SCRIPTDIR/delivery_dvbc';
--
-- Data for Name: delivery_dvbs; Type: TABLE DATA; Schema: public; Owner: p2pvr
--
-COPY delivery_dvbs (frequency, transportstreamid, orbitalposition, westeastflag, polarization, rolloff, modulationsystem, modulationtype, symbolrate, fecinner) FROM '$P2MOCKSCRIPTDIR/delivery_dvbs';
+COPY delivery_dvbs (frequency, transportstreamid, orbitalposition, westeastflag, polarization, rolloff, modulationsystem, modulationtype, symbolrate, fecinner) FROM '$SCRIPTDIR/delivery_dvbs';
--
-- Data for Name: delivery_dvbt; Type: TABLE DATA; Schema: public; Owner: p2pvr
--
-COPY delivery_dvbt (frequency, transportstreamid, bandwidth, priority, timeslicing, mpefec, constellation, hierarchy, coderatehp, coderatelp, guardinterval, transmissionmode, otherfrequencyflag) FROM '$P2MOCKSCRIPTDIR/delivery_dvbt';
+COPY delivery_dvbt (frequency, transportstreamid, bandwidth, priority, timeslicing, mpefec, constellation, hierarchy, coderatehp, coderatelp, guardinterval, transmissionmode, otherfrequencyflag) FROM '$SCRIPTDIR/delivery_dvbt';
--
-- Data for Name: events; Type: TABLE DATA; Schema: public; Owner: p2pvr
--
-COPY events (serviceid, eventid, title, titlelang, subtitle, description, descriptionlang, videoaspect, videoframerate, videohd, audiochannels, audiolanguage, subtitlelanguage, category, subcategory, usercategory, dvbrating, starttime, stoptime, episode, episodes, year, flags, season, eventuid, current) FROM '$P2MOCKSCRIPTDIR/events';
+COPY events (serviceid, eventid, title, titlelang, subtitle, description, descriptionlang, videoaspect, videoframerate, videohd, audiochannels, audiolanguage, subtitlelanguage, category, subcategory, usercategory, dvbrating, starttime, stoptime, episode, episodes, year, flags, season, eventuid, current) FROM '$SCRIPTDIR/events';
--
@@ -64,28 +64,28 @@ SELECT pg_catalog.setval('events_eventuid_seq', 2612705, true);
-- Data for Name: services; Type: TABLE DATA; Schema: public; Owner: p2pvr
--
-COPY services (serviceid, name, providername, type, defaultauthority, runningstatus, eitschedule, eitpresentfollowing, freecamode, transportstreamid) FROM '$P2MOCKSCRIPTDIR/services';
+COPY services (serviceid, name, providername, type, defaultauthority, runningstatus, eitschedule, eitpresentfollowing, freecamode, transportstreamid) FROM '$SCRIPTDIR/services';
--
-- Data for Name: schedules; Type: TABLE DATA; Schema: public; Owner: p2pvr
--
-COPY schedules (scheduleid, serviceid, eventuid, title, search, priority, early, late, repeats) FROM '$P2MOCKSCRIPTDIR/schedules';
+COPY schedules (scheduleid, serviceid, eventuid, title, search, priority, early, late, repeats) FROM '$SCRIPTDIR/schedules';
--
-- Data for Name: record; Type: TABLE DATA; Schema: public; Owner: p2pvr
--
-COPY record (eventuid, recordstatus, scheduleid) FROM '$P2MOCKSCRIPTDIR/record';
+COPY record (eventuid, recordstatus, scheduleid) FROM '$SCRIPTDIR/record';
--
-- Data for Name: recorded; Type: TABLE DATA; Schema: public; Owner: p2pvr
--
-COPY recorded (recordedid, scheduleid, eventuid) FROM '$P2MOCKSCRIPTDIR/recorded';
+COPY recorded (recordedid, scheduleid, eventuid) FROM '$SCRIPTDIR/recorded';
--
@@ -99,7 +99,7 @@ SELECT pg_catalog.setval('recorded_recordedid_seq', 1, false);
-- Data for Name: recordings; Type: TABLE DATA; Schema: public; Owner: p2pvr
--
-COPY recordings (recordingid, storageaddress, guid, scheduleid, eventuid) FROM '$P2MOCKSCRIPTDIR/recordings';
+COPY recordings (recordingid, storageaddress, guid, scheduleid, eventuid) FROM '$SCRIPTDIR/recordings';
--
diff --git a/p2pvr/daemon/unittests/mockDefs.cpp b/p2pvr/daemon/unittests/mockDefs.cpp
index 76abb80..8c44b9a 100644
--- a/p2pvr/daemon/unittests/mockDefs.cpp
+++ b/p2pvr/daemon/unittests/mockDefs.cpp
@@ -2,20 +2,20 @@
#include <definedDirs.h>
SchemaOnlyMockDatabase::SchemaOnlyMockDatabase() :
- MockPqDatabase("user=postgres dbname=postgres", "postgres", {
+ PQ::Mock("user=postgres dbname=postgres", "postgres", {
rootDir.parent_path().parent_path() / "datasources" / "schema.sql" })
{
}
StandardMockDatabase::StandardMockDatabase() :
- MockPqDatabase("user=postgres dbname=postgres", "postgres", {
+ PQ::Mock("user=postgres dbname=postgres", "postgres", {
rootDir.parent_path().parent_path() / "datasources/schema.sql",
rootDir / "datasources" / "data.sql" })
{
}
StandardMockDatabasePlusOffset::StandardMockDatabasePlusOffset() :
- MockPqDatabase("user=postgres dbname=postgres", "postgres", {
+ PQ::Mock("user=postgres dbname=postgres", "postgres", {
rootDir.parent_path().parent_path() / "datasources" / "schema.sql",
rootDir / "datasources" / "data.sql",
rootDir / "datasources" / "eventOffset.sql" })
diff --git a/p2pvr/daemon/unittests/mockDefs.h b/p2pvr/daemon/unittests/mockDefs.h
index 958e1dd..5df19ca 100644
--- a/p2pvr/daemon/unittests/mockDefs.h
+++ b/p2pvr/daemon/unittests/mockDefs.h
@@ -1,10 +1,9 @@
#ifndef MOCKDEFS_H
#define MOCKDEFS_H
-#include <mockDatasource.h>
-#include <sql-modPQ.h>
+#include <mock.h>
-#define DECLAREMOCK(Name) class Name : public MockPqDatabase { public: Name(); }
+#define DECLAREMOCK(Name) class Name : public PQ::Mock { public: Name(); }
DECLAREMOCK(SchemaOnlyMockDatabase);
DECLAREMOCK(StandardMockDatabase);