summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'gnuradio-core/src/tests')
-rw-r--r--gnuradio-core/src/tests/CMakeLists.txt66
-rw-r--r--gnuradio-core/src/tests/benchmark_nco.cc220
-rw-r--r--gnuradio-core/src/tests/benchmark_vco.cc167
-rw-r--r--gnuradio-core/src/tests/nco_results48
-rw-r--r--gnuradio-core/src/tests/test_all.cc44
-rw-r--r--gnuradio-core/src/tests/test_atsc.cc42
-rwxr-xr-xgnuradio-core/src/tests/test_buffers.py142
-rw-r--r--gnuradio-core/src/tests/test_general.cc42
-rw-r--r--gnuradio-core/src/tests/test_vmcircbuf.cc44
9 files changed, 0 insertions, 815 deletions
diff --git a/gnuradio-core/src/tests/CMakeLists.txt b/gnuradio-core/src/tests/CMakeLists.txt
deleted file mode 100644
index 7723680dd9..0000000000
--- a/gnuradio-core/src/tests/CMakeLists.txt
+++ /dev/null
@@ -1,66 +0,0 @@
-# Copyright 2010-2012 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.
-
-########################################################################
-include(GrMiscUtils) #check n def
-GR_CHECK_HDR_N_DEF(sys/resource.h HAVE_SYS_RESOURCE_H)
-
-########################################################################
-# Setup the include and linker paths
-########################################################################
-include_directories(
- ${GNURADIO_CORE_INCLUDE_DIRS}
- ${GRUEL_INCLUDE_DIRS}
- ${Boost_INCLUDE_DIRS}
- ${CPPUNIT_INCLUDE_DIRS}
-)
-
-link_directories(
- ${Boost_LIBRARY_DIRS}
- ${CPPUNIT_LIBRARY_DIRS}
-)
-
-include_directories(${LOG4CPP_INCLUDE_DIRS})
-link_directories(${LOG4CPP_LIBRARY_DIRS})
-
-########################################################################
-# Build benchmarks and non-registered tests
-########################################################################
-set(tests_not_run #single source per test
- benchmark_nco.cc
- benchmark_vco.cc
- test_general.cc
- test_vmcircbuf.cc
-)
-
-foreach(test_not_run_src ${tests_not_run})
- get_filename_component(name ${test_not_run_src} NAME_WE)
- add_executable(${name} ${test_not_run_src})
- target_link_libraries(${name} test-gnuradio-core)
-endforeach(test_not_run_src)
-
-########################################################################
-# Build the test-all test to end all tests
-# Set the test environment so the build libs will be found under MSVC.
-########################################################################
-include(GrTest)
-list(APPEND GR_TEST_TARGET_DEPS test-gnuradio-core)
-add_executable(gr_core_test_all test_all.cc)
-target_link_libraries(gr_core_test_all test-gnuradio-core)
-GR_ADD_TEST(gr-core-test-all gr_core_test_all)
diff --git a/gnuradio-core/src/tests/benchmark_nco.cc b/gnuradio-core/src/tests/benchmark_nco.cc
deleted file mode 100644
index 20d53e410f..0000000000
--- a/gnuradio-core/src/tests/benchmark_nco.cc
+++ /dev/null
@@ -1,220 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2002,2004 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 <sys/time.h>
-#ifdef HAVE_SYS_RESOURCE_H
-#include <sys/resource.h>
-#endif
-#include <unistd.h>
-#include <gr_nco.h>
-#include <gr_fxpt_nco.h>
-#include <string.h>
-
-#define ITERATIONS 20000000
-#define BLOCK_SIZE (10 * 1000) // fits in cache
-
-#define FREQ 5003.123
-
-static double
-timeval_to_double (const struct timeval *tv)
-{
- return (double) tv->tv_sec + (double) tv->tv_usec * 1e-6;
-}
-
-
-static void
-benchmark (void test (float *x, float *y), const char *implementation_name)
-{
-#ifdef HAVE_SYS_RESOURCE_H
- struct rusage rusage_start;
- struct rusage rusage_stop;
-#else
- double clock_start;
- double clock_end;
-#endif
- float output[2*BLOCK_SIZE];
- float *x = &output[0], *y = &output[BLOCK_SIZE];
-
- // touch memory
- memset(output, 0, 2*BLOCK_SIZE*sizeof(float));
-
- // get starting CPU usage
-#ifdef HAVE_SYS_RESOURCE_H
- if (getrusage (RUSAGE_SELF, &rusage_start) < 0){
- perror ("getrusage");
- exit (1);
- }
-#else
- clock_start = (double) clock() * (1000000. / CLOCKS_PER_SEC);
-#endif
- // do the actual work
-
- test (x, y);
-
- // get ending CPU usage
-
-#ifdef HAVE_SYS_RESOURCE_H
- if (getrusage (RUSAGE_SELF, &rusage_stop) < 0){
- perror ("getrusage");
- exit (1);
- }
-
- // compute results
-
- double user =
- timeval_to_double (&rusage_stop.ru_utime)
- - timeval_to_double (&rusage_start.ru_utime);
-
- double sys =
- timeval_to_double (&rusage_stop.ru_stime)
- - timeval_to_double (&rusage_start.ru_stime);
-
- double total = user + sys;
-#else
- clock_end = (double) clock () * (1000000. / CLOCKS_PER_SEC);
- double total = clock_end - clock_start;
-#endif
-
- printf ("%18s: cpu: %6.3f steps/sec: %10.3e\n",
- implementation_name, total, ITERATIONS / total);
-}
-
-// ----------------------------------------------------------------
-// Don't compare the _vec with other functions since memory store's
-// are involved.
-
-void basic_sincos_vec (float *x, float *y)
-{
- gr_nco<float,float> nco;
-
- nco.set_freq (2 * M_PI / FREQ);
-
- for (int i = 0; i < ITERATIONS/BLOCK_SIZE; i++){
- for (int j = 0; j < BLOCK_SIZE; j++){
- nco.sincos (&x[2*j+1], &x[2*j]);
- nco.step ();
- }
- }
-}
-
-void native_sincos_vec (float *x, float *y)
-{
- gr_nco<float,float> nco;
-
- nco.set_freq (2 * M_PI / FREQ);
-
- for (int i = 0; i < ITERATIONS/BLOCK_SIZE; i++){
- nco.sincos ((gr_complex*)x, BLOCK_SIZE);
- }
-}
-
-void fxpt_sincos_vec (float *x, float *y)
-{
- gr_fxpt_nco nco;
-
- nco.set_freq (2 * M_PI / FREQ);
-
- for (int i = 0; i < ITERATIONS/BLOCK_SIZE; i++){
- nco.sincos ((gr_complex*)x, BLOCK_SIZE);
- }
-}
-
-// ----------------------------------------------------------------
-
-void native_sincos (float *x, float *y)
-{
- gr_nco<float,float> nco;
-
- nco.set_freq (2 * M_PI / FREQ);
-
- for (int i = 0; i < ITERATIONS; i++){
- nco.sincos (x, y);
- nco.step ();
- }
-}
-
-void fxpt_sincos (float *x, float *y)
-{
- gr_fxpt_nco nco;
-
- nco.set_freq (2 * M_PI / FREQ);
-
- for (int i = 0; i < ITERATIONS; i++){
- nco.sincos (x, y);
- nco.step ();
- }
-}
-
-// ----------------------------------------------------------------
-
-void native_sin (float *x, float *y)
-{
- gr_nco<float,float> nco;
-
- nco.set_freq (2 * M_PI / FREQ);
-
- for (int i = 0; i < ITERATIONS; i++){
- *x = nco.sin ();
- nco.step ();
- }
-}
-
-void fxpt_sin (float *x, float *y)
-{
- gr_fxpt_nco nco;
-
- nco.set_freq (2 * M_PI / FREQ);
-
- for (int i = 0; i < ITERATIONS; i++){
- *x = nco.sin ();
- nco.step ();
- }
-}
-
-// ----------------------------------------------------------------
-
-void nop_fct (float *x, float *y)
-{
-}
-
-void nop_loop (float *x, float *y)
-{
- for (int i = 0; i < ITERATIONS; i++){
- nop_fct (x, y);
- }
-}
-
-int
-main (int argc, char **argv)
-{
- benchmark (nop_loop, "nop loop");
- benchmark (native_sin, "native sine");
- benchmark (fxpt_sin, "fxpt sine");
- benchmark (native_sincos, "native sin/cos");
- benchmark (fxpt_sincos, "fxpt sin/cos");
- benchmark (basic_sincos_vec, "basic sin/cos vec");
- benchmark (native_sincos_vec, "native sin/cos vec");
- benchmark (fxpt_sincos_vec, "fxpt sin/cos vec");
-}
diff --git a/gnuradio-core/src/tests/benchmark_vco.cc b/gnuradio-core/src/tests/benchmark_vco.cc
deleted file mode 100644
index 3a6ade78c9..0000000000
--- a/gnuradio-core/src/tests/benchmark_vco.cc
+++ /dev/null
@@ -1,167 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2002,2004,2005 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 <sys/time.h>
-#ifdef HAVE_SYS_RESOURCE_H
-#include <sys/resource.h>
-#endif
-#include <unistd.h>
-#include <gr_vco.h>
-#include <gr_fxpt_vco.h>
-#include <string.h>
-
-#define ITERATIONS 5000000
-#define BLOCK_SIZE (10 * 1000) // fits in cache
-
-#define FREQ 5003.123
-#define K 4.9999999
-#define AMPLITUDE 2.444444444
-
-
-static double
-timeval_to_double (const struct timeval *tv)
-{
- return (double) tv->tv_sec + (double) tv->tv_usec * 1e-6;
-}
-
-
-static void
-benchmark (void test (float *x, const float *y), const char *implementation_name)
-{
-#ifdef HAVE_SYS_RESOURCE_H
- struct rusage rusage_start;
- struct rusage rusage_stop;
-#else
- double clock_start;
- double clock_end;
-#endif
- float output[BLOCK_SIZE];
- float input[BLOCK_SIZE];
-
- // touch memory
- memset(output, 0, BLOCK_SIZE*sizeof(float));
- for (int i = 0; i<BLOCK_SIZE; i++)
- input[i] = sin(double(i));
-
- // get starting CPU usage
-#ifdef HAVE_SYS_RESOURCE_H
- if (getrusage (RUSAGE_SELF, &rusage_start) < 0){
- perror ("getrusage");
- exit (1);
- }
-#else
- clock_start = (double) clock() * (1000000. / CLOCKS_PER_SEC);
-#endif
- // do the actual work
-
- test (output, input);
-
- // get ending CPU usage
-
-#ifdef HAVE_SYS_RESOURCE_H
- if (getrusage (RUSAGE_SELF, &rusage_stop) < 0){
- perror ("getrusage");
- exit (1);
- }
-
- // compute results
-
- double user =
- timeval_to_double (&rusage_stop.ru_utime)
- - timeval_to_double (&rusage_start.ru_utime);
-
- double sys =
- timeval_to_double (&rusage_stop.ru_stime)
- - timeval_to_double (&rusage_start.ru_stime);
-
- double total = user + sys;
-#else
- clock_end = (double) clock () * (1000000. / CLOCKS_PER_SEC);
- double total = clock_end - clock_start;
-#endif
-
- printf ("%18s: cpu: %6.3f steps/sec: %10.3e\n",
- implementation_name, total, ITERATIONS / total);
-}
-
-// ----------------------------------------------------------------
-
-void basic_vco (float *output, const float *input)
-{
- double phase = 0;
-
- for (int j = 0; j < ITERATIONS/BLOCK_SIZE; j++){
- for (int i = 0; i < BLOCK_SIZE; i++){
- output[i] = cos(phase) * AMPLITUDE;
- phase += input[i] * K;
-
- while (phase > 2 * M_PI)
- phase -= 2 * M_PI;
-
- while (phase < -2 * M_PI)
- phase += 2 * M_PI;
- }
- }
-}
-
-void native_vco (float *output, const float *input)
-{
- gr_vco<float,float> vco;
-
- for (int j = 0; j < ITERATIONS/BLOCK_SIZE; j++){
- vco.cos(output, input, BLOCK_SIZE, K, AMPLITUDE);
- }
- }
-
-void fxpt_vco (float *output, const float *input)
-{
- gr_fxpt_vco vco;
-
- for (int j = 0; j < ITERATIONS/BLOCK_SIZE; j++){
- vco.cos(output, input, BLOCK_SIZE, K, AMPLITUDE);
- }
-}
-
-// ----------------------------------------------------------------
-
-void nop_fct (float *x, const float *y)
-{
-}
-
-void nop_loop (float *x, const float *y)
-{
- for (int i = 0; i < ITERATIONS; i++){
- nop_fct (x, y);
- }
-}
-
-int
-main (int argc, char **argv)
-{
- benchmark (nop_loop, "nop loop");
- benchmark (basic_vco, "basic vco");
- benchmark (native_vco, "native vco");
- benchmark (fxpt_vco, "fxpt vco");
-}
diff --git a/gnuradio-core/src/tests/nco_results b/gnuradio-core/src/tests/nco_results
deleted file mode 100644
index 5bdf5dd1cb..0000000000
--- a/gnuradio-core/src/tests/nco_results
+++ /dev/null
@@ -1,48 +0,0 @@
-================================================================
-These are on a 1.4 GHz Pentium M using g++ 3.4.1
-================================================================
-
-Default compiler options -O2
-
- nop loop: cpu: 0.015 steps/sec: 6.668e+08
- native sine: cpu: 0.900 steps/sec: 1.111e+07
- fxpt sine: cpu: 0.281 steps/sec: 3.559e+07
- native sin/cos: cpu: 1.138 steps/sec: 8.789e+06
- fxpt sin/cos: cpu: 0.550 steps/sec: 1.818e+07
-
--O2 -march=pentium-m -fomit-frame-pointer
-
- nop loop: cpu: 0.015 steps/sec: 6.668e+08
- native sine: cpu: 0.903 steps/sec: 1.108e+07
- fxpt sine: cpu: 0.271 steps/sec: 3.691e+07
- native sin/cos: cpu: 1.092 steps/sec: 9.159e+06
- fxpt sin/cos: cpu: 0.542 steps/sec: 1.845e+07
-
-Inlined fxpt::sin & cos
--O2 -march=pentium-m -fomit-frame-pointer
-
- nop loop: cpu: 0.015 steps/sec: 6.668e+08
- native sine: cpu: 0.904 steps/sec: 1.106e+07
- fxpt sine: cpu: 0.187 steps/sec: 5.348e+07
- native sin/cos: cpu: 1.091 steps/sec: 9.167e+06
- fxpt sin/cos: cpu: 0.373 steps/sec: 2.681e+07
-
-================================================================
-These are on a 1.5 GHz Athon MP 1800+
-================================================================
-
-Default compiler options: -O2
-
- nop loop: cpu: 0.013 steps/sec: 7.693e+08
- native sine: cpu: 0.733 steps/sec: 1.364e+07
- fxpt sine: cpu: 0.210 steps/sec: 4.763e+07
- native sin/cos: cpu: 1.183 steps/sec: 8.454e+06
- fxpt sin/cos: cpu: 0.420 steps/sec: 2.381e+07
-
--O2 -fomit-frame-pointer -march=athlon-mp
-
- nop loop: cpu: 0.013 steps/sec: 7.693e+08
- native sine: cpu: 0.679 steps/sec: 1.473e+07
- fxpt sine: cpu: 0.200 steps/sec: 5.001e+07
- native sin/cos: cpu: 1.147 steps/sec: 8.720e+06
- fxpt sin/cos: cpu: 0.444 steps/sec: 2.253e+07
diff --git a/gnuradio-core/src/tests/test_all.cc b/gnuradio-core/src/tests/test_all.cc
deleted file mode 100644
index f1fbce4e05..0000000000
--- a/gnuradio-core/src/tests/test_all.cc
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2002,2010,2011 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.
- */
-
-#include <cppunit/TextTestRunner.h>
-#include <cppunit/XmlOutputter.h>
-
-#include <gr_unittests.h>
-#include <qa_general.h>
-
-// FIXME add atsc back in.
-
-int
-main (int argc, char **argv)
-{
- CppUnit::TextTestRunner runner;
- std::ofstream xmlfile(get_unittest_path("gnuradio_core_all.xml").c_str());
- CppUnit::XmlOutputter *xmlout = new CppUnit::XmlOutputter(&runner.result(), xmlfile);
-
- runner.addTest (qa_general::suite ());
- runner.setOutputter(xmlout);
-
- bool was_successful = runner.run ("", false);
-
- return was_successful ? 0 : 1;
-}
diff --git a/gnuradio-core/src/tests/test_atsc.cc b/gnuradio-core/src/tests/test_atsc.cc
deleted file mode 100644
index d99bccce50..0000000000
--- a/gnuradio-core/src/tests/test_atsc.cc
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2002,2011 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.
- */
-
-#include <cppunit/TextTestRunner.h>
-#include <cppunit/XmlOutputter.h>
-
-#include <gr_unittests.h>
-#include <qa_atsc.h>
-
-int
-main (int argc, char **argv)
-{
- CppUnit::TextTestRunner runner;
- std::ofstream xmlfile(get_unittest_path("gnuradio_core_atsc.xml").c_str());
- CppUnit::XmlOutputter *xmlout = new CppUnit::XmlOutputter(&runner.result(), xmlfile);
-
- runner.addTest (qa_atsc::suite ());
- runner.setOutputter(xmlout);
-
- bool was_successful = runner.run ("", false);
-
- return was_successful ? 0 : 1;
-}
diff --git a/gnuradio-core/src/tests/test_buffers.py b/gnuradio-core/src/tests/test_buffers.py
deleted file mode 100755
index e0abb8b304..0000000000
--- a/gnuradio-core/src/tests/test_buffers.py
+++ /dev/null
@@ -1,142 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2006,2013 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.
-#
-
-from gnuradio import gr, gru
-from gnuradio import audio
-from gnuradio import blocks
-from gnuradio.eng_option import eng_option
-from optparse import OptionParser
-
-import time, math
-import sys
-
-def sig_source_f(samp_rate, freq, amp, N):
- t = map(lambda x: float(x)/samp_rate, xrange(N))
- y = map(lambda x: math.sin(2.*math.pi*freq*x), t)
- return y
-
-# Test script to test setting up the buffers using gr_test
-# For very large buffers it will fail when you hit the circbuf memory limit.
-# On linux this limit is shmmax, it will fail when it tries to create a buffer > shmmax.
-# With a 2.6 or later kernel you can set the shmmax limit manually in a root console
-#show current shmmax limit
-#$ cat /proc/sys/kernel/shmmax
-#33554432
-
-#set shmmax limit manually to 300MB
-#echo 300000000 >/proc/sys/kernel/shmmax
-
-#show new shmmax limit
-#$ cat /proc/sys/kernel/shmmax
-#300000000
-
-class my_graph(gr.top_block):
-
- def __init__(self, seconds,history,output_multiple):
- gr.top_block.__init__(self)
-
- parser = OptionParser(option_class=eng_option)
- parser.add_option("-O", "--audio-output", type="string", default="",
- help="pcm output device name. E.g., hw:0,0 or /dev/dsp")
- parser.add_option("-r", "--sample-rate", type="eng_float", default=48000,
- help="set sample rate to RATE (48000)")
- (options, args) = parser.parse_args ()
- if len(args) != 0:
- parser.print_help()
- raise SystemExit, 1
-
- sample_rate = int(options.sample_rate)
- ampl = 0.1
- nsamples=int(sample_rate * seconds) #1 seconds
-
- data = sig_source_f(sample_rate, 350, ampl, nsamples)
- src0 = blocks.vector_source_f(data)
-
- # gr.test (const std::string &name=std::string("gr_test"),
- # int min_inputs=1, int max_inputs=1, unsigned int sizeof_input_item=1,
- # int min_outputs=1, int max_outputs=1, unsigned int sizeof_output_item=1,
- # unsigned int history=1,unsigned int output_multiple=1,double relative_rate=1.0,
- # bool fixed_rate=true,gr_consume_type_t cons_type=CONSUME_NOUTPUT_ITEMS, gr_produce_type_t prod_type=PRODUCE_NOUTPUT_ITEMS);
- name="gr_test"
- min_inputs=1
- max_inputs=1
- sizeof_input_item=gr.sizeof_float
- min_outputs=1
- max_outputs=1
- sizeof_output_item=gr.sizeof_float
- #history=1 # problems start at 8150
- #output_multiple=1 #problems start at 8000 in combination with large history
- relative_rate=1.0
- fixed_rate=True
- consume_type=gr.CONSUME_NOUTPUT_ITEMS
- produce_type=gr.PRODUCE_NOUTPUT_ITEMS
- test = gr.test(name, min_inputs,max_inputs,sizeof_input_item,
- min_outputs,max_outputs,sizeof_output_item,
- history,output_multiple,relative_rate,
- fixed_rate, consume_type,produce_type)
- #test = gr.test("gr_test",1,1,gr.sizeof_float,
- # 1,1,gr.sizeof_float,
- # 1,1,1.0,
- # True, gr.CONSUME_NOUTPUT_ITEMS,gr.PRODUCE_NOUTPUT_ITEMS)
- #unsigned int history=1,unsigned int output_multiple=1,double relative_rate=1.0,
- #bool fixed_rate=false
- dst = audio.sink (sample_rate, options.audio_output)
-
- self.connect (src0,test,(dst, 0))
-
-
-if __name__ == '__main__':
-
- seconds=5.0
- output_multiple=1
- for history in (1,1000,8000,8100,8150,8175,8190,8191,8192,8193,8194,8195,9000,10000,100000,1000000,10000000): #,100000000):
- sys.stdout.flush()
- sys.stderr.flush()
- print 'Test with history=', history, 'output_multiple=',output_multiple
- sys.stdout.flush()
- sys.stderr.flush()
- succeed=True
- starttime=time.time()
- try:
- my_graph(seconds,history,output_multiple).run()
- except KeyboardInterrupt:
- pass
- except:
- print "\nAn exception has terminated the graph."
- exception=True
- succeed=False
- sys.stdout.flush()
- sys.stderr.flush()
- if succeed:
- print ''
- endtime=time.time()
- duration=endtime - starttime
- if (duration < 0.5*seconds) and (succeed):
- print "A problem has terminated the graph."
- succeed=False
- if (duration > 1.5*seconds) and (succeed):
- print "Something slowed the graph down considerably."
- succeed=False
-
- print 'The test result was:' , succeed
- print 'Test duration' , duration
- print ''
diff --git a/gnuradio-core/src/tests/test_general.cc b/gnuradio-core/src/tests/test_general.cc
deleted file mode 100644
index 32fac1b35a..0000000000
--- a/gnuradio-core/src/tests/test_general.cc
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2002,2010,2011 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.
- */
-
-#include <cppunit/TextTestRunner.h>
-#include <cppunit/XmlOutputter.h>
-
-#include <gr_unittests.h>
-#include <qa_general.h>
-
-int
-main (int argc, char **argv)
-{
- CppUnit::TextTestRunner runner;
- std::ofstream xmlfile(get_unittest_path("gnuradio_core_general.xml").c_str());
- CppUnit::XmlOutputter *xmlout = new CppUnit::XmlOutputter(&runner.result(), xmlfile);
-
- runner.addTest (qa_general::suite ());
- runner.setOutputter(xmlout);
-
- bool was_successful = runner.run ("", false);
-
- return was_successful ? 0 : 1;
-}
diff --git a/gnuradio-core/src/tests/test_vmcircbuf.cc b/gnuradio-core/src/tests/test_vmcircbuf.cc
deleted file mode 100644
index ee24b6d62f..0000000000
--- a/gnuradio-core/src/tests/test_vmcircbuf.cc
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2003 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.
- */
-
-#include <gr_vmcircbuf.h>
-#include <stdio.h>
-
-int
-main (int argc, char **argv)
-{
- int verbose = 1; // summary
-
- if (argc > 1)
- verbose = 2; // extra chatty
-
- bool ok = gr_vmcircbuf_sysconfig::test_all_factories (verbose);
-
- if (ok){
- fprintf (stdout, "test_vmcircbuf: OK. We've got at least one workable solution\n");
- return 0;
- }
- else {
- fprintf (stdout, "test_vmcircbuf: NOT OK. We don't have a workable solution\n");
- return 1;
- }
-}