diff options
author | Johnathan Corgan | 2010-10-06 12:52:44 -0700 |
---|---|---|
committer | Johnathan Corgan | 2010-10-06 12:52:44 -0700 |
commit | 1c936ad101cbd7edf8e6b96bf3f993163a7dcc7b (patch) | |
tree | d118e6dd1ab5c59fcf0257d256843a047ad55e39 /gnuradio-core/src/lib | |
parent | 9ccd86714958fb2bd0cdc457745737f6d20efd7f (diff) | |
parent | 125433fe84507cc84e585c1e06bb804fdb2ce043 (diff) | |
download | gnuradio-1c936ad101cbd7edf8e6b96bf3f993163a7dcc7b.tar.gz gnuradio-1c936ad101cbd7edf8e6b96bf3f993163a7dcc7b.tar.bz2 gnuradio-1c936ad101cbd7edf8e6b96bf3f993163a7dcc7b.zip |
Merge branch 'master' into next
* master:
Fixed setting of USB_LIBS for *win*
Fix so that non-Darwin OSs use USB_LIBS correctly for linking
New way of checking for various LIBUSB names; for legacy version, make sure the symbol 'usb_debug' exists (so-as to not use the 'compat' version).
Finally, the simple fix for the qtgui issues; also, changed the naming scheme output from _moc to .moc files because I think this looks cleaner.
Removing Waterfall3DPlot. The qwt_plot3d is too much of a hassle to deal with and the plotting is not that stable even when it does work. This does not change the API.
Fixed gitignore to reflect changes in moc/ui file naming.
Fixes a lot of warnings by cleaning up namespace issues.
Finally, the simple fix for the qtgui issues; also, changed the naming scheme output from _moc to .moc files because I think this looks cleaner.
Removing qwtplot3d dependency and fixing a missed include in waterfallGlobalData.h.
Removing Waterfall3DPlot. The qwt_plot3d is too much of a hassle to deal with and the plotting is not that stable even when it does work. This does not change the API.
Updating all of the QA code that I can actually test to work with the new XML output runners.
Updating all python QA programs in gnuradio-core to output XML files.
Adding gr_xmlrunner.py to Makefile.
Adding XML output to Python unittests.
Modified gcell and gr-atsc cppunit tests to output XML files, too. Gcell needs testing.
Moving XML output files from cppunit tests to $HOME/.gnuradio/unittests.
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/src/lib')
-rw-r--r-- | gnuradio-core/src/lib/runtime/Makefile.am | 1 | ||||
-rw-r--r-- | gnuradio-core/src/lib/runtime/gr_unittests.h | 70 |
2 files changed, 71 insertions, 0 deletions
diff --git a/gnuradio-core/src/lib/runtime/Makefile.am b/gnuradio-core/src/lib/runtime/Makefile.am index b0e804277..abd789a1d 100644 --- a/gnuradio-core/src/lib/runtime/Makefile.am +++ b/gnuradio-core/src/lib/runtime/Makefile.am @@ -120,6 +120,7 @@ grinclude_HEADERS = \ gr_timer.h \ gr_tmp_path.h \ gr_types.h \ + gr_unittests.h \ gr_vmcircbuf.h noinst_HEADERS = \ diff --git a/gnuradio-core/src/lib/runtime/gr_unittests.h b/gnuradio-core/src/lib/runtime/gr_unittests.h new file mode 100644 index 000000000..680e59ca4 --- /dev/null +++ b/gnuradio-core/src/lib/runtime/gr_unittests.h @@ -0,0 +1,70 @@ +/* -*- c++ -*- */ +/* + * Copyright 2010 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <unistd.h> + + +#ifdef MKDIR_TAKES_ONE_ARG +#define gr_mkdir(pathname, mode) mkdir(pathname) +#else +#define gr_mkdir(pathname, mode) mkdir((pathname), (mode)) +#endif + +/* + * Mostly taken from gr_preferences.cc/h + * The simplest thing that could possibly work: + * the key is the filename; the value is the file contents. + */ + +static void +ensure_unittest_path (const char *grpath, const char *path) +{ + struct stat statbuf; + if (stat (path, &statbuf) == 0 && S_ISDIR (statbuf.st_mode)) + return; + + // blindly try to make it // FIXME make this robust. C++ SUCKS! + gr_mkdir (grpath, 0750); + gr_mkdir (path, 0750); +} + +static void +get_unittest_path (const char *filename, char *fullpath, size_t pathsize) +{ + char path[200]; + char grpath[200]; + snprintf (grpath, sizeof(grpath), "%s/.gnuradio", getenv ("HOME")); + snprintf (path, sizeof(path), "%s/unittests", grpath); + snprintf (fullpath, pathsize, "%s/%s", path, filename); + + ensure_unittest_path(grpath, path); +} + |