From f8e4ff754b728580d836500c8c0aff7052ce5d95 Mon Sep 17 00:00:00 2001
From: sawinglogz <3787776-sawinglogz@users.noreply.gitlab.com>
Date: Sat, 18 May 2019 19:46:24 -0400
Subject: [PATCH] Add OSCAR version number to PRS1 unit test logs.

---
 oscar/SleepLib/common.cpp | 8 ++++++--
 oscar/tests/prs1tests.cpp | 2 ++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/oscar/SleepLib/common.cpp b/oscar/SleepLib/common.cpp
index 0f287401..be4e249f 100644
--- a/oscar/SleepLib/common.cpp
+++ b/oscar/SleepLib/common.cpp
@@ -181,8 +181,12 @@ QString getBranchVersion()
     if (GIT_BRANCH != "master") {
         version += GIT_BRANCH+"-";
     }
-    version += GIT_REVISION +" ";
-    version += getGraphicsEngine()+"]";
+    version += GIT_REVISION;
+#ifndef UNITTEST_MODE
+    // There is no graphics engine on the console.
+    version += QString(" ") + getGraphicsEngine();
+#endif
+    version += "]";
 
     return version;
 }
diff --git a/oscar/tests/prs1tests.cpp b/oscar/tests/prs1tests.cpp
index 8b282de4..16ffb412 100644
--- a/oscar/tests/prs1tests.cpp
+++ b/oscar/tests/prs1tests.cpp
@@ -18,6 +18,8 @@ static QString prs1OutputPath(const QString & inpath, const QString & serial, in
 
 void PRS1Tests::initTestCase(void)
 {
+    initializeStrings();
+    qDebug() << STR_TR_OSCAR + " " + getBranchVersion();
     QString profile_path = TESTDATA_PATH "profile/";
     Profiles::Create("test", &profile_path);