def read_mbed_devices(self): gt_log("auto-detecting connected devices...") self.mbeds = mbed_lstools.create() self.mbeds_list = self.mbeds.list_mbeds() self.platform_list = self.mbeds.list_platforms_ext() for mbed in self.platform_list: n = int(self.platform_list[mbed]) gt_log_tab("found %d platform%s '%s'"% (n, '' if n==1 else 's', mbed)) if not self.platform_list: gt_log_warn("failed to auto-detect any compatible device")
def scan_mesh_tests(self, verbose=False): result = [] faulty_benches = [] pwd = '.' dirs = [os.path.join(pwd, o) for o in os.listdir(pwd) if os.path.isdir(os.path.join(pwd, o))] for d in dirs: bench_path = os.path.join(d, 'bench.json') bench_data = self.read_json_from_file(bench_path) if bench_data: gt_log_tab("found bench config under '%s'"% bench_path) result.append(bench_path) else: faulty_benches.append(d) if verbose and faulty_benches: gt_log_warn("unknown bench configurations:") for d in faulty_benches: gt_log_tab("directory '%s'"% d) self.benches = result return not result