summaryrefslogtreecommitdiff
path: root/tubes
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2012-03-22 11:22:44 +0000
committerMatúš Kukan <matus.kukan@gmail.com>2012-07-17 16:39:30 +0200
commitc80787cd82769cd1063987dcf0a5b1bd366e056e (patch)
tree2bb419121f486af6d2157bc3492025ec07d1f9ff /tubes
parentbbfc386f54b4b6ca17431e187f161858a3b80976 (diff)
tubes: Give a useful error when test-config.ini is missing.
Diffstat (limited to 'tubes')
-rw-r--r--tubes/README10
-rw-r--r--tubes/qa/test-config.ini.example5
-rw-r--r--tubes/qa/test_manager.cxx10
-rw-r--r--tubes/test-config.ini3
4 files changed, 16 insertions, 12 deletions
diff --git a/tubes/README b/tubes/README
index 84d48928f80e..3f2f637c5a47 100644
--- a/tubes/README
+++ b/tubes/README
@@ -37,12 +37,10 @@ Status 2012-03-20:
is silenced down ... :-(
* for the cppunittest needed:
- * a jabber daemon running on localhost.localdomain
- * two accounts configured in Empathy
- * libo1@localhost.localdomain
- * libo2@localhost.localdomain
- * libo1 and libo2 must be contacts/buddies of each other
- * both accounts need to be online in Empathy
+ * Configure two Jabber accounts in Empathy
+ * Both must be online and on each other's contact list
+ * Copy qa/test-config.ini.example to qa/test-config.ini, and specify those
+ two accounts' JIDs in it.
* very nasty GMainLoop handling for cppunittest, HOPEFULLY we will get rid of
that in a real LibO
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()
diff --git a/tubes/test-config.ini b/tubes/test-config.ini
deleted file mode 100644
index dba2be1a9747..000000000000
--- a/tubes/test-config.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-# Locally-configured Jabber accounts used by Tubes test suite.
-offerer=libo1@localhost.localdomain
-accepter=libo2@localhost.localdomain