aboutsummaryrefslogtreecommitdiff
path: root/tools/buildman
AgeCommit message (Collapse)AuthorFilesLines
2023-10-02Merge branch 'next'Tom Rini5-10/+25
Signed-off-by: Tom Rini <trini@konsulko.com>
2023-09-23buildman: Start the clock when the build startsSimon Glass1-1/+2
The Kconfig and maintainer processing can take a while, sometimes 5 seconds or more. This skews the timing printed by buildmand when the build completes. Start the clock when the threads start to avoid this problem. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Tom Rini <trini@konsulko.com>
2023-09-23buildman: Show progress when regenerating the board.cfg fileSimon Glass2-4/+14
This can take a while, so show a message when starting. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by Tom Rini <trini@konsulko.com>
2023-09-23buildman: Keep all common output filesSimon Glass1-4/+8
Make a list of common output extensions and use it to ensure that the -k option preserves all of these. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Tom Rini <trini@konsulko.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-23buildman: Fix full help for Python 3.8Simon Glass1-2/+8
With Python versions older than 3.9 Buildman produces an error on start-up. Fix this with a workaround for importlib. There is already a workaround for v3.6 but I am not sure if that is still functioning. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-26CI: Update to gcc-13.2.0Tom Rini1-1/+1
The latest kernel.org toolchains for gcc are now 13.2.0, so upgrade to that. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2023-08-05buildman: Drop warning about orphaned defconfigsSimon Glass2-14/+2
Some boards use a MAINTAINERS entry to specify common files without referencing any defconfigs. This is allowed and should not result in a warning. Drop the warning in this case. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-05buildman: Exit after reading toolchainSimon Glass1-0/+3
Recent refactoring changed buildman to continue operation after fetching a toolchain. Fix this. Fixes: b8680646521 ("bulidman: Move toolchain handling to a function") Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-25buildman: Specify the output directory in testsWIP/25Jul2023Simon Glass1-8/+11
The default output directory is generally '../' in tests so we end up trying to create '../.bm-work'. This does not work with azure, so update these tests to use the temporary directory instead. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Enable test coverageSimon Glass2-1/+16
Enable measuring test coverage for buildman so we can see the gaps. It is currently at 68%. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Add an option to check maintainers and targetsSimon Glass3-5/+16
In poking around it seems that many boards don't define a CONFIG_TARGET Kconfig variable. This is not strictly necessary, but add an option to buildman so these can be viewed. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Use -D for --debugSimon Glass2-7/+7
Change -D to mean --debug for consistency with other tools. This is not a commonly used option, so the impact should be minimal. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Add a way to print the architecture for a boardSimon Glass3-0/+33
This is useful for some tools and is easily available for buildman. Add a new --print-arch option. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move copy_files() out ot BuilderThread classSimon Glass1-23/+24
This does not need to be in the class. Move it out to avoid a pylint warning. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Tidy up some comments in builderthreadSimon Glass1-30/+36
Make sure all functions have full argument documentation. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Tidy up reporting of a toolchain errorSimon Glass2-8/+5
Provide the text of the exception when something goes wrong. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Avoid passing result into _read_done_file()Simon Glass1-8/+11
Move the creating of the result object into the function which sets it up, to simplify the code. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Create a function to handle config and buildSimon Glass1-36/+61
Move this code into a _config_and_build() function, so reduce the size of run_commit(). Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move checkout code to a separate functionSimon Glass1-9/+21
Put this in its own function to reduce the size of the run_commit() function Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move code to decide output dirsSimon Glass1-9/+25
Put this in its own function to reduce the size of the run_commit() function. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move code to remove old outputsSimon Glass1-9/+19
Put this in its own function to reduce the size of the run_commit() function. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move reading of the done file into a functionSimon Glass1-24/+42
Move this logic into its own function to reduce the size of the run_commt() function. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move bulid code into its own functionSimon Glass1-10/+30
Split this into its own function so reduce the size of run_commit(). Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move reconfigure code into its own functionSimon Glass1-11/+30
Split this into its own function so reduce the size of run_commit(). Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Convert config_out to string IOSimon Glass1-4/+5
This is probably a little more efficient and it allows passing the object to another function to write data. Convert config_out to use a string I/O device. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move more things into _build_args()Simon Glass1-21/+34
Move more of the argument-building code into this function. Fix a missing assignment for out_rel_dir too. Rename the function since it now builds all the arguments. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move setting of toolchain arguments to _build_args()Simon Glass1-4/+5
Move a few more pieces to this new function. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Start a function to set up the make argumentsSimon Glass1-15/+23
Move some of this code into a new funciion, to help reduce the size of the run_commits() function. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Drop unnecessary assignment of config_outSimon Glass1-1/+0
This is already set up earlier in the function, so drop the extra assignment. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Correct invalid use of out_dir variableSimon Glass1-2/+2
This variable has a different meaning in the outer scope. Use a different name to avoid confusion, or bugs. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Export _get_output_dir() to avoid warningsSimon Glass3-6/+6
Make this a public memory since it is used outside the class. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Correct most pylint warnings in builderthreadSimon Glass1-44/+51
Fix the easy warnings in this file. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Convert camel case in builderthread.pySimon Glass2-29/+29
Convert this file to snake case and update all files which use it. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Split parser creation in twoSimon Glass1-11/+33
Split this into two functions to avoid a warning about too many statements. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Convert camel case in builder.pySimon Glass5-146/+145
Convert this file to snake case and update all files which use it. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Convert camel case in bsettings.pySimon Glass6-24/+24
Convert this file to snake case and update all files which use it. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Convert to argparseSimon Glass4-146/+148
Use argparse to parse the arguments, since OptionParser is deprecated now. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Add a test for --boardsSimon Glass3-2/+14
Add a simple functional test for the --boards option. Fix the example in the docs while we are here. Also improve the docs for Builder.count so it is clearer what it contains. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Correct most pylint warnings in cmdlineSimon Glass1-4/+11
Tidu up warnings in this file. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Convert camel case in cmdline.pySimon Glass3-3/+3
Convert this file to snake case and update all files which use it. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Create a function to get number of built commitsSimon Glass1-9/+25
Move this code into a function. This removes the last pylint error in the control module. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Use get_alow_missing() directly to avoid varSimon Glass1-5/+4
Avoid an unnecessary local variable by moving this code to a function. This fixes the pylint warning about too many local variables. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move getting the adjust_cfg into run_builder()Simon Glass1-11/+27
Move this into its own function to reduce the size of do_buildman(). Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move checking for make into run_builder()Simon Glass1-6/+8
This is not needed until the builder is run. Move it there to reduce the size of the do_buildman() function. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Adjust show_toolchain_prefix() to not returnSimon Glass1-5/+2
This function does not need to return. Simplify the code by exiting immediately. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Drop some unnecessary variablesSimon Glass1-6/+2
Drop some variables at the end of the do_bulidman() function. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Moving running of the builder into a functionSimon Glass1-21/+35
Move this code into a new function. This removes the pylint warning about too many branches. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Tweak commits and show_bloatSimon Glass1-8/+5
Move setting of show_bloat to adjust_options() and adjust how the commits variable is set. Together these remove the pylint warning about too many statements. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move remaining builder properties to constructorSimon Glass2-18/+25
Do these all in the constructor, so it is consistent. Move the stray builder comment into the correct place. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Avoid too many returns in do_buildman()Simon Glass1-4/+5
Fix the pylint warning by using a variable instead of lots of 'return' statements. Signed-off-by: Simon Glass <sjg@chromium.org>