Adding an XML outputter for the CPP Unit tests. This is to a) store the output inform...
authorTom Rondeau <trondeau@vt.edu>
Thu, 30 Sep 2010 20:08:53 +0000 (16:08 -0400)
committerTom Rondeau <trondeau@vt.edu>
Thu, 30 Sep 2010 20:08:53 +0000 (16:08 -0400)
gnuradio-core/src/tests/test_all.cc
gnuradio-core/src/tests/test_filter.cc
gnuradio-core/src/tests/test_general.cc
gnuradio-core/src/tests/test_runtime.cc
gruel/src/lib/test_gruel.cc

index 6dc1a26f833c7f579ae877abc1b994e26dcfbccb..35bc0a049e710fc46000cb3219d7b27a920eda8c 100644 (file)
@@ -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);
 
index 56e94523860df78abcbaf5d6d618729737b7b781..1e67b71801fbe0a4b302f9c56a89092be91389fd 100644 (file)
@@ -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);
 
index 063e2ee45caadb6d70e32566063a3724be2a7097..bc89c0b6b276df63613d72d200c387b3f25c724c 100644 (file)
@@ -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
  * 
  */
 
 #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);
 
index 8549f2a9b8ca4a32b472d6dc9b458b32aa0b3763..1efd9a0c0ef6d05767bbbdb8488056e79600af9c 100644 (file)
@@ -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);
 
index 669303447c6d5dad78831d363a495f5f33b40710..cb5f2d36bc2f7d624a4f4077b528690b591981c0 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2006,2009 Free Software Foundation, Inc.
+ * Copyright 2006,2009,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 "pmt/qa_pmt.h"
 
 int 
@@ -28,8 +29,11 @@ main(int argc, char **argv)
 {
   
   CppUnit::TextTestRunner      runner;
+  std::ofstream xmlfile("cppunit_gruel.xml");
+  CppUnit::XmlOutputter *xmlout = new CppUnit::XmlOutputter(&runner.result(), xmlfile);
 
   runner.addTest(qa_pmt::suite ());
+  runner.setOutputter(xmlout);
   
   bool was_successful = runner.run("", false);