diff --git a/.gitignore b/.gitignore index 114ace6b59f8d40aa84a87f9e555b3e395129aeb..c33629eade094822b0c74c20a95c469e46454a6a 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,5 @@ doc/* **/test-obj **/test-obj-release **/test-obj-debug + +**/CppUnitTestResults.xml diff --git a/alib2algo/makefile b/alib2algo/makefile index b3c532f9b48cd1798e9581788d79a17d2873e89a..8b7f1304bae52ec7f64e2e4e9c2f711833e09da0 100644 --- a/alib2algo/makefile +++ b/alib2algo/makefile @@ -211,10 +211,10 @@ unit-test-release: build-tests-release clean-debug: - $(RM) -r *.o *.d lib-debug obj-debug test-bin-debug test-obj-debug + $(RM) -r *.o *.d lib-debug obj-debug test-bin-debug test-obj-debug CppUnitTestResults.xml clean-release: - $(RM) -r *.o *.d lib-release obj-release test-bin-release test-obj-release + $(RM) -r *.o *.d lib-release obj-release test-bin-release test-obj-release CppUnitTestResults.xml diff --git a/alib2algo/test-src/main.cpp b/alib2algo/test-src/main.cpp index 1b3e03225779c209b81d8dfd664d46199dfaba7b..2d574dd5c475fa7d903396ab24654b2cc90f2cb3 100644 --- a/alib2algo/test-src/main.cpp +++ b/alib2algo/test-src/main.cpp @@ -4,6 +4,7 @@ #include <cppunit/ui/text/TestRunner.h> #include <cppunit/TestResultCollector.h> #include <cppunit/TestResult.h> +#include <cppunit/XmlOutputter.h> #include <cppunit/Test.h> #include <cppunit/TestFailure.h> @@ -116,5 +117,9 @@ int main(int , char*[]) progressListener.printResults(); + std::ofstream xmlFileResults("CppUnitTestResults.xml"); + CppUnit::XmlOutputter xmlOut(&result, xmlFileResults); + xmlOut.write(); + return progressListener.getResult(); } diff --git a/alib2data/makefile b/alib2data/makefile index 9eb63cd1a4d3fa54c5f3835dee8e36512a3b52a2..004ebccf8328639e55f158fc8d31fe09e41159fb 100644 --- a/alib2data/makefile +++ b/alib2data/makefile @@ -209,10 +209,10 @@ unit-test-release: build-tests-release clean-debug: - $(RM) -r *.o *.d lib-debug obj-debug test-bin-debug test-obj-debug + $(RM) -r *.o *.d lib-debug obj-debug test-bin-debug test-obj-debug CppUnitTestResults.xml clean-release: - $(RM) -r *.o *.d lib-release obj-release test-bin-release test-obj-release + $(RM) -r *.o *.d lib-release obj-release test-bin-release test-obj-release CppUnitTestResults.xml diff --git a/alib2data/test-src/main.cpp b/alib2data/test-src/main.cpp index e31754f2d5e37d6486f32a90774562a28eabe220..698cd0fc74ca3bc651d37ec62e372c8fa7802efa 100644 --- a/alib2data/test-src/main.cpp +++ b/alib2data/test-src/main.cpp @@ -4,6 +4,7 @@ #include <cppunit/ui/text/TestRunner.h> #include <cppunit/TestResultCollector.h> #include <cppunit/TestResult.h> +#include <cppunit/XmlOutputter.h> #include <cppunit/Test.h> #include <cppunit/TestFailure.h> @@ -115,5 +116,9 @@ int main(int , char*[]) progressListener.printResults(); + std::ofstream xmlFileResults("CppUnitTestResults.xml"); + CppUnit::XmlOutputter xmlOut(&result, xmlFileResults); + xmlOut.write(); + return progressListener.getResult(); }