def test_cli(self): """ Test that creating a Target from the CLI works """ args = "--kind host --password 'foobar'" target = Target.from_cli(shlex.split(args)) self.assertNotEqual(target.os, None)
def main(): target = Target.from_cli() plat_info = target.plat_info # Make sure we get all the information we can, even if it means running for # a bit longer. RTapp calibration will be computed as it is a DeferredValue plat_info.eval_deferred() print(plat_info) path = 'plat_info.yml' plat_info.to_yaml_map(path) print('\nPlatform info written to: {}'.format(path))
#!/usr/bin/env python3 # SPDX-License-Identifier: Apache-2.0 # # Copyright (C) 2018, Arm Limited and contributors. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from lisa.target import Target from devlib.module.sched import SchedDomain target = Target.from_cli() sd_info = target.sched.get_sd_info() for cpuid, cpu in sd_info.cpus.items(): print("== CPU{} ==".format(cpuid)) for domain in cpu.domains.values(): print("\t{} level".format(domain.name)) for flag in domain.flags: print("\t\t{} - {}".format(flag.name, flag.__doc__))