source: trunk/debathena/third/schroot/test/testmain.cc @ 24167

Revision 24167, 1.3 KB checked in by broder, 15 years ago (diff)
Import schroot upstream into subversion.
Line 
1/* Copyright © 2006-2008  Roger Leigh <rleigh@debian.org>
2 *
3 * schroot is free software: you can redistribute it and/or modify it
4 * under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * (at your option) any later version.
7 *
8 * schroot is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 * General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program.  If not, see
15 * <http://www.gnu.org/licenses/>.
16 *
17 *********************************************************************/
18
19#include <config.h>
20
21#include <sbuild/sbuild-log.h>
22
23#include <cstdlib>
24
25#include <cppunit/ui/text/TestRunner.h>
26#include <cppunit/extensions/TestFactoryRegistry.h>
27
28using namespace CppUnit;
29
30int
31main()
32{
33#ifdef SBUILD_DEBUG
34      sbuild::debug_log_level = sbuild::DEBUG_NOTICE;
35#else
36      sbuild::debug_log_level = sbuild::DEBUG_NONE;
37#endif
38
39  TextUi::TestRunner runner;
40
41  TestFactoryRegistry &registry = CppUnit::TestFactoryRegistry::getRegistry();
42  runner.addTest(registry.makeTest());
43
44  bool ok = runner.run();
45
46  return (ok) ? EXIT_SUCCESS : EXIT_FAILURE;
47}
Note: See TracBrowser for help on using the repository browser.