Skip to content

[BOLT] Increase nfc-test coverage #467

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/set-nfc-tests-once
Choose a base branch
from
Open
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
26 changes: 19 additions & 7 deletions zorg/buildbot/builders/BOLTBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,20 @@ def getBOLTCmakeBuildFactory(
logic.
"""
if is_nfc:
# Marker for relevant source code changes, e.g., when updating tests.
# Generated by nfc-check-setup.py and used to trigger the in-tree tests.
markerDiffCode = ".llvm-bolt.changes"
# Individual markers for running either in-tree or out-of-tree tests.
markerInTree = ".llvm-bolt.run.in-tree"
markerOutOfTree = ".llvm-bolt.run.out-of-tree"

f.addSteps([
ShellCommand(
name='nfc-check-setup',
command=[
f"../{f.monorepo_dir}/bolt/utils/nfc-check-setup.py",
"--switch-back"
f"../{f.monorepo_dir}/bolt/utils/nfc-check-setup.py",
"--switch-back",
"--check-bolt-sources"
],
description=('Setup NFC testing'),
warnOnFailure=True,
Expand Down Expand Up @@ -124,9 +132,13 @@ def getBOLTCmakeBuildFactory(
env=env),
ShellCommand(
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'),
command=(
f'rm -f {markerInTree} {markerOutOfTree}; '
f'[ -f {markerDiffCode} ] && touch {markerInTree};'
f'rm -f {markerDiffCode}; '
f'cmp -s bin/llvm-bolt.old bin/llvm-bolt.new || ('
f'touch {markerInTree}; touch {markerOutOfTree}) '
),
description=('Check if llvm-bolt binaries are different and '
'skip the following nfc-check steps'),
haltOnFailure=False,
Expand All @@ -139,7 +151,7 @@ def getBOLTCmakeBuildFactory(
warnOnFailure=True,
haltOnFailure=False,
flunkOnFailure=True,
doStepIf=FileExists('build/.llvm-bolt.diff'),
doStepIf=FileExists(f"build/{markerInTree}"),
env=env),
LitTestCommand(
name='nfc-check-large-bolt',
Expand All @@ -150,7 +162,7 @@ def getBOLTCmakeBuildFactory(
warnOnFailure=True,
haltOnFailure=False,
flunkOnFailure=True,
doStepIf=FileExists('build/.llvm-bolt.diff'),
doStepIf=FileExists(f"build/{markerOutOfTree}"),
env=env),
])

Expand Down