Modified gcell and gr-atsc cppunit tests to output XML files, too. Gcell needs testing.
authorTom Rondeau <trondeau@vt.edu>
Sat, 2 Oct 2010 21:35:16 +0000 (17:35 -0400)
committerTom Rondeau <trondeau@vt.edu>
Sat, 2 Oct 2010 21:35:16 +0000 (17:35 -0400)
gcell/apps/test_all.cc
gr-atsc/src/lib/test_atsci.cc

index 9823960c4757a87ae28448d40cc9110d4fb3156f..0b608e13b90ae8e913806588d858d3753af81c1f 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2010 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
  */
 
 #include <cppunit/TextTestRunner.h>
+#include <cppunit/XmlOutputter.h>
 
+#include <gr_unittests.h>
 #include "../lib/runtime/qa_gcell_runtime.h"
 #include "../lib/wrapper/qa_gcell_wrapper.h"
 
 int 
 main(int argc, char **argv)
 {
-  
-  CppUnit::TextTestRunner      runner;
+  char path[200];
+  get_unittest_path ("gcell_all.xml", path, 200);
+
+  CppUnit::TextTestRunner runner;
+  std::ofstream xmlfile(path);
+  CppUnit::XmlOutputter *xmlout = new CppUnit::XmlOutputter(&runner.result(), xmlfile);
 
   runner.addTest(qa_gcell_runtime::suite());
   runner.addTest(qa_gcell_wrapper::suite());
+  runner.setOutputter(xmlout);
   
   bool was_successful = runner.run("", false);
 
index 5267e0d4fe5cd9e20c5255d39c92bbcf4fcebe45..184895a90d35333f6a29e11283beb64f7709ea54 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2002,2006 Free Software Foundation, Inc.
+ * Copyright 2002,2006,2010 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
  * Boston, MA 02110-1301, USA.
  */
 
+#include <gr_unittests.h>
 #include <cppunit/TextTestRunner.h>
+#include <cppunit/XmlOutputter.h>
 #include <qa_atsci.h>
 
 int 
 main (int argc, char **argv)
 {
-  
-  CppUnit::TextTestRunner      runner;
+  char path[200];
+  get_unittest_path ("gr_atsc.xml", path, 200);
+
+  CppUnit::TextTestRunner runner;
+  std::ofstream xmlfile(path);
+  CppUnit::XmlOutputter *xmlout = new CppUnit::XmlOutputter(&runner.result(), xmlfile);
 
   runner.addTest (qa_atsc::suite ());
+  runner.setOutputter(xmlout);
   
   bool was_successful = runner.run ("", false);