Removed version gtests from openpower-pnor-code-mgmt
These gtests were moved to phosphor-bmc-code-mgmt in
https://gerrit.openbmc-project.xyz/#/c/3802/
I left the base test code since tests are needed
for other functions in this repo.
Change-Id: Id3f4666550ce04ddec5e34dcfe103cfe0ea42304
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/test/Makefile.am b/test/Makefile.am
index cac8e37..e2caf4b 100755
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -10,7 +10,6 @@
utest_CPPFLAGS = -Igtest $(GTEST_CPPFLAGS) $(AM_CPPFLAGS)
utest_CXXFLAGS = $(PTHREAD_CFLAGS) $(PHOSPHOR_LOGGING_CFLAGS)
utest_LDFLAGS = -lgtest_main -lgtest $(PTHREAD_LIBS) $(OESDK_TESTCASE_FLAGS) \
- $(PHOSPHOR_LOGGING_LIBS) -lstdc++fs
+ $(PHOSPHOR_LOGGING_LIBS)
utest_SOURCES = utest.cpp
-utest_LDADD = $(top_builddir)/version_host_software_manager.o
diff --git a/test/utest.cpp b/test/utest.cpp
index 4fd1e78..2180533 100644
--- a/test/utest.cpp
+++ b/test/utest.cpp
@@ -1,64 +1 @@
-#include "version_host_software_manager.hpp"
#include <gtest/gtest.h>
-#include <experimental/filesystem>
-#include <stdlib.h>
-#include <fstream>
-#include <iostream>
-#include <sstream>
-#include <string>
-
-using namespace openpower::software::manager;
-namespace fs = std::experimental::filesystem;
-
-
-class VersionTest : public testing::Test
-{
- protected:
-
- virtual void SetUp()
- {
- char versionDir[] = "./versionXXXXXX";
- _directory = mkdtemp(versionDir);
-
- if (_directory.empty())
- {
- throw std::bad_alloc();
- }
- }
-
- virtual void TearDown()
- {
- fs::remove_all(_directory);
- }
-
- std::string _directory;
-};
-
-/** @brief Make sure we correctly get the version from getVersion()*/
-TEST_F(VersionTest, TestGetVersion)
-{
- auto manifestFilePath = _directory + "/" + "MANIFEST";
- auto version = "test-version";
-
- std::ofstream file;
- file.open(manifestFilePath, std::ofstream::out);
- ASSERT_TRUE(file.is_open());
-
- file << "version=" << version << std::endl;
- file.close();
-
- EXPECT_EQ(Version::getVersion(manifestFilePath), version);
-}
-
-/** @brief Make sure we correctly get the Id from getId()*/
-TEST_F(VersionTest, TestGetId)
-{
- std::stringstream hexId;
- auto version = "test-id";
-
- hexId << std::hex << ((std::hash<std::string> {}(
- version)) & 0xFFFFFFFF);
-
- EXPECT_EQ(Version::getId(version), hexId.str());
-
-}