aboutsummaryrefslogtreecommitdiffstats
path: root/utils/cec-compliance
diff options
context:
space:
mode:
authorHans Verkuil <hansverk@cisco.com>2018-05-15 14:41:50 +0200
committerHans Verkuil <hansverk@cisco.com>2018-05-15 14:41:50 +0200
commite2038ec6451293787b929338c2a671c732b8693d (patch)
tree27864553705b9d58107e48737a1cef3ec28c5ea1 /utils/cec-compliance
parent51cfcefe65225430fd6794301adcaae133ebfc2d (diff)
cec-compliance: add --skip-info option
Skips showing the device info part and the explanation of the test terminology. Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Diffstat (limited to 'utils/cec-compliance')
-rw-r--r--utils/cec-compliance/cec-compliance.cpp28
1 files changed, 18 insertions, 10 deletions
diff --git a/utils/cec-compliance/cec-compliance.cpp b/utils/cec-compliance/cec-compliance.cpp
index 286035fc..790f7dfc 100644
--- a/utils/cec-compliance/cec-compliance.cpp
+++ b/utils/cec-compliance/cec-compliance.cpp
@@ -41,6 +41,7 @@ enum Option {
OptNoWarnings = 'n',
OptRemote = 'r',
OptReplyThreshold = 'R',
+ OptSkipInfo = 's',
OptTimeout = 't',
OptTrace = 'T',
OptVerbose = 'v',
@@ -109,7 +110,8 @@ static struct option long_options[] = {
{"timeout", required_argument, 0, OptTimeout},
{"trace", no_argument, 0, OptTrace},
{"verbose", no_argument, 0, OptVerbose},
- { "wall-clock", no_argument, 0, OptWallClock },
+ {"skip-info", no_argument, 0, OptSkipInfo},
+ {"wall-clock", no_argument, 0, OptWallClock},
{"interactive", no_argument, 0, OptInteractive},
{"reply-threshold", required_argument, 0, OptReplyThreshold},
@@ -197,6 +199,7 @@ static void usage(void)
"\n"
" -h, --help Display this help message\n"
" -n, --no-warnings Turn off warning messages\n"
+ " -s, --skip-info Skip Driver Info output\n"
" -T, --trace Trace all called ioctls\n"
" -v, --verbose Turn on verbose reporting\n"
" -w, --wall-clock Show timestamps as wall-clock time\n"
@@ -1305,7 +1308,10 @@ int main(int argc, char **argv)
}
- cec_driver_info(caps, laddrs, node.phys_addr);
+ if (options[OptSkipInfo])
+ printf("\n");
+ else
+ cec_driver_info(caps, laddrs, node.phys_addr);
bool missing_pa = node.phys_addr == CEC_PHYS_ADDR_INVALID && (node.caps & CEC_CAP_PHYS_ADDR);
bool missing_la = laddrs.num_log_addrs == 0 && (node.caps & CEC_CAP_LOG_ADDRS);
@@ -1319,14 +1325,16 @@ int main(int argc, char **argv)
if (missing_la || missing_pa)
exit(-1);
- printf("\nCompliance test for device %s:\n\n", device);
- printf(" The test results mean the following:\n"
- " OK Supported correctly by the device.\n"
- " OK (Not Supported) Not supported and not mandatory for the device.\n"
- " OK (Presumed) Presumably supported. Manually check to confirm.\n"
- " OK (Unexpected) Supported correctly but is not expected to be supported for this device.\n"
- " OK (Refused) Supported by the device, but was refused.\n"
- " FAIL Failed and was expected to be supported by this device.\n\n");
+ if (!options[OptSkipInfo]) {
+ printf("\nCompliance test for device %s:\n\n", device);
+ printf(" The test results mean the following:\n"
+ " OK Supported correctly by the device.\n"
+ " OK (Not Supported) Not supported and not mandatory for the device.\n"
+ " OK (Presumed) Presumably supported. Manually check to confirm.\n"
+ " OK (Unexpected) Supported correctly but is not expected to be supported for this device.\n"
+ " OK (Refused) Supported by the device, but was refused.\n"
+ " FAIL Failed and was expected to be supported by this device.\n\n");
+ }
node.has_cec20 = laddrs.cec_version >= CEC_OP_CEC_VERSION_2_0;
node.num_log_addrs = laddrs.num_log_addrs;

Privacy Policy