Skip to content

[BOLT] Set nfc-tests once #466

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: users/paschalis-mpeis/gnu-buildid-and-cleanup
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 16 additions & 11 deletions zorg/buildbot/builders/BOLTBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,24 @@ def getBOLTCmakeBuildFactory(
addNinjaSteps(
f,
targets=targets,
checks=checks,
checks = None if is_nfc else checks,
env=env,
**kwargs)

"""
In NFC mode we conditionally run tests only when the llvm-bolt binary has
changed between the previous and current revision. We skipped passing checks
to addNinjaSteps, so we add those checks below, along with the conditional
logic.
"""
if is_nfc:
f.addSteps([
ShellCommand(
name='nfc-check-setup',
command=[f"../{f.monorepo_dir}/bolt/utils/nfc-check-setup.py"],
command=[
f"../{f.monorepo_dir}/bolt/utils/nfc-check-setup.py",
"--switch-back"
],
description=('Setup NFC testing'),
warnOnFailure=True,
haltOnFailure=False,
Expand All @@ -114,9 +123,8 @@ def getBOLTCmakeBuildFactory(
descriptionDone=["NFC-Mode unique IDs in binaries"],
env=env),
ShellCommand(
name='check-bolt-different',
command=('find -name timing.log -delete; '
'rm -f .llvm-bolt.diff; '
name='nfc-check-bolt-different',
command=('rm -f .llvm-bolt.diff; '
'cmp -s bin/llvm-bolt.old bin/llvm-bolt.new || '
'touch .llvm-bolt.diff'),
description=('Check if llvm-bolt binaries are different and '
Expand All @@ -125,15 +133,12 @@ def getBOLTCmakeBuildFactory(
env=env),
LitTestCommand(
name='nfc-check-bolt',
command=['bin/llvm-lit', '-sv', '-j4',
# bolt-info will always mismatch in NFC mode
'--xfail=bolt-info.test',
'tools/bolt/test'],
command=["ninja", "check-bolt"],
description=["running", "NFC", "check-bolt"],
descriptionDone=["NFC", "check-bolt", "completed"],
warnOnFailure=True,
haltOnFailure=False,
flunkOnFailure=False,
flunkOnFailure=True,
doStepIf=FileExists('build/.llvm-bolt.diff'),
env=env),
LitTestCommand(
Expand All @@ -144,7 +149,7 @@ def getBOLTCmakeBuildFactory(
descriptionDone=["NFC", "check-large-bolt", "completed"],
warnOnFailure=True,
haltOnFailure=False,
flunkOnFailure=False,
flunkOnFailure=True,
doStepIf=FileExists('build/.llvm-bolt.diff'),
env=env),
])
Expand Down
23 changes: 12 additions & 11 deletions zorg/buildbot/builders/UnifiedTreeBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,17 +233,18 @@ def trunc50(name):
else:
check_env = env or {}

for check in checks:
f.addStep(LitTestCommand(name=trunc50("test-%s-%s" % (step_name, check)),
command=['ninja', check],
description=[
"Test", "just", "built", "components", "for",
check,
],
env=check_env,
workdir=obj_dir,
**kwargs # Pass through all the extra arguments.
))
if checks:
for check in checks:
f.addStep(LitTestCommand(name=trunc50("test-%s-%s" % (step_name, check)),
command=['ninja', check],
description=[
"Test", "just", "built", "components", "for",
check,
],
env=check_env,
workdir=obj_dir,
**kwargs # Pass through all the extra arguments.
))

# Install just built components
if install_dir:
Expand Down