From 57368f1a3f7f2e92190d72328ff54eb452ba58ed Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Sat, 2 Oct 2010 17:35:16 -0400 Subject: [PATCH] Modified gcell and gr-atsc cppunit tests to output XML files, too. Gcell needs testing. --- gcell/apps/test_all.cc | 13 ++++++++++--- gr-atsc/src/lib/test_atsci.cc | 13 ++++++++++--- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/gcell/apps/test_all.cc b/gcell/apps/test_all.cc index 9823960c..0b608e13 100644 --- a/gcell/apps/test_all.cc +++ b/gcell/apps/test_all.cc @@ -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 * @@ -20,18 +20,25 @@ */ #include +#include +#include #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); diff --git a/gr-atsc/src/lib/test_atsci.cc b/gr-atsc/src/lib/test_atsci.cc index 5267e0d4..184895a9 100644 --- a/gr-atsc/src/lib/test_atsci.cc +++ b/gr-atsc/src/lib/test_atsci.cc @@ -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 * @@ -20,16 +20,23 @@ * Boston, MA 02110-1301, USA. */ +#include #include +#include #include 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); -- 2.30.2