Skip to content

Commit

Permalink
Update lmdb_dataset_op_test.cc
Browse files Browse the repository at this point in the history
Use `TensorFlowSrcRoot()` to get the tensorflow root path instead of the "tensorflow" path directly
  • Loading branch information
rachellim committed Nov 26, 2019
1 parent 96089c2 commit c89247a
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -14,6 +14,7 @@ limitations under the License.
#include "tensorflow/core/kernels/data/dataset_test_base.h"
#include "tensorflow/core/lib/io/path.h"
#include "tensorflow/core/platform/env.h"
#include "tensorflow/core/platform/test.h"

namespace tensorflow {
namespace data {
Expand All @@ -23,7 +24,7 @@ namespace {
constexpr char kNodeName[] = "lmdb_dataset";
constexpr char kIteratorPrefix[] = "Iterator";
constexpr char kDataFileName[] = "data.mdb";
constexpr char kDataFileLoc[] = "tensorflow/core/lib/lmdb/testdata";
constexpr char kDataFileLoc[] = "core/lib/lmdb/testdata";

class LMDBDatasetParams : public DatasetParams {
public:
Expand Down Expand Up @@ -69,7 +70,8 @@ class LMDBDatasetOpTest : public DatasetOpsTestBaseV2 {};
// This copying is necessary because LMDB creates lock files adjacent
// to files that it reads.
string MaybeCopyDataFile() {
string src_loc = io::JoinPath(kDataFileLoc, kDataFileName);
string src_loc =
io::JoinPath(testing::TensorFlowSrcRoot(), kDataFileLoc, kDataFileName);
string dest_loc = io::JoinPath(testing::TmpDir(), kDataFileName);

FileSystem* fs; // Pointer to singleton
Expand Down

0 comments on commit c89247a

Please sign in to comment.