Add a device-side unittest target
This change also adds two static libs, libbspatch and libbsdiff,
which encapsulate the dependencies of both the binaries and the
unit tests.
TEST=`mma external/bsdiff` and ran unittests on host and bullhead:NRC47C
Bug: 26971929
Change-Id: Ica0b17fa60f3ddf86d03ae12e6c099efbdd1296b
diff --git a/test_utils.h b/test_utils.h
index 186d9e6..7132fe5 100644
--- a/test_utils.h
+++ b/test_utils.h
@@ -5,6 +5,7 @@
#ifndef _BSDIFF_TEST_UTILS_H_
#define _BSDIFF_TEST_UTILS_H_
+#include <gtest/gtest.h>
#include <string>
#include <vector>
@@ -18,6 +19,11 @@
namespace test_utils {
+class BsdiffTestEnvironment : public ::testing::Environment {
+ public:
+ virtual void SetUp();
+};
+
// Reads all the contents of the file |path| into |out|. Returns whether it
// read up to the end of file.
bool ReadFile(const std::string& path, std::vector<uint8_t>* out);