summaryrefslogtreecommitdiff
path: root/indra/test
diff options
context:
space:
mode:
Diffstat (limited to 'indra/test')
-rw-r--r--[-rwxr-xr-x]indra/test/CMakeLists.txt0
-rw-r--r--[-rwxr-xr-x]indra/test/blowfish.1.bin0
-rw-r--r--[-rwxr-xr-x]indra/test/blowfish.2.binbin40 -> 40 bytes
-rw-r--r--[-rwxr-xr-x]indra/test/blowfish.digits.txt0
-rw-r--r--[-rwxr-xr-x]indra/test/debug.h0
-rw-r--r--[-rwxr-xr-x]indra/test/io.cpp0
-rw-r--r--[-rwxr-xr-x]indra/test/llassetuploadqueue_tut.cpp0
-rw-r--r--[-rwxr-xr-x]indra/test/llblowfish_tut.cpp0
-rw-r--r--[-rwxr-xr-x]indra/test/llbuffer_tut.cpp0
-rw-r--r--[-rwxr-xr-x]indra/test/lldatapacker_tut.cpp0
-rw-r--r--[-rwxr-xr-x]indra/test/lldoubledispatch_tut.cpp0
-rw-r--r--[-rwxr-xr-x]indra/test/llevents_tut.cpp0
-rw-r--r--[-rwxr-xr-x]indra/test/llhttpclient_tut.cpp0
-rw-r--r--[-rwxr-xr-x]indra/test/llhttpdate_tut.cpp0
-rw-r--r--[-rwxr-xr-x]indra/test/llhttpnode_tut.cpp0
-rw-r--r--[-rwxr-xr-x]indra/test/lliohttpserver_tut.cpp0
-rw-r--r--[-rwxr-xr-x]indra/test/llmessageconfig_tut.cpp0
-rw-r--r--[-rwxr-xr-x]indra/test/llmessagetemplateparser_tut.cpp0
-rw-r--r--[-rwxr-xr-x]indra/test/llpermissions_tut.cpp0
-rw-r--r--[-rwxr-xr-x]indra/test/llpipeutil.cpp0
-rw-r--r--[-rwxr-xr-x]indra/test/llpipeutil.h0
-rw-r--r--[-rwxr-xr-x]indra/test/llsaleinfo_tut.cpp0
-rw-r--r--[-rwxr-xr-x]indra/test/llscriptresource_tut.cpp0
-rw-r--r--[-rwxr-xr-x]indra/test/llsd_new_tut.cpp0
-rw-r--r--[-rwxr-xr-x]indra/test/llsdmessagebuilder_tut.cpp0
-rw-r--r--[-rwxr-xr-x]indra/test/llsdmessagereader_tut.cpp0
-rw-r--r--[-rwxr-xr-x]indra/test/llsdtraits.h0
-rw-r--r--[-rwxr-xr-x]indra/test/llsdutil_tut.cpp0
-rw-r--r--[-rwxr-xr-x]indra/test/llservicebuilder_tut.cpp0
-rw-r--r--[-rwxr-xr-x]indra/test/llstreamtools_tut.cpp0
-rw-r--r--[-rwxr-xr-x]indra/test/lltemplatemessagebuilder_tut.cpp0
-rw-r--r--[-rwxr-xr-x]indra/test/lltimestampcache_tut.cpp0
-rw-r--r--[-rwxr-xr-x]indra/test/lltranscode_tut.cpp0
-rw-r--r--[-rwxr-xr-x]indra/test/lltut.cpp0
-rw-r--r--[-rwxr-xr-x]indra/test/lltut.h0
-rw-r--r--[-rwxr-xr-x]indra/test/lluserrelations_tut.cpp0
-rw-r--r--[-rwxr-xr-x]indra/test/lluuidhashmap_tut.cpp0
-rw-r--r--[-rwxr-xr-x]indra/test/llxorcipher_tut.cpp0
-rw-r--r--[-rwxr-xr-x]indra/test/message_tut.cpp0
-rw-r--r--[-rwxr-xr-x]indra/test/mock_http_client.cpp0
-rw-r--r--[-rwxr-xr-x]indra/test/mock_http_client.h0
-rw-r--r--[-rwxr-xr-x]indra/test/prim_linkability_tut.cpp0
-rw-r--r--[-rwxr-xr-x]indra/test/test.cpp302
-rw-r--r--[-rwxr-xr-x]indra/test/test.h0
-rw-r--r--[-rwxr-xr-x]indra/test/test_llmanifest.py0
45 files changed, 209 insertions, 93 deletions
diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt
index 66c78a86c4..66c78a86c4 100755..100644
--- a/indra/test/CMakeLists.txt
+++ b/indra/test/CMakeLists.txt
diff --git a/indra/test/blowfish.1.bin b/indra/test/blowfish.1.bin
index 61286e45e3..61286e45e3 100755..100644
--- a/indra/test/blowfish.1.bin
+++ b/indra/test/blowfish.1.bin
diff --git a/indra/test/blowfish.2.bin b/indra/test/blowfish.2.bin
index ef72d96bbf..ef72d96bbf 100755..100644
--- a/indra/test/blowfish.2.bin
+++ b/indra/test/blowfish.2.bin
Binary files differ
diff --git a/indra/test/blowfish.digits.txt b/indra/test/blowfish.digits.txt
index fce1fed943..fce1fed943 100755..100644
--- a/indra/test/blowfish.digits.txt
+++ b/indra/test/blowfish.digits.txt
diff --git a/indra/test/debug.h b/indra/test/debug.h
index a00659d880..a00659d880 100755..100644
--- a/indra/test/debug.h
+++ b/indra/test/debug.h
diff --git a/indra/test/io.cpp b/indra/test/io.cpp
index 483eb9df00..483eb9df00 100755..100644
--- a/indra/test/io.cpp
+++ b/indra/test/io.cpp
diff --git a/indra/test/llassetuploadqueue_tut.cpp b/indra/test/llassetuploadqueue_tut.cpp
index 241574e32f..241574e32f 100755..100644
--- a/indra/test/llassetuploadqueue_tut.cpp
+++ b/indra/test/llassetuploadqueue_tut.cpp
diff --git a/indra/test/llblowfish_tut.cpp b/indra/test/llblowfish_tut.cpp
index 4a128a8984..4a128a8984 100755..100644
--- a/indra/test/llblowfish_tut.cpp
+++ b/indra/test/llblowfish_tut.cpp
diff --git a/indra/test/llbuffer_tut.cpp b/indra/test/llbuffer_tut.cpp
index a0b6379d72..a0b6379d72 100755..100644
--- a/indra/test/llbuffer_tut.cpp
+++ b/indra/test/llbuffer_tut.cpp
diff --git a/indra/test/lldatapacker_tut.cpp b/indra/test/lldatapacker_tut.cpp
index 6c0fa56d51..6c0fa56d51 100755..100644
--- a/indra/test/lldatapacker_tut.cpp
+++ b/indra/test/lldatapacker_tut.cpp
diff --git a/indra/test/lldoubledispatch_tut.cpp b/indra/test/lldoubledispatch_tut.cpp
index 63ef4d4497..63ef4d4497 100755..100644
--- a/indra/test/lldoubledispatch_tut.cpp
+++ b/indra/test/lldoubledispatch_tut.cpp
diff --git a/indra/test/llevents_tut.cpp b/indra/test/llevents_tut.cpp
index e58b10ce07..e58b10ce07 100755..100644
--- a/indra/test/llevents_tut.cpp
+++ b/indra/test/llevents_tut.cpp
diff --git a/indra/test/llhttpclient_tut.cpp b/indra/test/llhttpclient_tut.cpp
index 2b1496e912..2b1496e912 100755..100644
--- a/indra/test/llhttpclient_tut.cpp
+++ b/indra/test/llhttpclient_tut.cpp
diff --git a/indra/test/llhttpdate_tut.cpp b/indra/test/llhttpdate_tut.cpp
index 8762938186..8762938186 100755..100644
--- a/indra/test/llhttpdate_tut.cpp
+++ b/indra/test/llhttpdate_tut.cpp
diff --git a/indra/test/llhttpnode_tut.cpp b/indra/test/llhttpnode_tut.cpp
index e17d1e0f24..e17d1e0f24 100755..100644
--- a/indra/test/llhttpnode_tut.cpp
+++ b/indra/test/llhttpnode_tut.cpp
diff --git a/indra/test/lliohttpserver_tut.cpp b/indra/test/lliohttpserver_tut.cpp
index 7d3b312bfd..7d3b312bfd 100755..100644
--- a/indra/test/lliohttpserver_tut.cpp
+++ b/indra/test/lliohttpserver_tut.cpp
diff --git a/indra/test/llmessageconfig_tut.cpp b/indra/test/llmessageconfig_tut.cpp
index ddc1d07f11..ddc1d07f11 100755..100644
--- a/indra/test/llmessageconfig_tut.cpp
+++ b/indra/test/llmessageconfig_tut.cpp
diff --git a/indra/test/llmessagetemplateparser_tut.cpp b/indra/test/llmessagetemplateparser_tut.cpp
index 02acc152c2..02acc152c2 100755..100644
--- a/indra/test/llmessagetemplateparser_tut.cpp
+++ b/indra/test/llmessagetemplateparser_tut.cpp
diff --git a/indra/test/llpermissions_tut.cpp b/indra/test/llpermissions_tut.cpp
index d5795ef4a0..d5795ef4a0 100755..100644
--- a/indra/test/llpermissions_tut.cpp
+++ b/indra/test/llpermissions_tut.cpp
diff --git a/indra/test/llpipeutil.cpp b/indra/test/llpipeutil.cpp
index 9c81fa3378..9c81fa3378 100755..100644
--- a/indra/test/llpipeutil.cpp
+++ b/indra/test/llpipeutil.cpp
diff --git a/indra/test/llpipeutil.h b/indra/test/llpipeutil.h
index acff2d861e..acff2d861e 100755..100644
--- a/indra/test/llpipeutil.h
+++ b/indra/test/llpipeutil.h
diff --git a/indra/test/llsaleinfo_tut.cpp b/indra/test/llsaleinfo_tut.cpp
index fa5e047513..fa5e047513 100755..100644
--- a/indra/test/llsaleinfo_tut.cpp
+++ b/indra/test/llsaleinfo_tut.cpp
diff --git a/indra/test/llscriptresource_tut.cpp b/indra/test/llscriptresource_tut.cpp
index 705fdd16ae..705fdd16ae 100755..100644
--- a/indra/test/llscriptresource_tut.cpp
+++ b/indra/test/llscriptresource_tut.cpp
diff --git a/indra/test/llsd_new_tut.cpp b/indra/test/llsd_new_tut.cpp
index d73a0a35c6..d73a0a35c6 100755..100644
--- a/indra/test/llsd_new_tut.cpp
+++ b/indra/test/llsd_new_tut.cpp
diff --git a/indra/test/llsdmessagebuilder_tut.cpp b/indra/test/llsdmessagebuilder_tut.cpp
index ca15314e69..ca15314e69 100755..100644
--- a/indra/test/llsdmessagebuilder_tut.cpp
+++ b/indra/test/llsdmessagebuilder_tut.cpp
diff --git a/indra/test/llsdmessagereader_tut.cpp b/indra/test/llsdmessagereader_tut.cpp
index f11e148cca..f11e148cca 100755..100644
--- a/indra/test/llsdmessagereader_tut.cpp
+++ b/indra/test/llsdmessagereader_tut.cpp
diff --git a/indra/test/llsdtraits.h b/indra/test/llsdtraits.h
index efe2dd5c36..efe2dd5c36 100755..100644
--- a/indra/test/llsdtraits.h
+++ b/indra/test/llsdtraits.h
diff --git a/indra/test/llsdutil_tut.cpp b/indra/test/llsdutil_tut.cpp
index aebb1f9770..aebb1f9770 100755..100644
--- a/indra/test/llsdutil_tut.cpp
+++ b/indra/test/llsdutil_tut.cpp
diff --git a/indra/test/llservicebuilder_tut.cpp b/indra/test/llservicebuilder_tut.cpp
index e6cf46f94c..e6cf46f94c 100755..100644
--- a/indra/test/llservicebuilder_tut.cpp
+++ b/indra/test/llservicebuilder_tut.cpp
diff --git a/indra/test/llstreamtools_tut.cpp b/indra/test/llstreamtools_tut.cpp
index 089ba4fea0..089ba4fea0 100755..100644
--- a/indra/test/llstreamtools_tut.cpp
+++ b/indra/test/llstreamtools_tut.cpp
diff --git a/indra/test/lltemplatemessagebuilder_tut.cpp b/indra/test/lltemplatemessagebuilder_tut.cpp
index 5b33d02726..5b33d02726 100755..100644
--- a/indra/test/lltemplatemessagebuilder_tut.cpp
+++ b/indra/test/lltemplatemessagebuilder_tut.cpp
diff --git a/indra/test/lltimestampcache_tut.cpp b/indra/test/lltimestampcache_tut.cpp
index 3b102a3366..3b102a3366 100755..100644
--- a/indra/test/lltimestampcache_tut.cpp
+++ b/indra/test/lltimestampcache_tut.cpp
diff --git a/indra/test/lltranscode_tut.cpp b/indra/test/lltranscode_tut.cpp
index eb21979db0..eb21979db0 100755..100644
--- a/indra/test/lltranscode_tut.cpp
+++ b/indra/test/lltranscode_tut.cpp
diff --git a/indra/test/lltut.cpp b/indra/test/lltut.cpp
index e4e0de1ff1..e4e0de1ff1 100755..100644
--- a/indra/test/lltut.cpp
+++ b/indra/test/lltut.cpp
diff --git a/indra/test/lltut.h b/indra/test/lltut.h
index 6322753253..6322753253 100755..100644
--- a/indra/test/lltut.h
+++ b/indra/test/lltut.h
diff --git a/indra/test/lluserrelations_tut.cpp b/indra/test/lluserrelations_tut.cpp
index 4e3cc410c2..4e3cc410c2 100755..100644
--- a/indra/test/lluserrelations_tut.cpp
+++ b/indra/test/lluserrelations_tut.cpp
diff --git a/indra/test/lluuidhashmap_tut.cpp b/indra/test/lluuidhashmap_tut.cpp
index 3c6c9cb34b..3c6c9cb34b 100755..100644
--- a/indra/test/lluuidhashmap_tut.cpp
+++ b/indra/test/lluuidhashmap_tut.cpp
diff --git a/indra/test/llxorcipher_tut.cpp b/indra/test/llxorcipher_tut.cpp
index 7586eddc73..7586eddc73 100755..100644
--- a/indra/test/llxorcipher_tut.cpp
+++ b/indra/test/llxorcipher_tut.cpp
diff --git a/indra/test/message_tut.cpp b/indra/test/message_tut.cpp
index 3fede2608c..3fede2608c 100755..100644
--- a/indra/test/message_tut.cpp
+++ b/indra/test/message_tut.cpp
diff --git a/indra/test/mock_http_client.cpp b/indra/test/mock_http_client.cpp
index 7bcc781904..7bcc781904 100755..100644
--- a/indra/test/mock_http_client.cpp
+++ b/indra/test/mock_http_client.cpp
diff --git a/indra/test/mock_http_client.h b/indra/test/mock_http_client.h
index 067d933bf4..067d933bf4 100755..100644
--- a/indra/test/mock_http_client.h
+++ b/indra/test/mock_http_client.h
diff --git a/indra/test/prim_linkability_tut.cpp b/indra/test/prim_linkability_tut.cpp
index a1bb31d21e..a1bb31d21e 100755..100644
--- a/indra/test/prim_linkability_tut.cpp
+++ b/indra/test/prim_linkability_tut.cpp
diff --git a/indra/test/test.cpp b/indra/test/test.cpp
index 7dfe8f40b7..dee285d805 100755..100644
--- a/indra/test/test.cpp
+++ b/indra/test/test.cpp
@@ -62,7 +62,7 @@
namespace tut
{
std::string sSourceDir;
-
+
test_runner_singleton runner;
}
@@ -70,54 +70,66 @@ class LLTestCallback : public tut::callback
{
public:
LLTestCallback(bool verbose_mode, std::ostream *stream) :
- mVerboseMode(verbose_mode),
- mTotalTests(0),
- mPassedTests(0),
- mFailedTests(0),
- mSkippedTests(0),
- mStream(stream)
+ mVerboseMode(verbose_mode),
+ mTotalTests(0),
+ mPassedTests(0),
+ mFailedTests(0),
+ mSkippedTests(0),
+ mStream(stream)
{
}
- void run_started()
+ ~LLTestCallback()
+ {
+ }
+
+ virtual void run_started()
{
//std::cout << "run_started" << std::endl;
}
- void test_completed(const tut::test_result& tr)
+ virtual void group_started(const std::string& name) {
+ std::cout << "Unit test group_started name=" << name << std::endl;
+ }
+
+ virtual void group_completed(const std::string& name) {
+ std::cout << "Unit test group_completed name=" << name << std::endl;
+ }
+
+ virtual void test_completed(const tut::test_result& tr)
{
++mTotalTests;
std::ostringstream out;
out << "[" << tr.group << ", " << tr.test << "] ";
switch(tr.result)
{
- case tut::test_result::ok:
- ++mPassedTests;
- out << "ok";
- break;
- case tut::test_result::fail:
- ++mFailedTests;
- out << "fail";
- break;
- case tut::test_result::ex:
- ++mFailedTests;
- out << "exception";
- break;
- case tut::test_result::warn:
- ++mFailedTests;
- out << "test destructor throw";
- break;
- case tut::test_result::term:
- ++mFailedTests;
- out << "abnormal termination";
- break;
- case tut::test_result::skip:
- ++mSkippedTests;
- out << "skipped known failure";
- break;
- default:
- ++mFailedTests;
- out << "unknown";
+ case tut::test_result::ok:
+ ++mPassedTests;
+ out << "ok";
+ break;
+ case tut::test_result::fail:
+ ++mFailedTests;
+ out << "fail";
+ break;
+ case tut::test_result::ex:
+ ++mFailedTests;
+ out << "exception";
+ break;
+ case tut::test_result::warn:
+ ++mFailedTests;
+ out << "test destructor throw";
+ break;
+ case tut::test_result::term:
+ ++mFailedTests;
+ out << "abnormal termination";
+ break;
+ case tut::test_result::skip:
+ ++mSkippedTests;
+ out << "skipped known failure";
+ break;
+ default:
+ ++mFailedTests;
+ out << "unknown";
}
if(mVerboseMode || (tr.result != tut::test_result::ok))
{
@@ -134,7 +146,7 @@ public:
}
}
- void run_completed()
+ virtual void run_completed()
{
if (mStream)
{
@@ -143,10 +155,9 @@ public:
run_completed_(std::cout);
}
- int getFailedTests() const { return mFailedTests; }
-
-private:
- void run_completed_(std::ostream &stream)
+ virtual int getFailedTests() const { return mFailedTests; }
+
+ virtual void run_completed_(std::ostream &stream)
{
stream << "\tTotal Tests:\t" << mTotalTests << std::endl;
stream << "\tPassed Tests:\t" << mPassedTests;
@@ -159,7 +170,7 @@ private:
if (mSkippedTests > 0)
{
stream << "\tSkipped known failures:\t" << mSkippedTests
- << std::endl;
+ << std::endl;
}
if(mFailedTests > 0)
@@ -180,6 +191,94 @@ protected:
std::ostream *mStream;
};
+// TeamCity specific class which emits service messages
+// http://confluence.jetbrains.net/display/TCD3/Build+Script+Interaction+with+TeamCity;#BuildScriptInteractionwithTeamCity-testReporting
+
+class LLTCTestCallback : public LLTestCallback
+{
+public:
+ LLTCTestCallback(bool verbose_mode, std::ostream *stream) :
+ LLTestCallback(verbose_mode, stream),
+ mTCStream()
+ {
+ }
+
+ ~LLTCTestCallback()
+ {
+ }
+
+ virtual void group_started(const std::string& name) {
+ LLTestCallback::group_started(name);
+ mTCStream << "\n##teamcity[testSuiteStarted name='" << name << "']" << std::endl;
+ }
+
+ virtual void group_completed(const std::string& name) {
+ LLTestCallback::group_completed(name);
+ mTCStream << "##teamcity[testSuiteFinished name='" << name << "']" << std::endl;
+ }
+
+ virtual void test_completed(const tut::test_result& tr)
+ {
+ LLTestCallback::test_completed(tr);
+
+ switch(tr.result)
+ {
+ case tut::test_result::ok:
+ mTCStream << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']" << std::endl;
+ mTCStream << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']" << std::endl;
+ break;
+ case tut::test_result::fail:
+ mTCStream << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']" << std::endl;
+ mTCStream << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']" << std::endl;
+ mTCStream << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']" << std::endl;
+ break;
+ case tut::test_result::ex:
+ mTCStream << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']" << std::endl;
+ mTCStream << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']" << std::endl;
+ mTCStream << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']" << std::endl;
+ break;
+ case tut::test_result::warn:
+ mTCStream << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']" << std::endl;
+ mTCStream << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']" << std::endl;
+ mTCStream << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']" << std::endl;
+ break;
+ case tut::test_result::term:
+ mTCStream << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']" << std::endl;
+ mTCStream << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']" << std::endl;
+ mTCStream << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']" << std::endl;
+ break;
+ case tut::test_result::skip:
+ mTCStream << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']" << std::endl;
+ mTCStream << "##teamcity[testIgnored name='" << tr.group << "." << tr.test << "']" << std::endl;
+ mTCStream << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']" << std::endl;
+ break;
+ default:
+ break;
+ }
+
+ }
+
+ virtual void run_completed()
+ {
+ LLTestCallback::run_completed();
+
+ // dump the TC reporting results to cout
+ tc_run_completed_(std::cout);
+ }
+
+ virtual void tc_run_completed_(std::ostream &stream)
+ {
+
+ // dump the TC reporting results to cout
+ stream << mTCStream.str() << std::endl;
+ }
+
+protected:
+ std::ostringstream mTCStream;
+
+};
+
+
static const apr_getopt_option_t TEST_CL_OPTIONS[] =
{
{"help", 'h', 0, "Print the help message."},
@@ -191,13 +290,14 @@ static const apr_getopt_option_t TEST_CL_OPTIONS[] =
{"touch", 't', 1, "Touch the given file if all tests succeed"},
{"wait", 'w', 0, "Wait for input before exit."},
{"debug", 'd', 0, "Emit full debug logs."},
+ {"suitename", 'x', 1, "Run tests using this suitename"},
{0, 0, 0, 0}
};
void stream_usage(std::ostream& s, const char* app)
{
s << "Usage: " << app << " [OPTIONS]" << std::endl
- << std::endl;
+ << std::endl;
s << "This application runs the unit tests." << std::endl << std::endl;
@@ -207,7 +307,7 @@ void stream_usage(std::ostream& s, const char* app)
{
s << " ";
s << " -" << (char)option->optch << ", --" << option->name
- << std::endl;
+ << std::endl;
s << "\t" << option->description << std::endl << std::endl;
++option;
}
@@ -248,9 +348,9 @@ int main(int argc, char **argv)
LLError::initForApplication(".");
LLError::setFatalFunction(wouldHaveCrashed);
LLError::setDefaultLevel(LLError::LEVEL_ERROR);
- //< *TODO: should come from error config file. Note that we
- // have a command line option that sets this to debug.
-
+ //< *TODO: should come from error config file. Note that we
+ // have a command line option that sets this to debug.
+
#ifdef CTYPE_WORKAROUND
ctype_workaround();
#endif
@@ -273,6 +373,7 @@ int main(int argc, char **argv)
bool verbose_mode = false;
bool wait_at_exit = false;
std::string test_group;
+ std::string suite_name;
// values use for options parsing
apr_status_t apr_err;
@@ -280,7 +381,7 @@ int main(int argc, char **argv)
int opt_id = 0;
std::ofstream *output = NULL;
const char *touch = NULL;
-
+
while(true)
{
apr_err = apr_getopt_long(os, TEST_CL_OPTIONS, &opt_id, &opt_arg);
@@ -289,55 +390,68 @@ int main(int argc, char **argv)
{
char buf[255]; /* Flawfinder: ignore */
std::cerr << "Error parsing options: "
- << apr_strerror(apr_err, buf, 255) << std::endl;
+ << apr_strerror(apr_err, buf, 255) << std::endl;
return 1;
}
switch (opt_id)
{
- case 'g':
- test_group.assign(opt_arg);
- break;
- case 'h':
- stream_usage(std::cout, argv[0]);
- return 0;
- break;
- case 'l':
- stream_groups(std::cout, argv[0]);
- return 0;
- case 'v':
- verbose_mode = true;
- break;
- case 'o':
- output = new std::ofstream;
- output->open(opt_arg);
- break;
- case 's': // --sourcedir
- tut::sSourceDir = opt_arg;
- // For convenience, so you can use tut::sSourceDir + "myfile"
- tut::sSourceDir += '/';
- break;
- case 't':
- touch = opt_arg;
- break;
- case 'w':
- wait_at_exit = true;
- break;
- case 'd':
- // *TODO: should come from error config file. We set it to
- // ERROR by default, so this allows full debug levels.
- LLError::setDefaultLevel(LLError::LEVEL_DEBUG);
- break;
- default:
- stream_usage(std::cerr, argv[0]);
- return 1;
- break;
+ case 'g':
+ test_group.assign(opt_arg);
+ break;
+ case 'h':
+ stream_usage(std::cout, argv[0]);
+ return 0;
+ break;
+ case 'l':
+ stream_groups(std::cout, argv[0]);
+ return 0;
+ case 'v':
+ verbose_mode = true;
+ break;
+ case 'o':
+ output = new std::ofstream;
+ output->open(opt_arg);
+ break;
+ case 's': // --sourcedir
+ tut::sSourceDir = opt_arg;
+ // For convenience, so you can use tut::sSourceDir + "myfile"
+ tut::sSourceDir += '/';
+ break;
+ case 't':
+ touch = opt_arg;
+ break;
+ case 'w':
+ wait_at_exit = true;
+ break;
+ case 'd':
+ // *TODO: should come from error config file. We set it to
+ // ERROR by default, so this allows full debug levels.
+ LLError::setDefaultLevel(LLError::LEVEL_DEBUG);
+ break;
+ case 'x':
+ suite_name.assign(opt_arg);
+ break;
+ default:
+ stream_usage(std::cerr, argv[0]);
+ return 1;
+ break;
}
}
// run the tests
- LLTestCallback callback(verbose_mode, output);
- tut::runner.get().set_callback(&callback);
-
+
+ LLTestCallback* mycallback;
+ if (getenv("TEAMCITY_PROJECT_NAME"))
+ {
+ mycallback = new LLTCTestCallback(verbose_mode, output);
+ }
+ else
+ {
+ mycallback = new LLTestCallback(verbose_mode, output);
+ }
+
+ tut::runner.get().set_callback(mycallback);
+
if(test_group.empty())
{
tut::runner.get().run_tests();
@@ -347,14 +461,14 @@ int main(int argc, char **argv)
tut::runner.get().run_tests(test_group);
}
- bool success = (callback.getFailedTests() == 0);
+ bool success = (mycallback->getFailedTests() == 0);
if (wait_at_exit)
{
std::cerr << "Press return to exit..." << std::endl;
std::cin.get();
}
-
+
if (output)
{
output->close();
@@ -368,9 +482,11 @@ int main(int argc, char **argv)
s << "ok" << std::endl;
s.close();
}
-
+
apr_terminate();
-
+
int retval = (success ? 0 : 1);
return retval;
+
+ //delete mycallback;
}
diff --git a/indra/test/test.h b/indra/test/test.h
index cee185140c..cee185140c 100755..100644
--- a/indra/test/test.h
+++ b/indra/test/test.h
diff --git a/indra/test/test_llmanifest.py b/indra/test/test_llmanifest.py
index e645c8891b..e645c8891b 100755..100644
--- a/indra/test/test_llmanifest.py
+++ b/indra/test/test_llmanifest.py