| 1 | /** \file |
| 2 | * \brief Implementation of a command line based tool to run |
| 3 | * tests. |
| 4 | * |
| 5 | * \author Christoph Schulz, Stephan Beyer, Tilo Wiedera |
| 6 | * |
| 7 | * \par License: |
| 8 | * This file is part of the Open Graph Drawing Framework (OGDF). |
| 9 | * |
| 10 | * \par |
| 11 | * Copyright (C)<br> |
| 12 | * See README.md in the OGDF root directory for details. |
| 13 | * |
| 14 | * \par |
| 15 | * This program is free software; you can redistribute it and/or |
| 16 | * modify it under the terms of the GNU General Public License |
| 17 | * Version 2 or 3 as published by the Free Software Foundation; |
| 18 | * see the file LICENSE.txt included in the packaging of this file |
| 19 | * for details. |
| 20 | * |
| 21 | * \par |
| 22 | * This program is distributed in the hope that it will be useful, |
| 23 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 24 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 25 | * GNU General Public License for more details. |
| 26 | * |
| 27 | * \par |
| 28 | * You should have received a copy of the GNU General Public |
| 29 | * License along with this program; if not, see |
| 30 | * http://www.gnu.org/copyleft/gpl.html |
| 31 | */ |
| 32 | |
| 33 | #include <iostream> |
| 34 | #include <resources.h> |
| 35 | |
| 36 | int main(int argc, char **argv) |
| 37 | { |
| 38 | bool verbose = false; |
| 39 | bool help = false; |
| 40 | |
| 41 | for(int i = 1; i < argc; i++) { |
| 42 | verbose |= string(argv[i]) == "--ogdf-verbose" ; |
| 43 | help |= string(argv[i]) == "--help" ; |
| 44 | } |
| 45 | |
| 46 | if(!verbose) { |
| 47 | Logger::globalLogLevel(Logger::Level::Force); |
| 48 | } |
| 49 | |
| 50 | resources::load_resources(); |
| 51 | |
| 52 | int result = run(argc, argv); |
| 53 | |
| 54 | if(help) { |
| 55 | std::cout << "OGDF specific options:" << std::endl; |
| 56 | std::cout << " --ogdf-verbose\t\tEnable verbose OGDF logging." << std::endl; |
| 57 | } |
| 58 | |
| 59 | return result; |
| 60 | } |
| 61 | |