diff options
author | Rod Smith <rod.smith@canonical.com> | 2015-09-01 12:30:32 -0400 |
---|---|---|
committer | Rod Smith <rod.smith@canonical.com> | 2015-09-01 12:30:32 -0400 |
commit | 879a377843d9bdcf3955da59d7bef9c0d2c8b650 (patch) | |
tree | 3247866a8cbc447a52cea89377be4b4017b576b9 /bin | |
parent | bd0af3946dcc9d1d90ade3df26e63085451d5c23 (diff) |
Incorporated Jeff's suggestion to change --cpu_only option to cpu_check alternative to client or server test type
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/dmitest | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/bin/dmitest b/bin/dmitest index 4f36810..9fed36d 100755 --- a/bin/dmitest +++ b/bin/dmitest @@ -32,9 +32,8 @@ Include chassis, system, and base boad version numbers among tests. :param --test_serials: Include system and base board serial numbers among tests. -:param --cpu_only: - Don't perform usual tests, except for CPU test. Note that the - desktop/server specification is ignored if this option is used. +:param cpu_check: + Don't perform usual tests, except for CPU test. :param desktop: SUT is a desktop or laptop :param server: @@ -111,7 +110,7 @@ def standard_tests(args, stream): shipped in those form factors, so we don't flag that combination as an error. """ - if args.system_type == 'server': + if args.test_type == 'server': if not find_in_section(stream, 'Chassis Information', 'Type:', ['server', 'rack mount', 'blade', 'expansion chassis', 'multi-system'], False): @@ -223,18 +222,15 @@ def serial_tests(args, stream): def main(): """Main function.""" parser = ArgumentParser("dmitest") - parser.add_argument('system_type', - help="System type ('server' or 'desktop').", - choices=['server', 'desktop']) + parser.add_argument('test_type', + help="Test type ('server', 'desktop' or 'cpu-check').", + choices=['server', 'desktop', 'cpu-check']) parser.add_argument('--dmifile', help="File to use in lieu of dmidecode.") parser.add_argument('--test_versions', action="store_true", help="Set to check version information") parser.add_argument('--test_serials', action="store_true", help="Set to check serial number information") - parser.add_argument('--cpu_only', action="store_true", - help="Set to not perform standard tests, " + - "just the CPU validity test") args = parser.parse_args() # Command to retrieve DMI information @@ -252,7 +248,7 @@ def main(): return 1 retval = 0 - if not args.cpu_only: + if args.test_type == 'server' or args.test_type == 'desktop': retval += standard_tests(args, stream) if args.test_versions: retval += version_tests(args, stream) |