Skip to content

Commit f98ce62

Browse files
committed
string break
1 parent b430fb0 commit f98ce62

File tree

1 file changed

+56
-16
lines changed

1 file changed

+56
-16
lines changed

.ci/buildbot/worker.py

Lines changed: 56 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -214,31 +214,64 @@ def run(
214214
workerjobs=None,
215215
always_clobber=False,
216216
):
217-
"""Runs the boilerplate for a ScriptedBuilder buildbot. It is not necessary to use this function (one can also all run_command() etc. directly), but allows for some more flexibility and safety checks. Arguments passed to this function represent the worker configuration.
218-
219-
We use the term 'clean' for resetting the worker to an empty state. This involves deleting ${prefix}/llvm.src as well as ${prefix}/build.
220-
The term 'clobber' means deleting build artifacts, but not already downloaded git repositories. Build artifacts including build- and install-directories, but not source directories. Changes in the llvm.src directory will be reset before the next build anyway. Clobber is necessary if the build instructions change. Otherwise, we try an incremental build. We consider 'clean' to imply 'clean_obj'.
221-
222-
A buildbot worker will invoke this script using this directory structure, where ${prefix} is a dedicated directory for this builder:
217+
"""
218+
Runs the boilerplate for a ScriptedBuilder buildbot. It is not necessary to
219+
use this function (one can also all run_command() etc. directly), but allows
220+
for some more flexibility and safety checks. Arguments passed to this
221+
function represent the worker configuration.
222+
223+
We use the term 'clean' for resetting the worker to an empty state. This
224+
involves deleting ${prefix}/llvm.src as well as ${prefix}/build.
225+
The term 'clobber' means deleting build artifacts, but not already
226+
downloaded git repositories. Build artifacts including build- and
227+
install-directories, but not source directories. Changes in the llvm.src
228+
directory will be reset before the next build anyway. Clobber is necessary
229+
if the build instructions change. Otherwise, we try an incremental build.
230+
We consider 'clean' to imply 'clean_obj'.
231+
232+
A buildbot worker will invoke this script using this directory structure,
233+
where ${prefix} is a dedicated directory for this builder:
223234
${prefix}/llvm.src # Checkout location for the llvm-source
224235
${prefix}/build # cwd when launching the build script
225236
226-
The build script is called with --workdir=. parameter, i.e. the build artifacts are written into ${prefix}/build. When cleaning, the worker (NOT the build script) will delete ${prefix}/llvm.src; Deleting any contents of ${prefix}/build is to be done by the builder script, e.g. by this function. The builder script can choose to not delete the complete workdir, e.g. additional source checkouts such as the llvm-test-suite.
237+
The build script is called with --workdir=. parameter, i.e. the build
238+
artifacts are written into ${prefix}/build. When cleaning, the worker (NOT
239+
the build script) will delete ${prefix}/llvm.src; Deleting any contents of
240+
${prefix}/build is to be done by the builder script, e.g. by this function.
241+
The builder script can choose to not delete the complete workdir, e.g.
242+
additional source checkouts such as the llvm-test-suite.
227243
228-
The buildbot master will set the 'clean' build property and the environment variable BUILDBOT_CLEAN when in the GUI the option "Clean source code and build directory" is checked by the user. The 'clean_obj' build property and the BUILDBOT_CLEAN_OBJ environment variable will be set when either the "Clean build directory" GUI option is set, or the master detects a change to a CMakeLists.txt or *.cmake file.
244+
The buildbot master will set the 'clean' build property and the environment
245+
variable BUILDBOT_CLEAN when in the GUI the option "Clean source code and
246+
build directory" is checked by the user. The 'clean_obj' build property and
247+
the BUILDBOT_CLEAN_OBJ environment variable will be set when either the
248+
"Clean build directory" GUI option is set, or the master detects a change
249+
to a CMakeLists.txt or *.cmake file.
229250
230251
Parameters
231252
----------
232253
scriptpath
233254
Pass __file__ from the main builder script.
234255
llvmsrcroot
235-
Absolute path to the llvm-project source checkout. Since the builder script is supposed to be a part of llvm-project itself, the builder script can compute it from __file__.
256+
Absolute path to the llvm-project source checkout. Since the builder
257+
script is supposed to be a part of llvm-project itself, the builder
258+
script can compute it from __file__.
236259
parser
237-
Use this argparse.ArgumentParser instead of creating a new one. Allows adding additional command line switched in addition to the pre-defined ones. Build script are encouraged to apply the pre-defined switches.
260+
Use this argparse.ArgumentParser instead of creating a new one. Allows
261+
adding additional command line switched in addition to the pre-defined
262+
ones. Build script are encouraged to apply the pre-defined switches.
238263
clobberpaths
239-
Directories relative to workdir that need to be deleted if the build configuration changes (due to changes of CMakeLists.txt or changes of configuration parameters). Typically, only source checkouts are not deleted.
264+
Directories relative to workdir that need to be deleted if the build
265+
configuration changes (due to changes of CMakeLists.txt or changes of
266+
configuration parameters). Typically, only source checkouts are not
267+
deleted.
240268
workerjobs
241-
Default number of build and test jobs; If set, expected to be the number of jobs of the actual buildbot worker that executes this script. Can be overridden using the --jobs parameter so in case someone needs to reproduce this build, they can adjust the number of jobs for the reproducer platform. Alternatively, the worker can set the BUILDBOT_JOBS environment variable or keep ninja/llvm-lit defaults.
269+
Default number of build and test jobs; If set, expected to be the number
270+
of jobs of the actual buildbot worker that executes this script. Can be
271+
overridden using the --jobs parameter so in case someone needs to
272+
reproduce this build, they can adjust the number of jobs for the
273+
reproducer platform. Alternatively, the worker can set the
274+
BUILDBOT_JOBS environment variable or keep ninja/llvm-lit defaults.
242275
always_clobber
243276
Always clobber the build artifacts, i.e. disable incremental builds.
244277
"""
@@ -260,25 +293,32 @@ def run(
260293

261294
parser = parser or argparse.ArgumentParser(
262295
allow_abbrev=True,
263-
description=f"When executed without arguments, builds the worker's LLVM build configuration in {os.path.abspath(workdir_default)}. Some build configuration parameters can be altered using the following switches:",
296+
description="When executed without arguments, builds the worker's "
297+
f"LLVM build configuration in {os.path.abspath(workdir_default)}. "
298+
"Some build configuration parameters can be altered using the "
299+
"following switches:",
264300
)
265301
parser.add_argument(
266302
"--workdir",
267303
default=workdir_default,
268-
help="Use this dir as workdir to write the build artifact into. --workdir=. uses the current directory.\nWarning: This directory might be deleted",
304+
help="Use this dir as workdir to write the build artifact into. "
305+
"--workdir=. uses the current directory.\nWarning: This directory "
306+
"might be deleted",
269307
)
270308
parser.add_argument(
271309
"--cachefile",
272310
default=relative_if_possible(
273311
pathlib.Path(scriptpath).with_suffix(".cmake"), llvmsrcroot
274312
),
275-
help="File containing the initial values for the CMakeCache.txt for the llvm build.",
313+
help="File containing the initial values for the CMakeCache.txt for "
314+
"the llvm build.",
276315
)
277316
parser.add_argument(
278317
"--clean",
279318
type=bool,
280319
default=convert_bool(os.environ.get("BUILDBOT_CLEAN")),
281-
help="Delete the entire workdir before starting the build, including source directories",
320+
help="Delete the entire workdir before starting the build, including "
321+
"source directories",
282322
)
283323
parser.add_argument(
284324
"--clobber",

0 commit comments

Comments
 (0)