I have the following code that I am using to regression test part of my
library. The project uses automake and autoconf to build the Makefiles
then runs the tests via 'make check'. I would like to see all the test
result output written as XML files in the directory where the test files
reside. That way I can use a script to gather them up and craft a web
page off of them.
My question: How to redirect Boost Test output to an XML file?
I see I can use --log_format=XML to make an XML file but not quite sure
how to incorporate that into automake and autoconf.
Stephen
----------------------------------------
#include "Elf_arc_utils.h"
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE Suites
#include
#include <string>
BOOST_AUTO_TEST_SUITE(getType)
BOOST_AUTO_TEST_CASE(getTypeMin)
{
using namespace libreverse::elf_module;
BOOST_TEST_CHECKPOINT("getType minimum case");
std::string result = arc::ElfArcUtils::getType(arc::E_ARC_MACH_ARC5);
BOOST_CHECK_EQUAL ( result, "R_ARC_NONE");
}
BOOST_AUTO_TEST_CASE(getTypeMax)
{
using namespace libreverse::elf_module;
std::string result = arc::ElfArcUtils::getType(arc::E_ARC_MACH_ARC8);
BOOST_CHECK_EQUAL ( result, "R_ARC_B22_PCREL");
}
BOOST_AUTO_TEST_CASE(expectedUnknown)
{
using namespace libreverse::elf_module;
std::string result = arc::ElfArcUtils::getType(4);
BOOST_CHECK_EQUAL ( result, "unknown");
}
BOOST_AUTO_TEST_CASE(negativeValue)
{
using namespace libreverse::elf_module;
std::string result = arc::ElfArcUtils::getType(-1);
BOOST_CHECK_EQUAL ( result, "unknown");
}
BOOST_AUTO_TEST_SUITE_END()