Add test for strange boost-related crash.
authorCarl Hetherington <carl@carlh.net>
Sat, 12 May 2012 19:34:02 +0000 (19:34 +0000)
committerCarl Hetherington <carl@carlh.net>
Sat, 12 May 2012 19:34:02 +0000 (19:34 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@12261 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/run-tests.sh
libs/ardour/test/control_surfaces_test.cc [new file with mode: 0644]
libs/ardour/test/control_surfaces_test.h [new file with mode: 0644]
libs/ardour/test/test_needing_session.cc
libs/ardour/wscript

index 1af623c3f2ee5f09a6fbe44c3f41231962de086e..1097804994d8fcf2e42c4de4a7880e1984549bec 100755 (executable)
@@ -16,6 +16,7 @@ libs='libs'
 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/appleutility:$libs/taglib:$libs/evoral:$libs/evoral/src/libsmf:$libs/timecode:/usr/local/lib:/usr/local/lib64:$LD_LIBRARY_PATH
 
 export ARDOUR_PANNER_PATH=$libs/panners/2in2out:$libs/panners/1in2out:$libs/panners/vbap
+export ARDOUR_SURFACES_PATH=$libs/surfaces/osc:$libs/surfaces/generic_midi:$libs/surfaces/tranzport:$libs/surfaces/powermate:$libs/surfaces/mackie
 
 if [ "$1" == "--debug" ]; then
         gdb ./libs/ardour/run-tests
diff --git a/libs/ardour/test/control_surfaces_test.cc b/libs/ardour/test/control_surfaces_test.cc
new file mode 100644 (file)
index 0000000..82127a2
--- /dev/null
@@ -0,0 +1,23 @@
+#include "control_surfaces_test.h"
+#include "ardour/control_protocol_manager.h"
+#include "ardour/session.h"
+
+CPPUNIT_TEST_SUITE_REGISTRATION (ControlSurfacesTest);
+
+using namespace std;
+using namespace ARDOUR;
+
+void
+ControlSurfacesTest::instantiateAndTeardownTest ()
+{
+       cout << "HELLO!\n";
+       _session->new_audio_track (1, 2, Normal, 0, 1, "Test");
+       
+       ControlProtocolManager& m = ControlProtocolManager::instance ();
+       cout << "CST: Test " << m.control_protocol_info.size() << "\n";
+       for (list<ControlProtocolInfo*>::iterator i = m.control_protocol_info.begin(); i != m.control_protocol_info.end(); ++i) {
+               cout << "CST: Test " << (*i)->name << "\n";
+               m.instantiate (**i);
+               m.teardown (**i);
+       }
+}
diff --git a/libs/ardour/test/control_surfaces_test.h b/libs/ardour/test/control_surfaces_test.h
new file mode 100644 (file)
index 0000000..97662c6
--- /dev/null
@@ -0,0 +1,11 @@
+#include "test_needing_session.h"
+
+class ControlSurfacesTest : public TestNeedingSession
+{
+       CPPUNIT_TEST_SUITE (ControlSurfacesTest);
+       CPPUNIT_TEST (instantiateAndTeardownTest);
+       CPPUNIT_TEST_SUITE_END ();
+
+public:
+       void instantiateAndTeardownTest ();
+};
index ea639782513e01d93de5662b75d89b779e1e8170..625d5735b24c0d5ad1f5f863fde93c55f0bf27c7 100644 (file)
@@ -6,6 +6,8 @@
 #include "ardour/audioengine.h"
 #include "test_needing_session.h"
 
+extern void setup_libpbd_enums ();
+
 using namespace std;
 using namespace ARDOUR;
 using namespace PBD;
@@ -57,13 +59,16 @@ TestNeedingSession::setUp ()
        init (false, true);
        SessionEvent::create_per_thread_pool ("test", 512);
 
+       setup_libpbd_enums ();
+
        test_receiver.listen_to (error);
        test_receiver.listen_to (info);
        test_receiver.listen_to (fatal);
        test_receiver.listen_to (warning);
 
        AudioEngine* engine = new AudioEngine ("test", "");
-       MIDI::Manager::create (engine->jack ());
+       init_post_engine ();
+
        CPPUNIT_ASSERT (engine->start () == 0);
 
        _session = new Session (*engine, test_session_path, "test_session");
index bf32599630f011e01a00775c10b195cd02f266d8..df46d8cc86cbf9678dece12a06439a5c06610c35 100644 (file)
@@ -435,6 +435,7 @@ def build(bld):
                 test/framepos_minus_beats_test.cc
                 test/playlist_layering_test.cc
                 test/playlist_read_test.cc
+                test/control_surfaces_test.cc
                 test/testrunner.cc
         '''.split()