summaryrefslogtreecommitdiffstats
path: root/logging_test.cpp
diff options
context:
space:
mode:
authorMarri Devender Rao <devenrao@in.ibm.com>2017-04-04 04:16:35 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-04-12 20:54:46 +0000
commit5493210786a3fbf0ec39250e365909ff08beb816 (patch)
tree48f8323d8dc675e2e41e693bd9bf8560395ac31d /logging_test.cpp
parentd41e995d71b14f2c552b4da58eedbe1030cbf002 (diff)
downloadphosphor-logging-5493210786a3fbf0ec39250e365909ff08beb816.tar.gz
phosphor-logging-5493210786a3fbf0ec39250e365909ff08beb816.zip
Add/adjust tests for new commit and report methods
Change-Id: I49ac9574958f4870b04dedd91580c15825c6dd36 Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
Diffstat (limited to 'logging_test.cpp')
-rw-r--r--logging_test.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/logging_test.cpp b/logging_test.cpp
index 2325444..0ad10b7 100644
--- a/logging_test.cpp
+++ b/logging_test.cpp
@@ -18,7 +18,7 @@ Options: \n\
-h, --help Display this usage text. \n\
-c, --commit <string> Commit desired error. \n\n\
Valid errors to commit: \n\
-AutoTestSimple\n";
+AutoTestSimple, AutoTestCreateAndCommit\n";
// validate the journal metadata equals the input value
int validate_journal(const char *i_entry, const char *i_value)
@@ -222,6 +222,13 @@ void commitError(const char *text)
commit(e.name());
}
}
+ else if (strcmp(text, "AutoTestCreateAndCommit") == 0)
+ {
+ report<example::xyz::openbmc_project::Example::Elog::
+ AutoTestSimple>(
+ example::xyz::openbmc_project::Example::Elog::
+ AutoTestSimple::STRING("FOO"));
+ }
return;
}
@@ -248,7 +255,6 @@ int main(int argc, char *argv[])
case 'c':
commitError(optarg);
return 0;
-
case 'h':
case '?':
std::cerr << usage;
OpenPOWER on IntegriCloud