From: Paul Brossier Date: Wed, 6 Mar 2013 16:27:03 +0000 (-0500) Subject: tests/: remove old files X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b583c099161b21c8d09eba137e7dab9861331af3;p=aubio.git tests/: remove old files --- diff --git a/tests/README.tests b/tests/README.tests deleted file mode 100644 index 684e1a2c..00000000 --- a/tests/README.tests +++ /dev/null @@ -1 +0,0 @@ -Python unit tests checking the output of the programs in aubio/examples/ diff --git a/tests/list_missing_tests b/tests/list_missing_tests deleted file mode 100755 index 520cb7c0..00000000 --- a/tests/list_missing_tests +++ /dev/null @@ -1,64 +0,0 @@ -#! /usr/bin/python - -from glob import glob -from os.path import splitext, exists, join, dirname, basename -import sys - -def check_tst_against_src(src_dir, src_ext, ext_dir, verbose = False, tst_prefix = ''): - src_files = [ basename(file) for file in glob( join(src_dir, '*'+src_ext) ) ] - src_files.sort() - status = 0 - for src_file in src_files: - tst_file = (splitext(src_file)[0] + tst_ext).replace(tst_prefix,"") - if not exists(join(tst_dir,tst_prefix+tst_file)): - print "%20s [X]" % src_file, "[ ] %s" % tst_file - status = 1 - elif verbose: - print "%20s [X]" % src_file, "[X] %s" % tst_file - return status - -def check_src_against_tst(tst_dir, tst_ext, src_dir, verbose = False, tst_prefix = ''): - tst_files = [ basename(file) for file in glob( join(tst_dir, '*'+tst_ext) ) ] - tst_files.sort() - status = 0 - for tst_file in tst_files: - src_file = (splitext(tst_file)[0] + src_ext).replace(tst_prefix,"") - if not exists(join(src_dir,src_file)): - print "%20s [ ]" % src_file, "[X] %s" % tst_file - status = 2 - elif verbose: - print "%20s [X]" % src_file, "[X] %s" % tst_file - return status - -def check_two_ways(src_dir, src_ext, tst_dir, tst_ext, verbose = False, tst_prefix = ''): - print "%20s " % (" FILES IN " + src_dir) + "|" + " FILES IN " + tst_dir - status = check_tst_against_src(src_dir, src_ext, tst_dir, verbose = verbose, tst_prefix = tst_prefix) - status += check_src_against_tst(tst_dir, tst_ext, src_dir, verbose = verbose, tst_prefix = tst_prefix) - return status - -if __name__ == '__main__': - - if len(sys.argv) > 1: verbose = True - else: verbose = False - - base_directory = dirname(sys.argv[0]) - - status = 0 - - src_dir = join(base_directory,'..','src') - src_ext = '.c' - tst_dir = join(base_directory,'python') - tst_ext = '.py' - status += check_two_ways(src_dir, src_ext, tst_dir, tst_ext, verbose = verbose) - - tst_dir = join(base_directory,'src') - tst_ext = '.c' - status += check_two_ways(src_dir, src_ext, tst_dir, tst_ext, verbose = verbose, tst_prefix = 'test-') - - src_dir = join(base_directory,'..','examples') - src_ext = '.c' - tst_dir = join(base_directory,'python','examples') - tst_ext = '.py' - status += check_two_ways(src_dir, src_ext, tst_dir, tst_ext, verbose = verbose) - - sys.exit(status)