summaryrefslogtreecommitdiffhomepage
path: root/test/util
diff options
context:
space:
mode:
Diffstat (limited to 'test/util')
-rw-r--r--test/util/temp_path.cc1
-rw-r--r--test/util/test_util.cc2
-rw-r--r--test/util/test_util.h1
3 files changed, 4 insertions, 0 deletions
diff --git a/test/util/temp_path.cc b/test/util/temp_path.cc
index e45909655..11c14fb1a 100644
--- a/test/util/temp_path.cc
+++ b/test/util/temp_path.cc
@@ -75,6 +75,7 @@ std::string NewTempRelPath() { return NextTempBasename(); }
std::string GetAbsoluteTestTmpdir() {
char* env_tmpdir = getenv("TEST_TMPDIR");
std::string tmp_dir = env_tmpdir != nullptr ? std::string(env_tmpdir) : "/tmp";
+
return MakeAbsolute(tmp_dir, "").ValueOrDie();
}
diff --git a/test/util/test_util.cc b/test/util/test_util.cc
index 7b40260d1..ebcbca238 100644
--- a/test/util/test_util.cc
+++ b/test/util/test_util.cc
@@ -26,6 +26,7 @@
#include <ctime>
#include <vector>
+
#include "absl/base/attributes.h"
#include "absl/strings/numbers.h"
#include "absl/strings/str_cat.h"
@@ -234,6 +235,7 @@ bool Equivalent(uint64_t current, uint64_t target, double tolerance) {
auto abs_diff = target > current ? target - current : current - target;
return abs_diff <= static_cast<uint64_t>(tolerance * target);
}
+
void TestInit(int* argc, char*** argv) {
::testing::InitGoogleTest(argc, *argv);
::gflags::ParseCommandLineFlags(argc, argv, true);
diff --git a/test/util/test_util.h b/test/util/test_util.h
index cd71fdd64..37e40de8e 100644
--- a/test/util/test_util.h
+++ b/test/util/test_util.h
@@ -184,6 +184,7 @@
#include <thread> // NOLINT: using std::thread::hardware_concurrency().
#include <utility>
#include <vector>
+
#include <gflags/gflags.h>
#include <glog/logging.h>
#include "gmock/gmock.h"