argument parser: use CLI11 and add unit tests
CLI11 is one of the most commonly use argument parser in OpenBMC. It can
save ~150 lines of codes in this project.
We are hitting argument related bugs that not covered in unit tests.
This test adds a test for argument parsing.
Tested: QEMU IPMI/Redfish worked.
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: Ib409c7e6a82ad31049f2da3e32727ebdf185f0fc
diff --git a/dist/phosphor-certificate-manager@.service b/dist/phosphor-certificate-manager@.service
index 3b841fe..8edbb4e 100644
--- a/dist/phosphor-certificate-manager@.service
+++ b/dist/phosphor-certificate-manager@.service
@@ -2,8 +2,9 @@
Description=Phosphor certificate manager for %I
[Service]
+Environment=UNIT=""
EnvironmentFile=/usr/share/phosphor-certificate-manager/%I
-ExecStart=/usr/bin/env phosphor-certificate-manager --endpoint=${ENDPOINT} --path=${CERTPATH} --unit=${UNIT} --type=${TYPE}
+ExecStart=/usr/bin/env phosphor-certificate-manager --endpoint ${ENDPOINT} --path ${CERTPATH} --type ${TYPE} --unit ${UNIT}
SyslogIdentifier=phosphor-certificate-manager
Restart=always
UMask=0007