Skip to content

Commit

Permalink
Minor cleanups (#542)
Browse files Browse the repository at this point in the history
* Remove unused imports

* Clean up trailing whitespace

* Remove setting for defunct worker

* Fix replacement-less f-strings
  • Loading branch information
zware authored Oct 16, 2024
1 parent b2834aa commit b128897
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 23 deletions.
18 changes: 10 additions & 8 deletions master/custom/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ class ClangUbsanLinuxBuild(UnixBuild):
]
factory_tags = ["clang", "ubsan", "sanitizer"]


class ClangUbsanFunctionLinuxBuild(UnixBuild):
buildersuffix = ".clang-ubsan-function"
configureFlags = [
Expand All @@ -332,6 +333,7 @@ class ClangUbsanFunctionLinuxBuild(UnixBuild):
]
factory_tags = ["clang", "ubsan", "sanitizer"]


class ClangUnixInstalledBuild(UnixInstalledBuild):
buildersuffix = ".clang-installed"
configureFlags = [
Expand Down Expand Up @@ -1238,13 +1240,13 @@ def setup(self, parallel, branch, **kwargs):
command=["./configure", "--prefix", "$(PWD)/target"] + self.configureFlags
)
)

compile = ["make", self.makeTarget]
if parallel:
compile = ["make", parallel, self.makeTarget]

self.addStep(Compile(command=compile, env=self.compile_environ))

self.addStep(
ShellCommand(
name="pythoninfo",
Expand All @@ -1254,7 +1256,7 @@ def setup(self, parallel, branch, **kwargs):
env=self.test_environ,
)
)

test = [
"valgrind",
"--leak-check=full",
Expand All @@ -1264,16 +1266,16 @@ def setup(self, parallel, branch, **kwargs):
"--track-origins=yes",
"--trace-children=yes",
"--suppressions=$(PWD)/Misc/valgrind-python.supp",
"./python",
"./python",
"-m", "test",
*self.testFlags,
f"--timeout={self.test_timeout}",
]

self.addStep(Test(
command=test,
timeout=step_timeout(self.test_timeout),
env=self.test_environ,
))
self.addStep(Clean())

self.addStep(Clean())
18 changes: 9 additions & 9 deletions master/custom/pr_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@

GITHUB_PROPERTIES_WHITELIST = ["*.labels"]

BUILD_SCHEDULED_MESSAGE = f"""\
:robot: New build scheduled with the buildbot fleet by @{{user}} for commit {{commit}} :robot:
BUILD_SCHEDULED_MESSAGE_TEMPLATE = """\
:robot: New build scheduled with the buildbot fleet by @{user} for commit {commit} :robot:
If you want to schedule another build, you need to add the <kbd>{{label}}</kbd> label again.
If you want to schedule another build, you need to add the <kbd>{label}</kbd> label again.
"""

BUILD_COMMAND_SCHEDULED_MESSAGE = f"""\
:robot: New build scheduled with the buildbot fleet by @{{user}} for commit {{commit}} :robot:
BUILD_COMMAND_SCHEDULED_MESSAGE_TEMPLATE = """\
:robot: New build scheduled with the buildbot fleet by @{user} for commit {commit} :robot:
The command will test the builders whose names match following regular expression: `{{filter}}`
The command will test the builders whose names match following regular expression: `{filter}`
The builders matched are:
{{builders}}
{builders}
"""

BUILDBOT_COMMAND = re.compile(r"!buildbot (.+)")
Expand Down Expand Up @@ -82,7 +82,7 @@ def _remove_label_and_comment(self, payload, label):
yield http.post(
url.replace(self.github_api_endpoint, ""),
json={
"body": BUILD_SCHEDULED_MESSAGE.format(
"body": BUILD_SCHEDULED_MESSAGE_TEMPLATE.format(
user=username, commit=commit, label=label
)
},
Expand Down Expand Up @@ -273,7 +273,7 @@ def handle_issue_comment(self, payload, event):

yield self._post_comment(
payload["issue"]["comments_url"],
BUILD_COMMAND_SCHEDULED_MESSAGE.format(
BUILD_COMMAND_SCHEDULED_MESSAGE_TEMPLATE.format(
user=payload["sender"]["login"],
commit=head_sha,
filter=builder_filter,
Expand Down
6 changes: 0 additions & 6 deletions master/master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ from custom.builders import ( # noqa: E402
get_builders,
STABLE,
ONLY_MAIN_BRANCH,
TIER_1,
TIER_2,
)


Expand Down Expand Up @@ -139,10 +137,6 @@ c["schedulers"] = []

parallel = {w.name: f"-j{w.parallel_tests}" for w in WORKERS if w.parallel_tests}
extra_factory_args = {
"ware-gentoo-x86": {
# test curses as well
"test_with_PTY": True,
},
"cstratak-RHEL8-ppc64le": {
# Increase the timeout on this slow worker
"timeout_factor": 2,
Expand Down

0 comments on commit b128897

Please sign in to comment.