summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-06-10 17:56:53 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-06-10 18:13:11 (GMT)
commita17bb9f842aca9ad9b414237ad576aa7a887349e (patch)
tree08ed44da292d4ff82def9f0b135a17e20536b7b8 /Swiften
parente2f5588d089e4d2148762ea092e032976254a467 (diff)
downloadswift-a17bb9f842aca9ad9b414237ad576aa7a887349e.zip
swift-a17bb9f842aca9ad9b414237ad576aa7a887349e.tar.bz2
Moved Swiften/QA/UnitTest to QA/UnitTest.
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/Makefile.inc1
-rw-r--r--Swiften/QA/Makefile.inc9
-rw-r--r--Swiften/QA/NetworkTest/Makefile.inc2
-rw-r--r--Swiften/QA/UnitTest/Makefile.inc17
-rw-r--r--Swiften/QA/UnitTest/checker.cpp16
-rw-r--r--Swiften/QA/UnitTest/template/FooTest.cpp24
-rw-r--r--Swiften/QA/valgrind.supp51
7 files changed, 2 insertions, 118 deletions
diff --git a/Swiften/Makefile.inc b/Swiften/Makefile.inc
index bb93bf8..12323db 100644
--- a/Swiften/Makefile.inc
+++ b/Swiften/Makefile.inc
@@ -42,4 +42,5 @@ lib: $(SWIFTEN_TARGET)
$(SWIFTEN_TARGET): $(SWIFTEN_OBJECTS)
$(QUIET_AR)$(AR) $(ARFLAGS) $@ $(SWIFTEN_OBJECTS)
+include Swiften/QA/Makefile.inc
include Swiften/Examples/Makefile.inc
diff --git a/Swiften/QA/Makefile.inc b/Swiften/QA/Makefile.inc
index dc3a0bf..831b443 100644
--- a/Swiften/QA/Makefile.inc
+++ b/Swiften/QA/Makefile.inc
@@ -1,11 +1,2 @@
-ifdef USE_VALGRIND
-# Not enabled: --show-reachable=yes
-TEST_RUNNER=valgrind --suppressions=Swiften/QA/valgrind.supp -q --leak-check=full --track-origins=yes
-endif
-
-include Swiften/QA/UnitTest/Makefile.inc
include Swiften/QA/NetworkTest/Makefile.inc
include Swiften/QA/ClientTest/Makefile.inc
-
-.PHONY: test
-test: $(TEST_TARGETS)
diff --git a/Swiften/QA/NetworkTest/Makefile.inc b/Swiften/QA/NetworkTest/Makefile.inc
index 3638f2f..055937b 100644
--- a/Swiften/QA/NetworkTest/Makefile.inc
+++ b/Swiften/QA/NetworkTest/Makefile.inc
@@ -2,7 +2,7 @@ NETWORKTEST_TARGET += Swiften/QA/NetworkTest/checker
NETWORKTEST_SOURCES += \
Swiften/QA/NetworkTest/DomainNameResolverTest.cpp \
Swiften/QA/NetworkTest/BoostConnectionTest.cpp \
- Swiften/QA/UnitTest/checker.cpp
+ QA/UnitTest/checker.cpp
NETWORKTEST_OBJECTS = \
$(NETWORKTEST_SOURCES:.cpp=.o)
diff --git a/Swiften/QA/UnitTest/Makefile.inc b/Swiften/QA/UnitTest/Makefile.inc
deleted file mode 100644
index 5bdbec9..0000000
--- a/Swiften/QA/UnitTest/Makefile.inc
+++ /dev/null
@@ -1,17 +0,0 @@
-UNITTEST_TARGET = Swiften/QA/UnitTest/checker
-UNITTEST_SOURCES += \
- Swiften/QA/UnitTest/checker.cpp
-UNITTEST_OBJECTS = \
- $(UNITTEST_SOURCES:.cpp=.o)
-
-TEST_TARGETS += check
-
-CLEANFILES += $(UNITTEST_OBJECTS) $(UNITTEST_TARGET)
-
-.PHONY: check
-check: $(UNITTEST_TARGET)
- $(TEST_RUNNER) ./$(UNITTEST_TARGET)
-
-$(UNITTEST_TARGET): $(CPPUNIT_TARGET) $(UNITTEST_OBJECTS) $(UNITTEST_LIBS) $(BUNDLED_LIBS)
- $(QUIET_LINK)$(CXX) -o $(UNITTEST_TARGET) $(UNITTEST_OBJECTS) $(LDFLAGS) $(CPPUNIT_TARGET) $(UNITTEST_LIBS) $(BUNDLED_LIBS) $(LIBS)
-
diff --git a/Swiften/QA/UnitTest/checker.cpp b/Swiften/QA/UnitTest/checker.cpp
deleted file mode 100644
index ea4f0d9..0000000
--- a/Swiften/QA/UnitTest/checker.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <string>
-#include <cppunit/ui/text/TestRunner.h>
-#include <cppunit/extensions/TestFactoryRegistry.h>
-#include <cppunit/XmlOutputter.h>
-#include <cppunit/TextTestResult.h>
-
-int main(int argc, char* argv[])
-{
- CppUnit::TestFactoryRegistry& registry = CppUnit::TestFactoryRegistry::getRegistry();
- CppUnit::TextUi::TestRunner runner;
- runner.addTest( registry.makeTest() );
- if (argc >= 2 && std::string(argv[1]) != std::string("--xml")) {
- runner.setOutputter(new CppUnit::XmlOutputter(&runner.result(), std::cout));
- }
- return (runner.run("") ? 0 : 1);
-}
diff --git a/Swiften/QA/UnitTest/template/FooTest.cpp b/Swiften/QA/UnitTest/template/FooTest.cpp
deleted file mode 100644
index b6b9abf..0000000
--- a/Swiften/QA/UnitTest/template/FooTest.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-#include <cppunit/extensions/HelperMacros.h>
-#include <cppunit/extensions/TestFactoryRegistry.h>
-
-using namespace Swift;
-
-class FooTest : public CppUnit::TestFixture {
- CPPUNIT_TEST_SUITE(FooTest);
- CPPUNIT_TEST(testBar);
- CPPUNIT_TEST_SUITE_END();
-
- public:
- FooTest() {}
-
- void setUp() {
- }
-
- void tearDown() {
- }
-
- void testBar() {
- }
-};
-
-CPPUNIT_TEST_SUITE_REGISTRATION(FooTest);
diff --git a/Swiften/QA/valgrind.supp b/Swiften/QA/valgrind.supp
deleted file mode 100644
index 5e2ee00..0000000
--- a/Swiften/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
-}
-
-{
- <insert a suppression name here>
- Memcheck:Param
- socketcall.sendto(msg)
- fun:sendto
- fun:getaddrinfo
-}
-
-{
- <insert a suppression name here>
- Memcheck:Cond
- fun:BN_bin2bn
-}
-
-{
- <insert a suppression name here>
- Memcheck:Cond
- fun:BN_num_bits_word
-}
-
-{
- <insert a suppression name here>
- Memcheck:Value4
- fun:BN_mod_exp_mont_consttime
- fun:BN_mod_exp_mont
-}
-
-{
- <insert a suppression name here>
- Memcheck:Value4
- fun:BN_num_bits_word
- fun:BN_mod_exp_mont_consttime
- fun:BN_mod_exp_mont
-}