diff --git a/libs/ardour/run-tests.sh b/libs/ardour/run-tests.sh index 9bcaca6f5c..3fc79920fd 100755 --- a/libs/ardour/run-tests.sh +++ b/libs/ardour/run-tests.sh @@ -10,7 +10,8 @@ cd ../../build/default libs='libs' -export LD_LIBRARY_PATH=$libs/vamp-sdk:$libs/surfaces:$libs/surfaces/control_protocol:$libs/ardour:$libs/midi++2:$libs/pbd:$libs/rubberband:$libs/soundtouch:$libs/gtkmm2ext:$libs/sigc++2:$libs/glibmm2:$libs/gtkmm2/atk:$libs/gtkmm2/pango:$libs/gtkmm2/gdk:$libs/gtkmm2/gtk:$libs/libgnomecanvasmm:$libs/libsndfile:$libs/appleutility:$libs/cairomm:$libs/taglib:$libs/evoral:$libs/evoral/src/libsmf:$LD_LIBRARY_PATH +export LD_LIBRARY_PATH=$libs/audiographer:$libs/vamp-sdk:$libs/surfaces:$libs/surfaces/control_protocol:$libs/ardour:$libs/midi++2:$libs/pbd:$libs/rubberband:$libs/soundtouch:$libs/gtkmm2ext:$libs/sigc++2:$libs/glibmm2:$libs/gtkmm2/atk:$libs/gtkmm2/pango:$libs/gtkmm2/gdk:$libs/gtkmm2/gtk:$libs/libgnomecanvasmm:$libs/libsndfile:$libs/appleutility:$libs/cairomm:$libs/taglib:$libs/evoral:$libs/evoral/src/libsmf:$LD_LIBRARY_PATH -echo $LD_LIBRARY_PATH -./libs/ardour/run-tests +echo LD_LIBRARY_PATH = $LD_LIBRARY_PATH + +gdb ./libs/ardour/run-tests diff --git a/libs/ardour/test/BBTTest.cpp b/libs/ardour/test/bbt_test.cpp similarity index 95% rename from libs/ardour/test/BBTTest.cpp rename to libs/ardour/test/bbt_test.cpp index 5f5f18b629..be1605a75f 100644 --- a/libs/ardour/test/BBTTest.cpp +++ b/libs/ardour/test/bbt_test.cpp @@ -1,6 +1,6 @@ #include #include "ardour/tempo.h" -#include "BBTTest.hpp" +#include "bbt_test.h" CPPUNIT_TEST_SUITE_REGISTRATION(BBTTest); diff --git a/libs/ardour/test/BBTTest.hpp b/libs/ardour/test/bbt_test.h similarity index 100% rename from libs/ardour/test/BBTTest.hpp rename to libs/ardour/test/bbt_test.h diff --git a/libs/ardour/test/InterpolationTest.cpp b/libs/ardour/test/interpolation_test.cpp similarity index 99% rename from libs/ardour/test/InterpolationTest.cpp rename to libs/ardour/test/interpolation_test.cpp index 7fd8a72f89..107d373101 100644 --- a/libs/ardour/test/InterpolationTest.cpp +++ b/libs/ardour/test/interpolation_test.cpp @@ -1,5 +1,5 @@ #include -#include "InterpolationTest.h" +#include "interpolation_test.h" CPPUNIT_TEST_SUITE_REGISTRATION(InterpolationTest); diff --git a/libs/ardour/test/InterpolationTest.h b/libs/ardour/test/interpolation_test.h similarity index 100% rename from libs/ardour/test/InterpolationTest.h rename to libs/ardour/test/interpolation_test.h diff --git a/libs/ardour/wscript b/libs/ardour/wscript index dfa05ba752..a6ea97ec0d 100644 --- a/libs/ardour/wscript +++ b/libs/ardour/wscript @@ -321,8 +321,8 @@ def build(bld): # Unit tests testobj = bld.new_task_gen('cxx', 'program') testobj.source = ''' - test/BBTTest.cpp - test/InterpolationTest.cpp + test/bbt_test.cpp + test/interpolation_test.cpp test/testrunner.cpp '''.split() testobj.includes = obj.includes + ['../pbd/'] diff --git a/wscript b/wscript index 80596f3f5d..f69cb63931 100644 --- a/wscript +++ b/wscript @@ -343,6 +343,8 @@ def set_options(opt): opt.add_option('--no-nls', action='store_false', dest='nls') opt.add_option('--stl-debug', action='store_true', default=False, dest='stl_debug', help='Build with debugging for the STL') + opt.add_option('--test', action='store_true', default=False, dest='build_tests', + help="Build unit tests") opt.add_option('--tranzport', action='store_true', default=False, dest='tranzport', help='Compile with support for Frontier Designs Tranzport (if libusb is available)') opt.add_option('--universal', action='store_true', default=False, dest='universal', @@ -464,6 +466,7 @@ def configure(conf): okmsg = 'ok', errmsg = 'too old\nPlease install boost version 1.39 or higher.') + autowaf.check_pkg(conf, 'cppunit', uselib_store='CPPUNIT', atleast_version='1.12.0', mandatory=False) autowaf.check_pkg(conf, 'glib-2.0', uselib_store='GLIB', atleast_version='2.2') autowaf.check_pkg(conf, 'gthread-2.0', uselib_store='GTHREAD', atleast_version='2.2') autowaf.check_pkg(conf, 'glibmm-2.4', uselib_store='GLIBMM', atleast_version='2.14.0') @@ -479,7 +482,7 @@ def configure(conf): conf.env.append_value('CCFLAGS', '-DWAF_BUILD') conf.env.append_value('CXXFLAGS', '-DWAF_BUILD') - + autowaf.print_summary(conf) opts = Options.options autowaf.display_header('Ardour Configuration') @@ -510,6 +513,9 @@ def configure(conf): if opts.nls: conf.define ('ENABLE_NLS', 1) autowaf.display_msg(conf, 'Tranzport', opts.tranzport) + if opts.build_tests: + conf.env['BUILD_TESTS'] = opts.build_tests + autowaf.display_msg(conf, 'Unit Tests', bool(conf.env['BUILD_TESTS']) and bool (conf.env['HAVE_CPPUNIT'])) if opts.tranzport: conf.define('TRANZPORT', 1) autowaf.display_msg(conf, 'Universal Binary', opts.universal)