From 5bc43e225db8cec9a0e32480616b217ba9d69f89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= Date: Sun, 28 Mar 2010 15:54:00 +0200 Subject: Moving QA to a separate module. diff --git a/.gitmodules b/.gitmodules index a61dcea..2223e7a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -34,3 +34,6 @@ [submodule "Swiften"] path = Swiften url = swift@swift.im:git/swiften-module.git +[submodule "QA"] + path = QA + url = swift@swift.im:git/qa-module.git diff --git a/QA b/QA new file mode 160000 index 0000000..2eb285e --- /dev/null +++ b/QA @@ -0,0 +1 @@ +Subproject commit 2eb285e3a51c2482fd51558289d58675a6fe5b7c diff --git a/QA/Checker/SConscript b/QA/Checker/SConscript deleted file mode 100644 index 7516bb9..0000000 --- a/QA/Checker/SConscript +++ /dev/null @@ -1,10 +0,0 @@ -Import("env") - -checker_env = env.Clone() -checker_env.MergeFlags(env["CPPUNIT_FLAGS"]) -checker_env.Library("Checker", "checker.cpp") -env["CHECKER_FLAGS"] = { - "LIBS": ["Checker"], - "LIBPATH": [Dir(".")], - "LINKFLAGS": ["/SUBSYSTEM:CONSOLE"] if env["PLATFORM"] == "win32" else [] - } diff --git a/QA/Checker/checker.cpp b/QA/Checker/checker.cpp deleted file mode 100644 index b59cea6..0000000 --- a/QA/Checker/checker.cpp +++ /dev/null @@ -1,73 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - -int main(int argc, char* argv[]) { - bool verbose = false; - bool outputXML = false; - - // Parse parameters - std::vector testsToRun; - for (int i = 1; i < argc; ++i) { - std::string param(argv[i]); - if (param == "--verbose") { - verbose = true; - } - else if (param == "--xml") { - outputXML = true; - } - else { - testsToRun.push_back(param); - } - } - if (testsToRun.empty()) { - testsToRun.push_back(""); - } - - // Set up the listeners - CppUnit::TestResult controller; - - CppUnit::TestResultCollector result; - controller.addListener(&result); - - CppUnit::TextTestProgressListener progressListener; - CppUnit::BriefTestProgressListener verboseListener; - if (!outputXML) { - if (verbose) { - controller.addListener(&verboseListener); - } - else { - controller.addListener(&progressListener); - } - } - - // Run the tests - CppUnit::TestRunner runner; - runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest()); - for (std::vector::const_iterator i = testsToRun.begin(); i != testsToRun.end(); ++i) { - try { - runner.run(controller, *i); - } - catch (const std::exception& e) { - std::cerr << "Error: " << e.what() << std::endl; - return -1; - } - } - - // Output the results - if (outputXML) { - CppUnit::XmlOutputter outputter(&result, std::cerr); - outputter.write(); - } - else { - CppUnit::TextOutputter outputter(&result, std::cerr); - outputter.write(); - } - - return result.wasSuccessful() ? 0 : 1; -} diff --git a/QA/UnitTest/SConscript b/QA/UnitTest/SConscript deleted file mode 100644 index a1d5a60..0000000 --- a/QA/UnitTest/SConscript +++ /dev/null @@ -1,26 +0,0 @@ -import os - -Import("env") - -myenv = env.Clone() -myenv.MergeFlags(env["CHECKER_FLAGS"]) -myenv.MergeFlags(env["SLIMBER_FLAGS"]) -myenv.MergeFlags(env["SWIFT_CONTROLLERS_FLAGS"]) -myenv.MergeFlags(env["SWIFTOOLS_FLAGS"]) -myenv.MergeFlags(env["SWIFTEN_FLAGS"]) -myenv.MergeFlags(env["CPPUNIT_FLAGS"]) -myenv.MergeFlags(env["LIBIDN_FLAGS"]) -myenv.MergeFlags(env["BOOST_FLAGS"]) -myenv.MergeFlags(env.get("SQLITE_FLAGS", "")) -myenv.MergeFlags(env.get("LIBXML_FLAGS", "")) -myenv.MergeFlags(env.get("EXPAT_FLAGS", "")) -myenv.MergeFlags(env["ZLIB_FLAGS"]) -if env.get("HAVE_LIBXML") : - myenv.Append(CPPDEFINES = ["HAVE_LIBXML"]) -if env.get("HAVE_EXPAT") : - myenv.Append(CPPDEFINES = ["HAVE_EXPAT"]) -checker = myenv.Program("checker", env["UNITTEST_SOURCES"]) -for i in ["HOME", "USERPROFILE", "APPDATA"]: - if os.environ.get(i, "") : - myenv["ENV"][i] = os.environ[i] -myenv.Test(checker) diff --git a/QA/UnitTest/template/FooTest.cpp b/QA/UnitTest/template/FooTest.cpp deleted file mode 100644 index 9657360..0000000 --- a/QA/UnitTest/template/FooTest.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#include -#include - -using namespace Swift; - -class FooTest : public CppUnit::TestFixture { - CPPUNIT_TEST_SUITE(FooTest); - CPPUNIT_TEST(testBar); - CPPUNIT_TEST_SUITE_END(); - - public: - void setUp() { - } - - void tearDown() { - } - - void testBar() { - } -}; - -CPPUNIT_TEST_SUITE_REGISTRATION(FooTest); diff --git a/QA/valgrind.supp b/QA/valgrind.supp deleted file mode 100644 index 5e2ee00..0000000 --- a/QA/valgrind.supp +++ /dev/null @@ -1,51 +0,0 @@ -{ - ZLib doesn't allocate its buffer. This is no bug according to the FAQ. - Memcheck:Cond - fun:longest_match - fun:deflate_slow - fun:deflate -} - -{ - Not sure why this happens. - Memcheck:Leak - fun:calloc - fun:_dl_allocate_tls - fun:pthread_create@@GLIBC_2.1 - fun:_ZN5boost6thread12start_threadEv -} - -{ - - Memcheck:Param - socketcall.sendto(msg) - fun:sendto - fun:getaddrinfo -} - -{ - - Memcheck:Cond - fun:BN_bin2bn -} - -{ - - Memcheck:Cond - fun:BN_num_bits_word -} - -{ - - Memcheck:Value4 - fun:BN_mod_exp_mont_consttime - fun:BN_mod_exp_mont -} - -{ - - Memcheck:Value4 - fun:BN_num_bits_word - fun:BN_mod_exp_mont_consttime - fun:BN_mod_exp_mont -} -- cgit v0.10.2-6-g49f6