From c80787cd82769cd1063987dcf0a5b1bd366e056e Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Thu, 22 Mar 2012 11:22:44 +0000 Subject: tubes: Give a useful error when test-config.ini is missing. --- tubes/qa/test-config.ini.example | 5 +++++ tubes/qa/test_manager.cxx | 10 +++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 tubes/qa/test-config.ini.example (limited to 'tubes/qa') diff --git a/tubes/qa/test-config.ini.example b/tubes/qa/test-config.ini.example new file mode 100644 index 000000000000..2d03ca8f3bb1 --- /dev/null +++ b/tubes/qa/test-config.ini.example @@ -0,0 +1,5 @@ +# Locally-configured Jabber accounts used by Tubes test suite. These accounts +# must both be signed in and on each others' contact lists for the tests to +# work. +offerer=libo1@localhost.localdomain +accepter=libo2@localhost.localdomain diff --git a/tubes/qa/test_manager.cxx b/tubes/qa/test_manager.cxx index f7461ba1730c..ea5806d83a89 100644 --- a/tubes/qa/test_manager.cxx +++ b/tubes/qa/test_manager.cxx @@ -88,6 +88,7 @@ public: private: // XXX The Jabber accounts specified in test-config.ini need to be setup in // Empathy, enabled, connected, and on each other's rosters. + rtl::OUString maTestConfigIniURL; rtl::Bootstrap maTestConfig; rtl::OUString maAcc1; @@ -101,12 +102,15 @@ static TeleManager* mpManager2 = NULL; static sal_uInt32 nSentPackets = 0; TestTeleTubes::TestTeleTubes() - : maTestConfig(getURLFromSrc("/tubes/test-config.ini")) + : maTestConfigIniURL(getURLFromSrc("/tubes/qa/test-config.ini")), + maTestConfig(maTestConfigIniURL) { TeleManager::addSuffixToNames( "TeleTest"); - CPPUNIT_ASSERT( maTestConfig.getFrom("offerer", maAcc1)); - CPPUNIT_ASSERT( maTestConfig.getFrom("accepter", maAcc2)); + CPPUNIT_ASSERT_MESSAGE( "See README for how to set up test-config.ini", + maTestConfig.getFrom("offerer", maAcc1)); + CPPUNIT_ASSERT_MESSAGE( "See README for how to set up test-config.ini", + maTestConfig.getFrom("accepter", maAcc2)); } TestTeleTubes::~TestTeleTubes() -- cgit v1.2.3