Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cebc76db authored by Bernie Innocenti's avatar Bernie Innocenti
Browse files

resolv_gold_test: Print file name on load errors

Change-Id: I24f2506cc0b77e29bbd1ff433b1538b7215678d1
parent f5b65c1f
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -126,8 +126,9 @@ class TestBase : public ::testing::Test {
    GoldTest ToProto(const std::string& file) {
        // Convert the testing configuration from .pbtxt file to proto.
        std::string file_content;
        EXPECT_TRUE(android::base::ReadFileToString(kTestDataPath + file, &file_content))
                << strerror(errno);
        const std::string file_name = kTestDataPath + file;
        EXPECT_TRUE(android::base::ReadFileToString(file_name, &file_content))
                << "Failed to read " << file_name << ": " << strerror(errno);
        android::net::GoldTest goldtest;
        EXPECT_TRUE(google::protobuf::TextFormat::ParseFromString(file_content, &goldtest));
        return goldtest;