summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2019-06-10 06:31:49 +0200
committerZach Hilman <zachhilman@gmail.com>2019-06-10 06:31:54 +0200
commit3a26b49c2cfb50f312bca63b897480c10bc6329c (patch)
treece7795b2ec2334dd9f989ce00d114dfacad8e0d9 /src
parentyuzu_tester: Display results in table format (diff)
downloadyuzu-3a26b49c2cfb50f312bca63b897480c10bc6329c.tar
yuzu-3a26b49c2cfb50f312bca63b897480c10bc6329c.tar.gz
yuzu-3a26b49c2cfb50f312bca63b897480c10bc6329c.tar.bz2
yuzu-3a26b49c2cfb50f312bca63b897480c10bc6329c.tar.lz
yuzu-3a26b49c2cfb50f312bca63b897480c10bc6329c.tar.xz
yuzu-3a26b49c2cfb50f312bca63b897480c10bc6329c.tar.zst
yuzu-3a26b49c2cfb50f312bca63b897480c10bc6329c.zip
Diffstat (limited to 'src')
-rw-r--r--src/yuzu_tester/service/yuzutest.cpp2
-rw-r--r--src/yuzu_tester/yuzu.cpp15
2 files changed, 9 insertions, 8 deletions
diff --git a/src/yuzu_tester/service/yuzutest.cpp b/src/yuzu_tester/service/yuzutest.cpp
index a5e5bddb2..85d3f436b 100644
--- a/src/yuzu_tester/service/yuzutest.cpp
+++ b/src/yuzu_tester/service/yuzutest.cpp
@@ -95,7 +95,7 @@ private:
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(RESULT_SUCCESS);
- finish_callback(results);
+ finish_callback(std::move(results));
}
std::string data;
diff --git a/src/yuzu_tester/yuzu.cpp b/src/yuzu_tester/yuzu.cpp
index 4b4e3d4fc..b589c3de3 100644
--- a/src/yuzu_tester/yuzu.cpp
+++ b/src/yuzu_tester/yuzu.cpp
@@ -176,7 +176,10 @@ int main(int argc, char** argv) {
finished = true;
return_value = 0;
- const auto len =
+ // Find the minimum length needed to fully enclose all test names (and the header field) in
+ // the fmt::format column by first finding the maximum size of any test name and comparing
+ // that to 9, the string length of 'Test Name'
+ const auto needed_length_name =
std::max<u64>(std::max_element(results.begin(), results.end(),
[](const auto& lhs, const auto& rhs) {
return lhs.name.size() < rhs.name.size();
@@ -187,7 +190,8 @@ int main(int argc, char** argv) {
std::size_t passed = 0;
std::size_t failed = 0;
- std::cout << fmt::format("Result [Res Code] | {:<{}} | Extra Data", "Test Name", len)
+ std::cout << fmt::format("Result [Res Code] | {:<{}} | Extra Data", "Test Name",
+ needed_length_name)
<< std::endl;
for (const auto& res : results) {
@@ -196,8 +200,8 @@ int main(int argc, char** argv) {
++passed;
else
++failed;
- std::cout << fmt::format("{} [{:08X}] | {:<{}} | {}", main_res, res.code, res.name, len,
- res.data)
+ std::cout << fmt::format("{} [{:08X}] | {:<{}} | {}", main_res, res.code, res.name,
+ needed_length_name, res.data)
<< std::endl;
}
@@ -230,9 +234,6 @@ int main(int argc, char** argv) {
case Core::System::ResultStatus::ErrorNotInitialized:
LOG_CRITICAL(Frontend, "CPUCore not initialized");
return -1;
- case Core::System::ResultStatus::ErrorSystemMode:
- LOG_CRITICAL(Frontend, "Failed to determine system mode!");
- return -1;
case Core::System::ResultStatus::ErrorVideoCore:
LOG_CRITICAL(Frontend, "Failed to initialize VideoCore!");
return -1;