2
#include <glibmm/thread.h>
4
#include <cppunit/CompilerOutputter.h>
5
#include <cppunit/extensions/TestFactoryRegistry.h>
6
#include <cppunit/TestResult.h>
7
#include <cppunit/TestResultCollector.h>
8
#include <cppunit/TestRunner.h>
9
#include <cppunit/BriefTestProgressListener.h>
11
#include "pbd/debug.h"
12
#include "ardour/ardour.h"
14
static const char* localedir = LOCALEDIR;
17
main(int argc, char* argv[])
19
if (!Glib::thread_supported()) {
23
const struct option longopts[] = {
24
{ "debug", 1, 0, 'D' },
27
const char *optstring = "D:";
32
c = getopt_long (argc, argv, optstring, longopts, &option_index);
43
if (PBD::parse_debug_options (optarg)) {
50
ARDOUR::init (false, true, localedir);
52
CppUnit::TestResult testresult;
54
CppUnit::TestResultCollector collectedresults;
55
testresult.addListener (&collectedresults);
57
CppUnit::BriefTestProgressListener progress;
58
testresult.addListener (&progress);
60
CppUnit::TestRunner testrunner;
61
testrunner.addTest (CppUnit::TestFactoryRegistry::getRegistry ().makeTest ());
62
testrunner.run (testresult);
64
CppUnit::CompilerOutputter compileroutputter (&collectedresults, std::cerr);
65
compileroutputter.write ();
69
return collectedresults.wasSuccessful () ? 0 : 1;