示例#1
0
  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')
示例#2
0
  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_')
示例#3
0
 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
示例#4
0
 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
示例#5
0
 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
示例#6
0
 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
示例#7
0
 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
示例#8
0
 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
示例#9
0
 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, '')