Skip to content

Commit

Permalink
don't print warning when unknown targets are found (fixes EESSI#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
boegel committed May 18, 2023
1 parent 681acd1 commit fc3573b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions init/eessi_software_subdir_for_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ def find_best_target(eessi_prefix):
continue
if uarch in KNOWN_CPU_UARCHS:
target_uarchs.append(KNOWN_CPU_UARCHS[uarch])
else:
warning('Ignoring unknown target "%s"' % uarch)

host_uarch = KNOWN_CPU_UARCHS[host_cpu_name]
compat_target_uarchs = sorted([x for x in target_uarchs if x <= host_uarch])
Expand Down
4 changes: 2 additions & 2 deletions init/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ def broadwell_host_triple():
prep_tmpdir(tmpdir, ['x86_64/intel/ivybridge'])
assert find_best_target(tmpdir) == 'x86_64/intel/ivybridge'

# unknown targets don't cause trouble (only warning)
# unknown targets don't cause trouble
prep_tmpdir(tmpdir, ['x86_64/intel/no_such_intel_cpu'])
assert find_best_target(tmpdir) == 'x86_64/intel/ivybridge'
captured = capsys.readouterr()
assert captured.out == ''
assert captured.err == 'WARNING: Ignoring unknown target "no_such_intel_cpu"\n'
assert captured.err == ''

# older targets have to no impact on best target (sandybridge < ivybridge)
prep_tmpdir(tmpdir, ['x86_64/intel/sandybridge'])
Expand Down

0 comments on commit fc3573b

Please sign in to comment.