2 * Copyright (c) 2012 BMW
4 * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
7 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
8 * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
9 * subject to the following conditions:
10 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
11 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
12 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
13 * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15 * For further information see http://www.genivi.org/.
18 #include "CAmCommandSenderDbusTest.h"
27 #include "TAmPluginTemplate.h"
28 #include "MockIAmCommandReceive.h"
29 #include "shared/CAmDltWrapper.h"
30 #include "shared/CAmSocketHandler.h"
31 #include "shared/CAmDbusWrapper.h"
32 #include "../include/CAmCommandSenderDbus.h"
33 #include "../include/CAmDbusMessageHandler.h"
36 using namespace testing;
38 std::string DBUSCOMMAND = "dbus-send --session --print-reply --dest=org.genivi.audiomanager /org/genivi/audiomanager/commandinterface org.genivi.audiomanager.commandinterface.";
40 void* run_the_loop(void* wrapper)
42 CAmSocketHandler* wrap = (CAmSocketHandler*) wrapper;
43 wrap->start_listenting();
47 CAmCommandSenderDbusTest::CAmCommandSenderDbusTest() :
48 ppCommandSend(NULL) //
50 CAmDltWrapper::instance()->registerApp("dbusTest", "dbusTest");
53 CAmCommandSenderDbusTest::~CAmCommandSenderDbusTest()
58 void CAmCommandSenderDbusTest::SetUp()
63 void CAmCommandSenderDbusTest::TearDown()
68 ACTION(returnListConnections){
69 std::vector<am::am_MainConnectionType_s> list;
70 am::am_MainConnectionType_s listItem;
71 listItem.mainConnectionID=15;
74 listItem.connectionState=CS_UNKNOWN;
76 list.push_back(listItem);
80 ACTION(returnListSinks){
81 std::vector<am::am_SinkType_s> list;
82 am::am_SinkType_s listItem;
83 listItem.availability.availability=A_UNAVAILABLE;
84 listItem.availability.availabilityReason=AR_GENIVI_NOMEDIA;
85 listItem.muteState=MS_UNMUTED;
86 listItem.name="mySink";
87 listItem.sinkClassID=34;
90 list.push_back(listItem);
94 ACTION(returnListSources){
95 std::vector<am::am_SourceType_s> list;
96 am::am_SourceType_s listItem;
97 listItem.availability.availability=A_MAX;
98 listItem.availability.availabilityReason=AR_GENIVI_SAMEMEDIA;
99 listItem.name="MySource";
100 listItem.sourceClassID=12;
101 listItem.sourceID=224;
102 list.push_back(listItem);
103 listItem.name="NextSource";
104 listItem.sourceID=22;
105 list.push_back(listItem);
109 ACTION(returnListMainSinkSoundProperties){
110 std::vector<am::am_MainSoundProperty_s> list;
111 am::am_MainSoundProperty_s listItem;
112 listItem.type=MSP_EXAMPLE_MID;
114 list.push_back(listItem);
115 listItem.type=MSP_UNKNOWN;
117 list.push_back(listItem);
121 ACTION(returnListSourceClasses){
122 std::vector<am::am_SourceClass_s> list;
123 am::am_SourceClass_s listItem;
124 am::am_ClassProperty_s property;
125 property.classProperty=static_cast<am_ClassProperty_e>(2);
127 listItem.name="FirstCLass";
128 listItem.sourceClassID=23;
129 listItem.listClassProperties.push_back(property);
130 list.push_back(listItem);
131 listItem.name="SecondCLass";
132 listItem.sourceClassID=2;
133 listItem.listClassProperties.push_back(property);
134 list.push_back(listItem);
138 ACTION(returnListSinkClasses){
139 std::vector<am::am_SinkClass_s> list;
140 am::am_SinkClass_s listItem;
141 am::am_ClassProperty_s property;
142 property.classProperty=static_cast<am_ClassProperty_e>(1);
144 listItem.name="FirstCLass";
145 listItem.sinkClassID=2123;
146 listItem.listClassProperties.push_back(property);
147 list.push_back(listItem);
148 listItem.name="SecondCLass";
149 listItem.sinkClassID=23;
150 listItem.listClassProperties.push_back(property);
151 list.push_back(listItem);
155 ACTION(returnListSystemProperties){
156 std::vector<am::am_SystemProperty_s> list;
157 am::am_SystemProperty_s listItem;
158 listItem.type=SYP_UNKNOWN;
159 listItem.value=-2245;
160 list.push_back(listItem);
164 ACTION(returnTimingInfo){
165 am::am_timeSync_t time=23;
169 TEST_F(CAmCommandSenderDbusTest, MessageTest)
172 //unfortunatly we need to put all in one testcase because testing with the dbus loop caused problems...
173 CAmSocketHandler pSocketHandler;
174 CAmDbusWrapper pDBusWrapper(&pSocketHandler);
175 pthread_t ptestThread;
176 std::vector<std::string> plistCommandPluginDirs;
177 plistCommandPluginDirs.push_back(std::string(DEFAULT_PLUGIN_COMMAND_DIR));
179 MockIAmCommandReceive pReceiveInterface;
181 //this class just creates the thread that will handle the mainloop...
182 pthread_create(&ptestThread, NULL, run_the_loop, (void*) &pSocketHandler);
184 IAmCommandSend* (*createFunc)();
185 void* tempLibHandle = NULL;
186 std::string libname("../plugins/command/libPluginCommandInterfaceDbus.so");
187 createFunc = getCreateFunction<IAmCommandSend*()>(libname, tempLibHandle);
191 logError("CommandSendInterface Test Entry point of RoutingPlugin not found");
195 ppCommandSend = createFunc();
199 logError("CommandSendInterface Test RoutingPlugin initialization failed. Entry Function not callable");
203 // ok, here we give the DBusWrapper pointer to the Plugin and start the interface
204 EXPECT_CALL(pReceiveInterface,getDBusConnectionWrapper(_)).WillRepeatedly(DoAll(SetArgReferee<0>(&pDBusWrapper), Return(E_OK)));
205 EXPECT_CALL(pReceiveInterface, confirmCommandReady(10,E_OK));
207 ppCommandSend->startupInterface(&pReceiveInterface);
208 ppCommandSend->setCommandReady(10);
210 EXPECT_CALL(pReceiveInterface,connect(2,3,_)).WillRepeatedly(DoAll(SetArgReferee<2>(35), Return(E_OK)));
211 system((DBUSCOMMAND + std::string("Connect uint16:2 uint16:3 > /tmp/result.txt ")).c_str());
214 std::ifstream ifs("/tmp/result.txt");
216 int lineCounter = 0, result = 0;
217 while (std::getline(ifs, line))
219 if (lineCounter == 1)
221 std::stringstream(line.replace(line.begin(), line.begin() + 9, "")) >> result;
222 ASSERT_EQ(result, E_OK);
224 else if (lineCounter == 2)
226 std::stringstream(line.replace(line.begin(), line.begin() + 10, "")) >> result;
227 ASSERT_EQ(result, 35);
233 std::cout << "[connect ]" << std::endl;
235 EXPECT_CALL(pReceiveInterface,disconnect(2)).WillOnce(Return(E_OK));
236 system((DBUSCOMMAND + std::string("Disconnect uint16:2 > /tmp/result.txt ")).c_str());
241 ifs.open("/tmp/result.txt");
242 while (std::getline(ifs, line))
244 if (lineCounter == 1)
246 std::stringstream(line.replace(line.begin(), line.begin() + 9, "")) >> result;
247 ASSERT_EQ(result, E_OK);
253 std::cout << "[disconnect]" << std::endl;
255 EXPECT_CALL(pReceiveInterface,setVolume(22,12)).WillOnce(Return(E_OK));
256 system((DBUSCOMMAND + std::string("SetVolume uint16:22 int16:12 > /tmp/result.txt ")).c_str());
261 ifs.open("/tmp/result.txt");
262 while (std::getline(ifs, line))
264 if (lineCounter == 1)
266 std::stringstream(line.replace(line.begin(), line.begin() + 9, "")) >> result;
267 ASSERT_EQ(result, E_OK);
273 std::cout << "[setVolume ]" << std::endl;
275 EXPECT_CALL(pReceiveInterface,volumeStep(2,1)).WillOnce(Return(E_OK));
276 system((DBUSCOMMAND + std::string("VolumeStep uint16:2 int16:1 > /tmp/result.txt ")).c_str());
281 ifs.open("/tmp/result.txt");
282 while (std::getline(ifs, line))
284 if (lineCounter == 1)
286 std::stringstream(line.replace(line.begin(), line.begin() + 9, "")) >> result;
287 ASSERT_EQ(result, E_OK);
293 std::cout << "[volumeStep]" << std::endl;
295 EXPECT_CALL(pReceiveInterface,setSinkMuteState(1,MS_UNKNOWN)).WillOnce(Return(E_OK));
296 system((DBUSCOMMAND + std::string("SetSinkMuteState uint16:1 int16:0 > /tmp/result.txt ")).c_str());
301 ifs.open("/tmp/result.txt");
302 while (std::getline(ifs, line))
304 if (lineCounter == 1)
306 std::stringstream(line.replace(line.begin(), line.begin() + 9, "")) >> result;
307 ASSERT_EQ(result, E_OK);
313 std::cout << "[sinkmutest]" << std::endl;
315 EXPECT_CALL(pReceiveInterface,setMainSinkSoundProperty(AllOf(Field(&am_MainSoundProperty_s::value, 3),
316 Field(&am_MainSoundProperty_s::type,MSP_UNKNOWN)),1)).WillOnce(Return(E_ABORTED));
318 PyRun_SimpleStringFlags("import dbus\n"
319 "f = open('/tmp/result.txt','w')\n"
320 "bus = dbus.SessionBus()\n"
321 "retVal=dbus.Bus().call_blocking(\n"
322 "bus_name='org.genivi.audiomanager',\n"
323 "object_path='/org/genivi/audiomanager/commandinterface',\n"
324 "dbus_interface='org.genivi.audiomanager.commandinterface',\n"
325 "method='SetMainSinkSoundProperty',\n"
326 "signature='q(nn)',\n"
327 "args=[1,(0,3)],) \n"
328 "f.write(str(retVal));\n"
331 ifs.open("/tmp/result.txt");
332 while (std::getline(ifs, line))
334 std::stringstream(line) >> result;
335 }ASSERT_EQ(result, E_ABORTED);
338 std::cout << "[sinksound ]" << std::endl;
340 EXPECT_CALL(pReceiveInterface,setMainSourceSoundProperty(AllOf(Field(&am_MainSoundProperty_s::value, 3),
341 Field(&am_MainSoundProperty_s::type,MSP_UNKNOWN)),1)).WillOnce(Return(E_ABORTED));
343 PyRun_SimpleStringFlags("import dbus\n"
344 "f = open('/tmp/result.txt','w')\n"
345 "bus = dbus.SessionBus()\n"
346 "retVal=dbus.Bus().call_blocking(\n"
347 "bus_name='org.genivi.audiomanager',\n"
348 "object_path='/org/genivi/audiomanager/commandinterface',\n"
349 "dbus_interface='org.genivi.audiomanager.commandinterface',\n"
350 "method='SetMainSourceSoundProperty',\n"
351 "signature='q(nn)',\n"
352 "args=[1,(0,3)],) \n"
353 "f.write(str(retVal));\n"
356 ifs.open("/tmp/result.txt");
357 while (std::getline(ifs, line))
359 std::stringstream(line) >> result;
360 }ASSERT_EQ(result, E_ABORTED);
363 std::cout << "[sourcesnd ]" << std::endl;
365 EXPECT_CALL(pReceiveInterface,setSystemProperty(Field(&am_SystemProperty_s::value,2))).WillOnce(Return(E_DATABASE_ERROR));
367 PyRun_SimpleStringFlags("import dbus\n"
368 "f = open('/tmp/result.txt','w')\n"
369 "bus = dbus.SessionBus()\n"
370 "retVal=dbus.Bus().call_blocking(\n"
371 "bus_name='org.genivi.audiomanager',\n"
372 "object_path='/org/genivi/audiomanager/commandinterface',\n"
373 "dbus_interface='org.genivi.audiomanager.commandinterface',\n"
374 "method='SetSystemProperty',\n"
375 "signature='(nn)',\n"
377 "f.write(str(retVal));\n"
381 ifs.open("/tmp/result.txt");
382 while (std::getline(ifs, line))
384 std::stringstream(line) >> result;
385 }ASSERT_EQ(result, E_DATABASE_ERROR);
388 std::cout << "[systemprop]" << std::endl;
390 EXPECT_CALL(pReceiveInterface,getListMainConnections(_)).WillOnce(DoAll(returnListConnections(), Return(E_ABORTED)));
392 PyRun_SimpleStringFlags("import dbus\n"
393 "f = open('/tmp/result.txt','w')\n"
394 "bus = dbus.SessionBus()\n"
395 "retVal=dbus.Bus().call_blocking(\n"
396 "bus_name='org.genivi.audiomanager',\n"
397 "object_path='/org/genivi/audiomanager/commandinterface',\n"
398 "dbus_interface='org.genivi.audiomanager.commandinterface',\n"
399 "method='GetListMainConnections',\n"
402 "f.write(str(retVal));\n"
405 ifs.open("/tmp/result.txt");
406 while (std::getline(ifs, line))
408 //we could parse here, but this is the fastest way....
409 ASSERT_EQ(line.compare("(dbus.Int16(9), dbus.Array([dbus.Struct((dbus.UInt16(15), dbus.UInt16(3), dbus.UInt16(4), dbus.Int16(34), dbus.Int16(0)), signature=None)], signature=dbus.Signature('(qqqnn)')))"), 0);
413 std::cout << "[listmainc ]" << std::endl;
415 EXPECT_CALL(pReceiveInterface,getListMainSinks(_)).WillOnce(DoAll(returnListSinks(), Return(E_ABORTED)));
417 PyRun_SimpleStringFlags("import dbus\n"
418 "f = open('/tmp/result.txt','w')\n"
419 "bus = dbus.SessionBus()\n"
420 "retVal=dbus.Bus().call_blocking(\n"
421 "bus_name='org.genivi.audiomanager',\n"
422 "object_path='/org/genivi/audiomanager/commandinterface',\n"
423 "dbus_interface='org.genivi.audiomanager.commandinterface',\n"
424 "method='GetListMainSinks',\n"
427 "f.write(str(retVal));\n"
430 ifs.open("/tmp/result.txt");
431 while (std::getline(ifs, line))
433 //we could parse here, but this is the fastest way....
434 ASSERT_EQ(line.compare("(dbus.Int16(9), dbus.Array([dbus.Struct((dbus.UInt16(24), dbus.String(u'mySink'), dbus.Struct((dbus.Int16(2), dbus.Int16(3)), signature=None), dbus.Int16(124), dbus.Int16(2), dbus.UInt16(34)), signature=None)], signature=dbus.Signature('(qs(nn)nnq)')))"), 0);
438 std::cout << "[listsinks ]" << std::endl;
440 EXPECT_CALL(pReceiveInterface,getListMainSources(_)).WillOnce(DoAll(returnListSources(), Return(E_ABORTED)));
442 PyRun_SimpleStringFlags("import dbus\n"
443 "f = open('/tmp/result.txt','w')\n"
444 "bus = dbus.SessionBus()\n"
445 "retVal=dbus.Bus().call_blocking(\n"
446 "bus_name='org.genivi.audiomanager',\n"
447 "object_path='/org/genivi/audiomanager/commandinterface',\n"
448 "dbus_interface='org.genivi.audiomanager.commandinterface',\n"
449 "method='GetListMainSources',\n"
452 "f.write(str(retVal));\n"
455 ifs.open("/tmp/result.txt");
456 while (std::getline(ifs, line))
458 //we could parse here, but this is the fastest way....
459 ASSERT_EQ(line.compare("(dbus.Int16(9), dbus.Array([dbus.Struct((dbus.UInt16(224), dbus.String(u'MySource'), dbus.Struct((dbus.Int16(3), dbus.Int16(2)), signature=None), dbus.UInt16(12)), signature=None), dbus.Struct((dbus.UInt16(22), dbus.String(u'NextSource'), dbus.Struct((dbus.Int16(3), dbus.Int16(2)), signature=None), dbus.UInt16(12)), signature=None)], signature=dbus.Signature('(qs(nn)q)')))"), 0);
463 std::cout << "[listsource]" << std::endl;
465 EXPECT_CALL(pReceiveInterface,getListMainSinkSoundProperties(1,_)).WillOnce(DoAll(returnListMainSinkSoundProperties(), Return(E_ABORTED)));
467 PyRun_SimpleStringFlags("import dbus\n"
468 "f = open('/tmp/result.txt','w')\n"
469 "bus = dbus.SessionBus()\n"
470 "retVal=dbus.Bus().call_blocking(\n"
471 "bus_name='org.genivi.audiomanager',\n"
472 "object_path='/org/genivi/audiomanager/commandinterface',\n"
473 "dbus_interface='org.genivi.audiomanager.commandinterface',\n"
474 "method='GetListMainSinkSoundProperties',\n"
477 "f.write(str(retVal));\n"
480 ifs.open("/tmp/result.txt");
481 while (std::getline(ifs, line))
483 //we could parse here, but this is the fastest way....
484 ASSERT_EQ(line.compare("(dbus.Int16(9), dbus.Array([dbus.Struct((dbus.Int16(2), dbus.Int16(223)), signature=None), dbus.Struct((dbus.Int16(0), dbus.Int16(2)), signature=None)], signature=dbus.Signature('(nn)')))"), 0);
488 std::cout << "[lMainSiPro]" << std::endl;
490 EXPECT_CALL(pReceiveInterface,getListMainSourceSoundProperties(1,_)).WillOnce(DoAll(returnListMainSinkSoundProperties(), Return(E_ABORTED)));
492 PyRun_SimpleStringFlags("import dbus\n"
493 "f = open('/tmp/result.txt','w')\n"
494 "bus = dbus.SessionBus()\n"
495 "retVal=dbus.Bus().call_blocking(\n"
496 "bus_name='org.genivi.audiomanager',\n"
497 "object_path='/org/genivi/audiomanager/commandinterface',\n"
498 "dbus_interface='org.genivi.audiomanager.commandinterface',\n"
499 "method='GetListMainSourceSoundProperties',\n"
502 "f.write(str(retVal));\n"
505 ifs.open("/tmp/result.txt");
506 while (std::getline(ifs, line))
508 //we could parse here, but this is the fastest way....
509 ASSERT_EQ(line.compare("(dbus.Int16(9), dbus.Array([dbus.Struct((dbus.Int16(2), dbus.Int16(223)), signature=None), dbus.Struct((dbus.Int16(0), dbus.Int16(2)), signature=None)], signature=dbus.Signature('(nn)')))"), 0);
513 std::cout << "[lMainSoPro]" << std::endl;
515 EXPECT_CALL(pReceiveInterface,getListSourceClasses(_)).WillOnce(DoAll(returnListSourceClasses(), Return(E_ABORTED)));
517 PyRun_SimpleStringFlags("import dbus\n"
518 "f = open('/tmp/result.txt','w')\n"
519 "bus = dbus.SessionBus()\n"
520 "retVal=dbus.Bus().call_blocking(\n"
521 "bus_name='org.genivi.audiomanager',\n"
522 "object_path='/org/genivi/audiomanager/commandinterface',\n"
523 "dbus_interface='org.genivi.audiomanager.commandinterface',\n"
524 "method='GetListSourceClasses',\n"
527 "f.write(str(retVal));\n"
530 ifs.open("/tmp/result.txt");
531 while (std::getline(ifs, line))
533 //we could parse here, but this is the fastest way....
534 ASSERT_EQ(line.compare("(dbus.Int16(9), dbus.Array([dbus.Struct((dbus.UInt16(23), dbus.String(u'FirstCLass'), dbus.Array([dbus.Struct((dbus.Int16(2), dbus.Int16(12)), signature=None)], signature=dbus.Signature('(nn)'))), signature=None), dbus.Struct((dbus.UInt16(2), dbus.String(u'SecondCLass'), dbus.Array([dbus.Struct((dbus.Int16(2), dbus.Int16(12)), signature=None), dbus.Struct((dbus.Int16(2), dbus.Int16(12)), signature=None)], signature=dbus.Signature('(nn)'))), signature=None)], signature=dbus.Signature('(qsa(nn))')))"), 0);
538 std::cout << "[lSourceCla]" << std::endl;
540 EXPECT_CALL(pReceiveInterface,getListSinkClasses(_)).WillOnce(DoAll(returnListSinkClasses(), Return(E_ABORTED)));
542 PyRun_SimpleStringFlags("import dbus\n"
543 "f = open('/tmp/result.txt','w')\n"
544 "bus = dbus.SessionBus()\n"
545 "retVal=dbus.Bus().call_blocking(\n"
546 "bus_name='org.genivi.audiomanager',\n"
547 "object_path='/org/genivi/audiomanager/commandinterface',\n"
548 "dbus_interface='org.genivi.audiomanager.commandinterface',\n"
549 "method='GetListSinkClasses',\n"
552 "f.write(str(retVal));\n"
555 ifs.open("/tmp/result.txt");
556 while (std::getline(ifs, line))
558 //we could parse here, but this is the fastest way....
559 ASSERT_EQ(line.compare("(dbus.Int16(9), dbus.Array([dbus.Struct((dbus.UInt16(2123), dbus.String(u'FirstCLass'), dbus.Array([dbus.Struct((dbus.Int16(1), dbus.Int16(122)), signature=None)], signature=dbus.Signature('(nn)'))), signature=None), dbus.Struct((dbus.UInt16(23), dbus.String(u'SecondCLass'), dbus.Array([dbus.Struct((dbus.Int16(1), dbus.Int16(122)), signature=None), dbus.Struct((dbus.Int16(1), dbus.Int16(122)), signature=None)], signature=dbus.Signature('(nn)'))), signature=None)], signature=dbus.Signature('(qsa(nn))')))"), 0);
563 std::cout << "[lSinkClass]" << std::endl;
565 EXPECT_CALL(pReceiveInterface,getListSystemProperties(_)).WillOnce(DoAll(returnListSystemProperties(), Return(E_ABORTED)));
567 PyRun_SimpleStringFlags("import dbus\n"
568 "f = open('/tmp/result.txt','w')\n"
569 "bus = dbus.SessionBus()\n"
570 "retVal=dbus.Bus().call_blocking(\n"
571 "bus_name='org.genivi.audiomanager',\n"
572 "object_path='/org/genivi/audiomanager/commandinterface',\n"
573 "dbus_interface='org.genivi.audiomanager.commandinterface',\n"
574 "method='GetListSystemProperties',\n"
577 "f.write(str(retVal));\n"
580 ifs.open("/tmp/result.txt");
581 while (std::getline(ifs, line))
583 //we could parse here, but this is the fastest way....
584 ASSERT_EQ(line.compare("(dbus.Int16(9), dbus.Array([dbus.Struct((dbus.Int16(0), dbus.Int16(-2245)), signature=None)], signature=dbus.Signature('(nn)')))"), 0);
588 std::cout << "[lSysProp ]" << std::endl;
590 EXPECT_CALL(pReceiveInterface,getTimingInformation(2,_)).WillOnce(DoAll(returnTimingInfo(), Return(E_ABORTED)));
592 PyRun_SimpleStringFlags("import dbus\n"
593 "f = open('/tmp/result.txt','w')\n"
594 "bus = dbus.SessionBus()\n"
595 "retVal=dbus.Bus().call_blocking(\n"
596 "bus_name='org.genivi.audiomanager',\n"
597 "object_path='/org/genivi/audiomanager/commandinterface',\n"
598 "dbus_interface='org.genivi.audiomanager.commandinterface',\n"
599 "method='GetTimingInformation',\n"
602 "f.write(str(retVal));\n"
605 ifs.open("/tmp/result.txt");
606 while (std::getline(ifs, line))
608 //we could parse here, but this is the fastest way....
609 ASSERT_EQ(line.compare("(dbus.Int16(9), dbus.Int16(23))"), 0);
613 std::cout << "[timingInfo]" << std::endl;
617 int main(int argc, char **argv)
619 ::testing::InitGoogleTest(&argc, argv);
620 return RUN_ALL_TESTS();