summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Greg Kaiser <gkaiser@google.com> 2019-05-23 23:18:37 -0700
committer android-build-merger <android-build-merger@google.com> 2019-05-23 23:18:37 -0700
commit9c1dc3fd83a918b7ca9bce7b435076ea816f7829 (patch)
treec9039e97a47a8d35394295c8ad1571e3ee9aa9ef
parent2abb41eb1f5e49a2e5540e05bec9be65752ab264 (diff)
parentaa5e44f648b9ba5a04473588d747b9978803a929 (diff)
Merge "dumpstate_test: Minor tweak to comments" am: fa7652f29c
am: aa5e44f648 Change-Id: I25aad150022b02a0d67d9bd463a9e6ebf4e27dbc
-rw-r--r--cmds/dumpstate/tests/dumpstate_test.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/cmds/dumpstate/tests/dumpstate_test.cpp b/cmds/dumpstate/tests/dumpstate_test.cpp
index 71d15f4761..c5d01fdf25 100644
--- a/cmds/dumpstate/tests/dumpstate_test.cpp
+++ b/cmds/dumpstate/tests/dumpstate_test.cpp
@@ -664,7 +664,8 @@ TEST_F(DumpstateTest, RunCommandNoTitle) {
TEST_F(DumpstateTest, RunCommandWithTitle) {
EXPECT_EQ(0, RunCommand("I AM GROOT", {kSimpleCommand}));
EXPECT_THAT(err, StrEq("stderr\n"));
- // We don't know the exact duration, so we check the prefix and suffix
+ // The duration may not get output, depending on how long it takes,
+ // so we just check the prefix.
EXPECT_THAT(out,
StartsWith("------ I AM GROOT (" + kSimpleCommand + ") ------\nstdout\n"));
}
@@ -699,7 +700,8 @@ TEST_F(DumpstateTest, RunCommandWithMultipleArgs) {
TEST_F(DumpstateTest, RunCommandDryRun) {
SetDryRun(true);
EXPECT_EQ(0, RunCommand("I AM GROOT", {kSimpleCommand}));
- // We don't know the exact duration, so we check the prefix and suffix
+ // The duration may not get output, depending on how long it takes,
+ // so we just check the prefix.
EXPECT_THAT(out, StartsWith("------ I AM GROOT (" + kSimpleCommand +
") ------\n\t(skipped on dry run)\n"));
EXPECT_THAT(err, IsEmpty());
@@ -1037,7 +1039,8 @@ TEST_F(DumpstateTest, DumpFileNotFoundNoTitle) {
TEST_F(DumpstateTest, DumpFileNotFoundWithTitle) {
EXPECT_EQ(-1, DumpFile("Y U NO EXIST?", "/I/cant/believe/I/exist"));
EXPECT_THAT(err, IsEmpty());
- // We don't know the exact duration, so we check the prefix and suffix
+ // The duration may not get output, depending on how long it takes,
+ // so we just check the prefix.
EXPECT_THAT(out, StartsWith("*** Error dumping /I/cant/believe/I/exist (Y U NO EXIST?): No "
"such file or directory\n"));
}