def test_concat_a_b_with_sep_empty(self): a = 'a' b = '' sep = '' r = u.concat_a_b_with_sep(a, b, sep) self.assertEqual(r, 'a') b = 'a' a = '' r = u.concat_a_b_with_sep(a, b, sep) self.assertEqual(r, 'a')
def test_concat_a_b_with_sep(self): a = 'a' b = 'b' sep = '_' r = u.concat_a_b_with_sep(a, b, sep) self.assertEqual(r, 'a_b') a = 'aaaa' b = '' r = u.concat_a_b_with_sep(a, b, sep) self.assertEqual(r, 'aaaa_')
def get_builder(self, build: str, item: str, flavor: str, base: bool = False) -> typing.Tuple[str, str, str]: p = self.config.get_builder_path(build, item) n = self.get_builder_name(build, item, flavor) if base: n = U.concat_a_b_with_sep('no_instr', n, '_') wnm = self.get_builder_file(build, item, flavor) return p, n, wnm
def get_raw_name(self, build: str, item: str, flavor: str) -> str: b_nm = self.config.get_benchmark_name(item) raw_nm = U.concat_a_b_with_sep(b_nm, flavor, '_') return raw_nm
def get_runner_file(self, build: str, item: str, flavor: str) -> str: path = self.config.get_runner_path(build, item) nm = self.get_runner_name(build, item, flavor) file_path = U.concat_a_b_with_sep(path, nm, '/') full_path = U.concat_a_b_with_sep(file_path, 'py', '.') return full_path
def get_runner_name(self, build: str, item: str, flavor: str) -> str: raw_nm = self.get_raw_name(build, item, flavor) cl_nm = U.concat_a_b_with_sep('runner', raw_nm, '_') return cl_nm
def get_builder_name(self, build: str, item: str, flavor: str) -> str: raw_nm = self.get_raw_name(build, item, flavor) # FIXME: remove as soon as the new uniform naming is in place return raw_nm cl_nm = U.concat_a_b_with_sep('build', raw_nm, '_') return cl_nm
def get_analyzer_name(self, build: str, item: str, flavor: str) -> str: raw_nm = self.get_raw_name(build, item, flavor) cl_nm = u.concat_a_b_with_sep('analyse', raw_nm, '_') return cl_nm
def test_concat_a_b_with_sep_all_empty(self): a = '' b = '' sep = '' r = U.concat_a_b_with_sep(a, b, sep) self.assertEqual(r, '')