QA: Move io_benchmark into common_tools
This commit is contained in:
parent
267e17d539
commit
bb2e402bc7
|
@ -34,6 +34,8 @@ add_executable( qa_common_tools
|
|||
main.cpp
|
||||
|
||||
tools/coroutines/coroutines.cpp
|
||||
|
||||
tools/io_benchmark/io_benchmark.cpp
|
||||
)
|
||||
|
||||
include_directories(
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include <common.h>
|
||||
|
||||
#include "tools/coroutines/coroutine_tools.h"
|
||||
#include "tools/io_benchmark/io_benchmark.h"
|
||||
|
||||
#include <wx/cmdline.h>
|
||||
|
||||
|
@ -35,6 +36,7 @@
|
|||
*/
|
||||
const static std::vector<UTILITY_PROGRAM*> known_tools = {
|
||||
&coroutine_tool,
|
||||
&io_benchmark_tool,
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "io_benchmark.h"
|
||||
|
||||
#include <wx/wx.h>
|
||||
#include <richio.h>
|
||||
|
||||
|
@ -377,13 +379,7 @@ BENCH_REPORT executeBenchMark( const BENCHMARK& aBenchmark, int aReps,
|
|||
}
|
||||
|
||||
|
||||
enum RET_CODES
|
||||
{
|
||||
BAD_ARGS = 1,
|
||||
};
|
||||
|
||||
|
||||
int main( int argc, char* argv[] )
|
||||
int io_benchmark_func( int argc, char* argv[] )
|
||||
{
|
||||
auto& os = std::cout;
|
||||
|
||||
|
@ -392,7 +388,7 @@ int main( int argc, char* argv[] )
|
|||
os << "Usage: " << argv[0] << " <FILE> <REPS> [" << getBenchFlags() << "]\n\n";
|
||||
os << "Benchmarks:\n";
|
||||
os << getBenchDescriptions();
|
||||
return BAD_ARGS;
|
||||
return RET_CODES::BAD_CMDLINE;
|
||||
}
|
||||
|
||||
wxFileName inFile( argv[1] );
|
||||
|
@ -423,5 +419,12 @@ int main( int argc, char* argv[] )
|
|||
<< std::endl;;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return RET_CODES::OK;
|
||||
}
|
||||
|
||||
|
||||
UTILITY_PROGRAM io_benchmark_tool = {
|
||||
"io_benchmark",
|
||||
"Benchmark various kinds of IO methods",
|
||||
io_benchmark_func,
|
||||
};
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2018 KiCad Developers, see CHANGELOG.TXT for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, you may find one here:
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* or you may search the http://www.gnu.org website for the version 2 license,
|
||||
* or you may write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef IO_BENCHMARK_H
|
||||
#define IO_BENCHMARK_H
|
||||
|
||||
#include <utility_program.h>
|
||||
|
||||
extern UTILITY_PROGRAM io_benchmark_tool;
|
||||
|
||||
#endif // IO_BENCHMARK_H
|
|
@ -45,6 +45,3 @@ target_link_libraries( utf8_tests
|
|||
common
|
||||
${wxWidgets_LIBRARIES}
|
||||
)
|
||||
|
||||
|
||||
add_subdirectory( io_benchmark )
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
|
||||
include_directories( BEFORE ${INC_BEFORE} )
|
||||
|
||||
set( IOBENCHMARK_SRCS
|
||||
io_benchmark.cpp
|
||||
)
|
||||
|
||||
add_executable( io_benchmark
|
||||
${IOBENCHMARK_SRCS}
|
||||
)
|
||||
|
||||
target_link_libraries( io_benchmark
|
||||
common
|
||||
qa_utils
|
||||
${wxWidgets_LIBRARIES}
|
||||
)
|
||||
|
Loading…
Reference in New Issue