From: Paul Brossier Date: Tue, 30 Oct 2007 02:00:22 +0000 (+0100) Subject: move python/tests to tests/python, examples/tests to tests/src, add .bzrignore X-Git-Tag: bzr2git~510 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=de2a8af8ce5caf1a774185841fcdf7870039881a;p=aubio.git move python/tests to tests/python, examples/tests to tests/src, add .bzrignore --- diff --git a/.bzrignore b/.bzrignore new file mode 100644 index 00000000..4fb10de9 --- /dev/null +++ b/.bzrignore @@ -0,0 +1,25 @@ +*/Makefile.in +*/*/Makefile.in +*/*/*/Makefile.in +*/Makefile +*/*/Makefile +*/*/*/Makefile +*/.deps +*/*/.deps +*/*/*/.deps +*/.libs +*/*/.libs +*/*/*/.libs +*/*.lo +*/*/*.lo +*/*/*/*.lo +*/*.la +plugins/puredata/aubio.pd_linux +doc/aubiocut.1 +doc/aubionotes.1 +doc/aubioonset.1 +doc/aubiopitch.1 +doc/aubiotrack.1 +src/config.h +src/config.h.in +src/stamp-h1 diff --git a/configure.ac b/configure.ac index 1d0ab91e..93ef03a0 100644 --- a/configure.ac +++ b/configure.ac @@ -240,7 +240,8 @@ AC_OUTPUT([ src/Makefile ext/Makefile examples/Makefile - examples/tests/Makefile + tests/Makefile + tests/src/Makefile sounds/Makefile swig/Makefile python/Makefile diff --git a/examples/Makefile.am b/examples/Makefile.am index 94a20f11..a09dfc60 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -1,7 +1,3 @@ -if COMPILE_TESTS -SUBDIRS = tests -endif - # global flags AM_CFLAGS = -DAUBIO_PREFIX=\"$(prefix)\" -I$(top_srcdir)/src -I$(top_srcdir)/ext @AUBIO_CFLAGS@ @LASH_CFLAGS@ @FFTWLIB_CFLAGS@ AM_LDFLAGS = -L$(top_builddir)/src -L$(top_builddir)/ext -laubioext -laubio @LASH_LIBS@ diff --git a/python/test/list_missing_tests b/python/test/list_missing_tests deleted file mode 100755 index 3d5e5744..00000000 --- a/python/test/list_missing_tests +++ /dev/null @@ -1,30 +0,0 @@ -#! /usr/bin/python - -from glob import glob -from os.path import splitext, exists -import sys - -if len(sys.argv) > 1: verbose = True -else: verbose = False - -cfiles = [ file.split('/')[-1] for file in glob('../../src/*.c') ] -cfiles.sort() - -for cfile in cfiles: - pythonfile=splitext(cfile)[0]+'.py' - if not exists(pythonfile): - print "[X] %30s" % cfile, "[ ] %30s" % pythonfile - #print cfile, "has NO test", pythonfile - elif verbose: - print "[X] %30s" % cfile, "[X] %30s" % pythonfile - -pythonfiles = [ file.split('/')[-1] for file in glob('*.py') ] -pythonfiles.sort() - -for pythonfile in pythonfiles: - cfile=splitext(pythonfile)[0]+'.c' - if not exists('../../'+cfile): - print "[ ] %30s" % cfile, "[X] %30s" % pythonfile - #print pythonfile, "has NO source", cfile - elif verbose: - print "[X] %30s" % cfile, "[X] %30s" % pythonfile diff --git a/tests/list_missing_python_tests b/tests/list_missing_python_tests new file mode 100755 index 00000000..33bd8bc0 --- /dev/null +++ b/tests/list_missing_python_tests @@ -0,0 +1,37 @@ +#! /usr/bin/python + +from glob import glob +from os.path import splitext, exists, join, dirname +import sys + +tst_dir = join(dirname(sys.argv[0]),'python') +src_dir = join(dirname(sys.argv[0]),'..','src') + +if len(sys.argv) > 1: verbose = True +else: verbose = False + +status = 0 + +cfiles = [ file.split('/')[-1] for file in glob(join(src_dir,'*.c')) ] +cfiles.sort() + +for cfile in cfiles: + pythonfile=splitext(cfile)[0]+'.py' + if not exists(pythonfile): + print "%20s [X]" % cfile, "[ ] %s" % pythonfile + status = 1 + elif verbose: + print "%20s [X]" % cfile, "[X] %s" % pythonfile + +pythonfiles = [ file.split('/')[-1] for file in glob(join(tst_dir,'*.py')) ] +pythonfiles.sort() + +for pythonfile in pythonfiles: + cfile=splitext(pythonfile)[0]+'.c' + if not exists(join(src_dir,cfile)): + print "%20s [ ]" % cfile, "[X] %s" % pythonfile + status = 1 + elif verbose: + print "%20s [X]" % cfile, "[X] %s" % pythonfile + +sys.exit(status) diff --git a/python/test/aubiomodule.py b/tests/python/aubiomodule.py similarity index 100% rename from python/test/aubiomodule.py rename to tests/python/aubiomodule.py diff --git a/python/test/bench/onset/Makefile.am b/tests/python/bench/onset/Makefile.am similarity index 100% rename from python/test/bench/onset/Makefile.am rename to tests/python/bench/onset/Makefile.am diff --git a/python/test/bench/onset/bench-delay b/tests/python/bench/onset/bench-delay similarity index 100% rename from python/test/bench/onset/bench-delay rename to tests/python/bench/onset/bench-delay diff --git a/python/test/bench/onset/bench-onset b/tests/python/bench/onset/bench-onset similarity index 100% rename from python/test/bench/onset/bench-onset rename to tests/python/bench/onset/bench-onset diff --git a/python/test/bench/onset/bench-window b/tests/python/bench/onset/bench-window similarity index 100% rename from python/test/bench/onset/bench-window rename to tests/python/bench/onset/bench-window diff --git a/python/test/bench/pitch/Makefile.am b/tests/python/bench/pitch/Makefile.am similarity index 100% rename from python/test/bench/pitch/Makefile.am rename to tests/python/bench/pitch/Makefile.am diff --git a/python/test/bench/pitch/bench-pitch-isolated b/tests/python/bench/pitch/bench-pitch-isolated similarity index 100% rename from python/test/bench/pitch/bench-pitch-isolated rename to tests/python/bench/pitch/bench-pitch-isolated diff --git a/python/test/bench/pitch/bench-pitch-plot-isolated b/tests/python/bench/pitch/bench-pitch-plot-isolated similarity index 100% rename from python/test/bench/pitch/bench-pitch-plot-isolated rename to tests/python/bench/pitch/bench-pitch-plot-isolated diff --git a/python/test/bench/tempo/demo-tempo b/tests/python/bench/tempo/demo-tempo similarity index 100% rename from python/test/bench/tempo/demo-tempo rename to tests/python/bench/tempo/demo-tempo diff --git a/python/test/bench/tempo/demo-tempo-acf b/tests/python/bench/tempo/demo-tempo-acf similarity index 100% rename from python/test/bench/tempo/demo-tempo-acf rename to tests/python/bench/tempo/demo-tempo-acf diff --git a/python/test/cvec.py b/tests/python/cvec.py similarity index 100% rename from python/test/cvec.py rename to tests/python/cvec.py diff --git a/python/test/fvec.py b/tests/python/fvec.py similarity index 100% rename from python/test/fvec.py rename to tests/python/fvec.py diff --git a/python/test/run_all_tests b/tests/python/run_all_tests similarity index 66% rename from python/test/run_all_tests rename to tests/python/run_all_tests index a066ca3a..f09eaec3 100755 --- a/python/test/run_all_tests +++ b/tests/python/run_all_tests @@ -3,8 +3,10 @@ # add ${src}/python and ${src}/python/aubio/.libs to python path # so the script is runnable from a compiled source tree. import sys, os -sys.path.append('..') -sys.path.append(os.path.join('..','aubio','.libs')) + +cur_dir = os.path.dirname(sys.argv[0]) +sys.path.append(os.path.join(cur_dir,'..','..','python')) +sys.path.append(os.path.join(cur_dir,'..','..','python','aubio','.libs')) import unittest diff --git a/examples/tests/Makefile.am b/tests/src/Makefile.am similarity index 100% rename from examples/tests/Makefile.am rename to tests/src/Makefile.am diff --git a/examples/tests/test-beattracking.c b/tests/src/test-beattracking.c similarity index 100% rename from examples/tests/test-beattracking.c rename to tests/src/test-beattracking.c diff --git a/examples/tests/test-biquad.c b/tests/src/test-biquad.c similarity index 100% rename from examples/tests/test-biquad.c rename to tests/src/test-biquad.c diff --git a/examples/tests/test-fft.c b/tests/src/test-fft.c similarity index 100% rename from examples/tests/test-fft.c rename to tests/src/test-fft.c diff --git a/examples/tests/test-filter.c b/tests/src/test-filter.c similarity index 100% rename from examples/tests/test-filter.c rename to tests/src/test-filter.c diff --git a/examples/tests/test-hist.c b/tests/src/test-hist.c similarity index 100% rename from examples/tests/test-hist.c rename to tests/src/test-hist.c diff --git a/examples/tests/test-mfft.c b/tests/src/test-mfft.c similarity index 100% rename from examples/tests/test-mfft.c rename to tests/src/test-mfft.c diff --git a/examples/tests/test-onset.c b/tests/src/test-onset.c similarity index 100% rename from examples/tests/test-onset.c rename to tests/src/test-onset.c diff --git a/examples/tests/test-onsetdetection.c b/tests/src/test-onsetdetection.c similarity index 100% rename from examples/tests/test-onsetdetection.c rename to tests/src/test-onsetdetection.c diff --git a/examples/tests/test-peakpick.c b/tests/src/test-peakpick.c similarity index 100% rename from examples/tests/test-peakpick.c rename to tests/src/test-peakpick.c diff --git a/examples/tests/test-phasevoc-jack.c b/tests/src/test-phasevoc-jack.c similarity index 100% rename from examples/tests/test-phasevoc-jack.c rename to tests/src/test-phasevoc-jack.c diff --git a/examples/tests/test-phasevoc.c b/tests/src/test-phasevoc.c similarity index 100% rename from examples/tests/test-phasevoc.c rename to tests/src/test-phasevoc.c diff --git a/examples/tests/test-pitchdetection.c b/tests/src/test-pitchdetection.c similarity index 100% rename from examples/tests/test-pitchdetection.c rename to tests/src/test-pitchdetection.c diff --git a/examples/tests/test-pitchfcomb.c b/tests/src/test-pitchfcomb.c similarity index 100% rename from examples/tests/test-pitchfcomb.c rename to tests/src/test-pitchfcomb.c diff --git a/examples/tests/test-pitchmcomb.c b/tests/src/test-pitchmcomb.c similarity index 100% rename from examples/tests/test-pitchmcomb.c rename to tests/src/test-pitchmcomb.c diff --git a/examples/tests/test-pitchschmitt.c b/tests/src/test-pitchschmitt.c similarity index 100% rename from examples/tests/test-pitchschmitt.c rename to tests/src/test-pitchschmitt.c diff --git a/examples/tests/test-pitchyin.c b/tests/src/test-pitchyin.c similarity index 100% rename from examples/tests/test-pitchyin.c rename to tests/src/test-pitchyin.c diff --git a/examples/tests/test-pitchyinfft.c b/tests/src/test-pitchyinfft.c similarity index 100% rename from examples/tests/test-pitchyinfft.c rename to tests/src/test-pitchyinfft.c diff --git a/examples/tests/test-resample.c b/tests/src/test-resample.c similarity index 100% rename from examples/tests/test-resample.c rename to tests/src/test-resample.c diff --git a/examples/tests/test-sample.c b/tests/src/test-sample.c similarity index 100% rename from examples/tests/test-sample.c rename to tests/src/test-sample.c diff --git a/examples/tests/test-scale.c b/tests/src/test-scale.c similarity index 100% rename from examples/tests/test-scale.c rename to tests/src/test-scale.c diff --git a/examples/tests/test-tempo.c b/tests/src/test-tempo.c similarity index 100% rename from examples/tests/test-tempo.c rename to tests/src/test-tempo.c diff --git a/examples/tests/test-tss.c b/tests/src/test-tss.c similarity index 100% rename from examples/tests/test-tss.c rename to tests/src/test-tss.c diff --git a/examples/tests/test-window.c b/tests/src/test-window.c similarity index 100% rename from examples/tests/test-window.c rename to tests/src/test-window.c