Fix broken tests in libandroidfw_tests
Due to the output format changes, revise the PosixUtils_test to fix
the failures.
Fix: 203494455
Test: atest libandroidfw_tests
Change-Id: I6e84f8011031162f9e46aa89ddf8d3f3b9863251
diff --git a/libs/androidfw/tests/PosixUtils_test.cpp b/libs/androidfw/tests/PosixUtils_test.cpp
index c7b3eba..8c49350 100644
--- a/libs/androidfw/tests/PosixUtils_test.cpp
+++ b/libs/androidfw/tests/PosixUtils_test.cpp
@@ -30,14 +30,14 @@
const auto result = ExecuteBinary({"/bin/date", "--help"});
ASSERT_THAT(result, NotNull());
ASSERT_EQ(result->status, 0);
- ASSERT_EQ(result->stdout_str.find("usage: date "), 0);
+ ASSERT_GE(result->stdout_str.find("usage: date "), 0);
}
TEST(PosixUtilsTest, RelativePathToBinary) {
const auto result = ExecuteBinary({"date", "--help"});
ASSERT_THAT(result, NotNull());
ASSERT_EQ(result->status, 0);
- ASSERT_EQ(result->stdout_str.find("usage: date "), 0);
+ ASSERT_GE(result->stdout_str.find("usage: date "), 0);
}
TEST(PosixUtilsTest, BadParameters) {