summaryrefslogtreecommitdiff
path: root/tools/buildman
AgeCommit message (Collapse)AuthorFilesLines
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>
2023-07-24buildman: Move commit numbering into determine_series()Simon Glass1-3/+7
Commits are numbered for use in tests. Do this in determine_series() since it is already dealing with the series. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move setting up the output dir into a functionSimon Glass1-12/+33
Move this code into a separate function to reduce the size of the main do_buildman() directory. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move counting of commits into a functionSimon Glass1-22/+41
Move this code into a separate function to avoid a pylint warning in determine_series(). Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Build option-adjusting into a functionSimon Glass1-20/+33
Create a separate function to adjust options. Also move show_actions() up as far as we can in the function. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Pass option values to show_actions()Simon Glass1-9/+13
Pass in the individual values rather than the whole options object, so we can see what is needed. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Pass option values to get_action_summary()Simon Glass1-7/+15
Pass in the individual values rather than the whole options object, so we can see what is needed. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move output-file setup into one placeSimon Glass1-8/+7
Collect the two parts of the output-file handling into single place. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24bulldman: Set up output_dir earlierSimon Glass1-5/+5
Set up output_dir at the start of the main function, instead of updating the options.output_dir option. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24bulidman: Move toolchain handling to a functionSimon Glass1-15/+38
Move the code for dealing with toolchains out into its own function, to reduce the size of the main function. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move Boards-object code into a functionSimon Glass1-26/+48
Move the code which obtains a Boards object into its own function, to reduce the size of the main function. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24bulidman: Move more code to determine_series()Simon Glass1-40/+42
Move some more series-related code here, to reduce the size of the main function. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move board-selection code into a functionSimon Glass1-16/+43
Create a new determine_boards() function to hold the code which selects which boards to build. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Add tests for excluding thingsSimon Glass1-0/+24
Add some tests for the -x flag. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move dry-run handling higher in do_buildman()Simon Glass1-43/+45
Move this up above where the builder is created, since it no-longer makes use of the builder. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Drop use of builder in show_actions()Simon Glass1-4/+4
This function only needs the output directory from the builder. This is passed into the builder, so just pass the same value to show_actions(). The avoids needing a builder to call show_actions(). Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Add a test for the -A optionSimon Glass1-0/+7
This lacks a test at present. Add one. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move fetch-arch code into a separate functionSimon Glass1-18/+31
Reduce the size of the do_buildman() function a little by moving the code that handles --fetch-arch into a separate function. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move series calculations into a separate functionSimon Glass1-39/+56
Reduce the size of the do_buildman() function a little by moving the code that figures out the series into a separate function. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move full-help processing to mainSimon Glass2-11/+9
This does not need any of the control features. Move it out of main to reduce the size of the do_buildman() function. For Python 3.6 the -H feature will not work, but this does not seem to be a huge problem, as it dates from 2016. Signed-off-by: Simon Glass <sjg@chromium.org>