mirror of
https://github.com/Lurkki14/tuxclocker.git
synced 2024-11-21 15:57:25 -06:00
remove duplicate test
This commit is contained in:
parent
5784d42ffa
commit
4d18b0cdfb
@ -1,28 +0,0 @@
|
||||
#include <AMDUtils.hpp>
|
||||
#include <fplus/fplus.hpp>
|
||||
#include <iostream>
|
||||
#include <Utils.hpp>
|
||||
|
||||
using namespace TuxClocker::Device;
|
||||
|
||||
std::optional<Range<int>> fromFanCurveContents(const std::string &contentsRaw) {
|
||||
auto contents =
|
||||
fplus::replace_tokens(std::string{"fan speed"}, std::string{"fan_speed"}, contentsRaw);
|
||||
return parsePstateRangeLine("FAN_CURVE(fan_speed)", contents);
|
||||
}
|
||||
|
||||
int fanCurveParse() {
|
||||
auto contents = fileContents(PROJECT_ROOT "/doc/amd-pptables/rx7000-fancurve");
|
||||
if (!contents.has_value()) {
|
||||
std::cerr << "Couldn't read sample file\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
auto range = fromFanCurveContents(*contents);
|
||||
if (!range.has_value()) {
|
||||
return 1;
|
||||
}
|
||||
return !(range->min == 15 && range->max == 100);
|
||||
}
|
||||
|
||||
int main() { return fanCurveParse(); }
|
@ -70,12 +70,3 @@ if get_option('plugins-cpu')
|
||||
install : true,
|
||||
link_with : libtuxclocker)
|
||||
endif
|
||||
|
||||
tests = executable('tests', 'Tests.cpp', 'AMDUtils.cpp', 'Utils.cpp',
|
||||
# Find sample AMD files
|
||||
cpp_args : '-DPROJECT_ROOT="@0@"'.format(meson.source_root()),
|
||||
include_directories : [incdir, fplus_inc],
|
||||
dependencies : [ libdrm_amdgpu, libdrm_dep, boost_dep ])
|
||||
|
||||
test('AMD parsing', tests,
|
||||
protocol : 'exitcode')
|
||||
|
Loading…
Reference in New Issue
Block a user