summaryrefslogtreecommitdiff
path: root/gnuradio-core
diff options
context:
space:
mode:
authorTom Rondeau2010-09-30 16:08:53 -0400
committerTom Rondeau2010-09-30 16:08:53 -0400
commit036a42c08eadbd0a2c462ca61d9d883996be8042 (patch)
treed81b162793427d25fd190da528afb8207be3ca88 /gnuradio-core
parentc81312cee781a6912eb87f430096f3757e056b28 (diff)
downloadgnuradio-036a42c08eadbd0a2c462ca61d9d883996be8042.tar.gz
gnuradio-036a42c08eadbd0a2c462ca61d9d883996be8042.tar.bz2
gnuradio-036a42c08eadbd0a2c462ca61d9d883996be8042.zip
Adding an XML outputter for the CPP Unit tests. This is to a) store the output information but also b) for integration with Hudson for logging and displaying the results during the build stages. This only covers a few cases so far and I need to define a better place to save the output files.
Diffstat (limited to 'gnuradio-core')
-rw-r--r--gnuradio-core/src/tests/test_all.cc6
-rw-r--r--gnuradio-core/src/tests/test_filter.cc6
-rw-r--r--gnuradio-core/src/tests/test_general.cc10
-rw-r--r--gnuradio-core/src/tests/test_runtime.cc6
4 files changed, 22 insertions, 6 deletions
diff --git a/gnuradio-core/src/tests/test_all.cc b/gnuradio-core/src/tests/test_all.cc
index 6dc1a26f8..35bc0a049 100644
--- a/gnuradio-core/src/tests/test_all.cc
+++ b/gnuradio-core/src/tests/test_all.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2002 Free Software Foundation, Inc.
+ * Copyright 2002,2010 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -21,6 +21,7 @@
*/
#include <cppunit/TextTestRunner.h>
+#include <cppunit/XmlOutputter.h>
#include <qa_runtime.h>
#include <qa_general.h>
@@ -34,11 +35,14 @@ main (int argc, char **argv)
{
CppUnit::TextTestRunner runner;
+ std::ofstream xmlfile("cppunit_test_all.xml");
+ CppUnit::XmlOutputter *xmlout = new CppUnit::XmlOutputter(&runner.result(), xmlfile);
runner.addTest (qa_runtime::suite ());
runner.addTest (qa_general::suite ());
runner.addTest (qa_filter::suite ());
// runner.addTest (qa_atsc::suite ());
+ runner.setOutputter(xmlout);
bool was_successful = runner.run ("", false);
diff --git a/gnuradio-core/src/tests/test_filter.cc b/gnuradio-core/src/tests/test_filter.cc
index 56e945238..1e67b7180 100644
--- a/gnuradio-core/src/tests/test_filter.cc
+++ b/gnuradio-core/src/tests/test_filter.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2002 Free Software Foundation, Inc.
+ * Copyright 2002,2010 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -21,6 +21,7 @@
*/
#include <cppunit/TextTestRunner.h>
+#include <cppunit/XmlOutputter.h>
#include <qa_filter.h>
int
@@ -28,8 +29,11 @@ main (int argc, char **argv)
{
CppUnit::TextTestRunner runner;
+ std::ofstream xmlfile("cppunit_test_filter.xml");
+ CppUnit::XmlOutputter *xmlout = new CppUnit::XmlOutputter(&runner.result(), xmlfile);
runner.addTest (qa_filter::suite ());
+ runner.setOutputter(xmlout);
bool was_successful = runner.run ("", false);
diff --git a/gnuradio-core/src/tests/test_general.cc b/gnuradio-core/src/tests/test_general.cc
index 063e2ee45..bc89c0b6b 100644
--- a/gnuradio-core/src/tests/test_general.cc
+++ b/gnuradio-core/src/tests/test_general.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2002 Free Software Foundation, Inc.
+ * Copyright 2002,2010 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -21,15 +21,19 @@
*/
#include <cppunit/TextTestRunner.h>
+#include <cppunit/XmlOutputter.h>
#include <qa_general.h>
int
main (int argc, char **argv)
{
-
- CppUnit::TextTestRunner runner;
+ CppUnit::TextTestRunner runner;
+
+ std::ofstream xmlfile("cppunit_test_general.xml");
+ CppUnit::XmlOutputter *xmlout = new CppUnit::XmlOutputter(&runner.result(), xmlfile);
runner.addTest (qa_general::suite ());
+ runner.setOutputter(xmlout);
bool was_successful = runner.run ("", false);
diff --git a/gnuradio-core/src/tests/test_runtime.cc b/gnuradio-core/src/tests/test_runtime.cc
index 8549f2a9b..1efd9a0c0 100644
--- a/gnuradio-core/src/tests/test_runtime.cc
+++ b/gnuradio-core/src/tests/test_runtime.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2002 Free Software Foundation, Inc.
+ * Copyright 2002,2010 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -21,6 +21,7 @@
*/
#include <cppunit/TextTestRunner.h>
+#include <cppunit/XmlOutputter.h>
#include <qa_runtime.h>
int
@@ -28,8 +29,11 @@ main (int argc, char **argv)
{
CppUnit::TextTestRunner runner;
+ std::ofstream xmlfile("cppunit_test_runtime.xml");
+ CppUnit::XmlOutputter *xmlout = new CppUnit::XmlOutputter(&runner.result(), xmlfile);
runner.addTest (qa_runtime::suite ());
+ runner.setOutputter(xmlout);
bool was_successful = runner.run ("", false);