def _read_config(self): conf_binary_dir = conf.get('binary_dir') conf_build_dir = conf.get('build_dir') if self.binary_dir is None and conf_binary_dir is not None: self.binary_dir = os.path.join(self.root, conf_binary_dir) if self.build_dir is None and conf_build_dir is not None: self.build_dir = os.path.join(self.root, conf_build_dir) if self.build_dir is not None: self.search_dirs.append(self.build_dir) if self.binary_dir is not None: self.search_dirs.append(self.binary_dir)
def _run_standalone_bins(self): bin_exts = conf.get('bin-extensions') ff = FilesFinder() ff.filter_begin_with("utest_", FilterType.File) ff.filter_ext_is_any(bin_exts, FilterType.File) files, _ = ff.run(self.root) for f in files: self._run_simple_bin(f)
def get_cmd(self): bp = self.bin_path ext = os.path.splitext(bp)[1] #if ext == '.bin': # return [self.bin_path] runner = conf.get('run-app-custom-cmd-{}'.format(ext[1:])) if not runner: raise Exception('Cannot run binary {}: unknown format'.format(bp)) return [x.format(self.bin_path) for x in runner]
def build(self, in_path, out_path): cxx = conf.get('filebuilder-cxx') cxx_flags = conf.get('filebuilder-cxx-flags') ucmd.run_cmd([cxx, in_path, '-o', out_path] + cxx_flags, exp0=True)
def build(self, in_path, out_path): cc = conf.get('filebuilder-cc') cc_flags = conf.get('filebuilder-cc-flags') ucmd.run_cmd([cc, in_path, '-o', out_path] + cc_flags, exp0=True)