8 #include <gtest/gtest.h>
19 static const std::string EP200_1GB_BINARY;
20 static const std::string EP200_4GB_BINARY;
21 static const std::string TV100_1GB_BINARY;
22 static const std::string TV100_1_5GB_BINARY;
23 static const std::string DTD200_BINARY;
24 static const std::string ICOM100_BINARY;
25 static const std::string RPA100_BINARY;
30 static bool updateUBoot(
const std::string &zipLocation);
31 static bool getCurrentVersion(std::string ¤t_version);
34 static inline std::function<std::string(std::string)> mCmdFunc = Command::GetStdoutFromCommand;
35 static bool getCurrentBootPartition(std::string ¤t_part);
36 static bool getBinaryPath(
const std::string &zipLocation, std::string &binaryPath);
37 static unsigned long int getTotalKBMemory();
38 static bool getBinaryName(std::string &binaryName);
39 static std::string getMmcBlockDevice();
43 friend class UpdateUBoot_test;
44 FRIEND_TEST(UpdateUBoot_test,getCurrentBootPartition0);
45 FRIEND_TEST(UpdateUBoot_test,getCurrentBootPartition1);
46 FRIEND_TEST(UpdateUBoot_test,getCurrentBootPartitionNotValidPattern);
47 FRIEND_TEST(UpdateUBoot_test,getCurrentBootPartitionNotValidPattern2);
48 FRIEND_TEST(UpdateUBoot_test,getCurrentBootPartitionEmptyResponse);
49 FRIEND_TEST(UpdateUBoot_test,getCurrentVersionOK);
50 FRIEND_TEST(UpdateUBoot_test,getCurrentVersionNotValidPattern);
51 FRIEND_TEST(UpdateUBoot_test,getCurrentVersionEmptyResponse);
52 FRIEND_TEST(UpdateUBoot_test,zipError);
53 FRIEND_TEST(UpdateUBoot_test,updateUBootVersionsMatch);
54 FRIEND_TEST(UpdateUBoot_test,updateUBootVersionError);