summaryrefslogtreecommitdiffstats
path: root/tools/buildman/control.py
Commit message (Collapse)AuthorAgeFilesLines
* buildman: Add an option to write the full build outputSimon Glass2015-01-141-1/+2
| | | | | | | | Normally buildman runs with 'make -s' meaning that only errors and warnings appear in the log file. Add a -V option to run make in verbose mode, and with V=1, causing a full build log to be created. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Add the option to download toolchains from kernel.orgSimon Glass2015-01-141-0/+16
| | | | | | | | | | | | | The site at https://www.kernel.org/pub/tools/crosstool/ is a convenient repository of toolchains which can be used for U-Boot. Add a feature to download and install a toolchain for a selected architecture automatically. It isn't clear how long this site will stay in the current place and format, but we should be able to rely on bug reports if it changes. Suggested-by: Marek Vašut <marex@denx.de> Suggested-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Add an option to use the full tool chain pathSimon Glass2015-01-141-1/+1
| | | | | | | | | | | | | | In some cases there may be multiple toolchains with the same name in the path. Provide an option to use the full path in the CROSS_COMPILE environment variable. Note: Wolfgang mentioned that this is dangerous since in some cases there may be other tools on the path that are needed. So this is set up as an option, not the default. I will need test confirmation (i.e. that this commit fixes a real problem) before merging it. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Steve Rae <srae@broadcom.com>
* buildman: Allow specifying a range of commits to buildSimon Glass2015-01-141-4/+15
| | | | | | | | Adjust the -b flag to permit a range expression as well as a branch. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Tested-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
* buildman: Don't remove entire output directory when testingSimon Glass2015-01-141-1/+2
| | | | | | | | When running tests the output directory is often wiped. This is only safe if a branch is being built. The output directory may contain other things besides the buildman test output. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Add an option to flatten output directory treesSimon Glass2015-01-141-2/+6
| | | | | | | | | | When building current source for a single board, buildman puts the output in <output_dir>/current/current/<board>. Add an option to make it use <output_dir>/<board> instead. This removes the unnecessary directories in that case, controlled by the --no-subdirs/-N option. Suggested-by: Tom Rini <trini@ti.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Try to guess the upstream commitSimon Glass2015-01-141-5/+5
| | | | | | | | | | | | | | | Buildman normally obtains the upstream commit by asking git. Provided that the branch was created with 'git checkout -b <branch> <some_upstream>' then this normally works. When there is no upstream, we can try to guess one, by looking up through the commits until we find a branch. Add a function to try this and print a warning if buildman ends up relying on it. Also update the documentation to match. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Wolfgang Denk <wd@denx.de>
* buildman: Put build in 'current', not 'current/current'Simon Glass2015-01-141-4/+3
| | | | | | | | Buildman currently puts current-source builds in a current/current subdirectory, but there is no need for the extra depth. Suggested-by: Albert Aribaud <albert.u.boot@aribaud.net> Signed-off-by: Simon Glass <sjg@chromium.org>
* patman: Use the full commit hash for 'git checkout'Simon Glass2014-11-031-1/+1
| | | | | | | Even with the initial 8 characeters of the hash we will sometimes get a collision. Use the full hash. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Don't default to -e when using -sSimon Glass2014-11-031-1/+2
| | | | | | | | | | | When using summary mode (-s) we don't always want to display errors. Allow this option to be omitted. Series-to: u-boot Series-cc: albert Change-Id: I6b37754d55eb920ecae114fceba55834b43ea3b9 Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Albert Aribaud <albert.u.boot@aribaud.net>
* buildman: Fix the logic for the bloat commandSimon Glass2014-09-211-3/+3
| | | | | | | This check should now be done whatever mode buildman is running in, since we may be displaying information while building. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Ignore conflicting tagsSimon Glass2014-09-091-8/+7
| | | | | | | | | | | Tags like Series-version are normally expected to appear once, and with a unique value. But buildman doesn't actually look at these tags. So ignore conflicts. This allows bulidman to build a branch containing multiple patman series. Reported-by: Steve Rae <srae@broadcom.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Permit branch names with an embedded '/'Simon Glass2014-09-091-1/+1
| | | | | | | | | | At present buildman naively uses the branch name as part of its directory path, which causes problems if the name has an embedded '/'. Replace these with '_' to fix the problem. Reported-by: Steve Rae <srae@broadcom.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Provide an internal option to clean the outpur dirSimon Glass2014-09-091-1/+10
| | | | | | | | | | For testing it is useful to clean the output directory before running a test. This avoids a test interfering with the results of a subsequent test by leaving data around. Add this feature as an optional parameter to the control logic. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Allow tests to have their own boardsSimon Glass2014-09-091-9/+12
| | | | | | | Rather than reading boards.cfg, which may take time to generate and is not necessarily suitable for running tests, create our own list of boards. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Set up bsettings outside the control moduleSimon Glass2014-09-091-1/+0
| | | | | | | Move the bsettings code back to the main buildman.py file, so we can do something different when testing. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Add a functional testSimon Glass2014-09-091-5/+16
| | | | | | | | | | | | | Buildman currently lacks testing in many areas, including its use of git, make and many command-line flags. Add a functional test which covers some of these areas. So far it does a fake 'build' of all boards for the current source tree. This version reads the real ~/.buildman and boards.cfg files. Future work will improve this. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Move full help code into the control moduleSimon Glass2014-09-091-0/+8
| | | | | | | There is no good reason to keep this code separate. Move it into control.py so it is easier to test. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Add an option to show which boards caused which errorsSimon Glass2014-09-051-1/+2
| | | | | | | | | | | | | | | | | Add a -l option to display a list of offending boards against each error/warning line. The information will be shown in brackets as below: 02: wip sandbox: + sandbox arm: + seaboard +(sandbox) arch/sandbox/cpu/cpu.c: In function 'timer_get_us': +(sandbox) arch/sandbox/cpu/cpu.c:40:9: warning: unused variable 'i' [-Wunused-variable] +(seaboard) board/nvidia/seaboard/seaboard.c: In function 'pin_mux_mmc': +(seaboard) board/nvidia/seaboard/seaboard.c:36:9: warning: unused variable 'fred' [-Wunused-variable] +(seaboard) int fred; +(seaboard) ^ Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Implement an option to exclude boards from the buildSimon Glass2014-09-051-1/+7
| | | | | | | | | | | | Some boards are known to be broken and it is convenient to be able to exclude them from the build. Add an --exclude option to specific boards to exclude. This uses the same matching rules as the normal 'include' arguments, and is a comma- separated list of regular expressions. Suggested-by: York Sun <yorksun@freescale.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Set the return code to indicate build resultSimon Glass2014-09-051-2/+7
| | | | | | | | When buildman finds errors/warnings when building, set the return code to indicate this. Suggested-by: York Sun <yorksun@freescale.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: run genboardscfg.py all the timeMasahiro Yamada2014-08-281-6/+4
| | | | | | | | | | This commit makes sure boards.cfg is up to date before starting the build tests. tools/genboardscfg.py exits immediately printing "boards.cfg is up to date. Nothing to do." when boards.cfg is already new. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
* tools, scripts: refactor error-out statements of Python scriptsMasahiro Yamada2014-08-211-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In Python, sys.exit() function can also take an object other than an integer. If an integer is given to the argument, Python exits with the return code of it. If a non-integer argument is given, Python outputs it to stderr and exits with the return code of 1. That means, print >> sys.stderr, "Blah Blah" sys.exit(1) is equivalent to sys.exit("Blah Blah") The latter is a useful shorthand. Note: Some error messages in Buildman and Patman were output to stdout. But they should go to stderr. They are also fixed by this commit. This is a nice side effect. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
* buildman: Allow selection of the number of commits to buildSimon Glass2014-08-131-12/+19
| | | | | | | | | | It is useful to be able to build only some of the commits in a branch. Add support for the -c option to allow this. It was previously parsed by buildman but not implemented. Suggested-by: York Sun <yorksun@freescale.com> Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: York Sun <yorksun@freescale.com>
* buildman: Add an option to specify the buildman config fileSimon Glass2014-08-131-1/+1
| | | | | | | | Add a new --config-file option (-G) to specify a different configuration file from the default ~/.buildman. Reported-by: Tom Rini <trini@ti.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Add verbose option to display errors as they happenSimon Glass2014-08-131-1/+3
| | | | | | | | | | | Normally buildman operates in two passes - one to do the build and another to summarise the errors. Add a verbose option (-v) to display build problems as they happen. With -e also given, this will display errors too. When building the current source tree (rather than a list of commits in a branch), both -v and -e are enabled automatically. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Refactor output optionsSimon Glass2014-08-131-4/+4
| | | | | | | | | We need the output options to be available in several places. It's a pain to pass them into each function. Make them properties of the builder and add a single function to set them up. At the same time, add a function which produces summary output using these options. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Allow building of current source treeSimon Glass2014-08-131-33/+58
| | | | | | | | | | | | Originally buildman had some support for building the current source tree. However this was dropped before it was submitted, as part of the effort to make it faster when building entire branches. Reinstate this support. If no -b option is given, buildman will build the current source tree. Reported-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: adjust for KconfigMasahiro Yamada2014-07-301-0/+10
| | | | | | | | | Use "make <board>_defconfig" instead of "make <board>_config". Invoke tools/genboardscfg.py to generate boards.cfg when it is missing. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
* buildman: make sure to invoke GNU MakeMasahiro Yamada2014-07-291-1/+8
| | | | | | | | | | Since the command name 'make' may not be GNU Make on some platforms such as FreeBSD, buildman should call scripts/show-gnu-make to get the command name for GNU MAKE (and error out if it is not found). Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Jeroen Hofstee <jeroen@myspectrum.nl>
* buildman: Support in-tree buildsSimon Glass2014-07-281-0/+1
| | | | | | | | | | | | At present buildman always builds out-of-tree, that is it uses a separate output directory from the source directory. Normally this is what you want, but it is important that in-tree builds work also. Some Makefile changes may break this. Add a -i option to tell buildman to use in-tree builds, so that it is easy to test this feature. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Add -C option to force a reconfigure for each commitSimon Glass2014-07-281-0/+1
| | | | | | | | | | | | | | Normally buildman wil try to configure U-Boot for a particular board on the first commit that it builds in a series. Subsequent commits are built without reconfiguring which normally works. Where it doesn't, buildman automatically reconfigures and retries. To fully emulate the way MAKEALL works, we should have an option to disable this optimisation. Add a -C option to cause buildman to always reconfigure on each commit. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Add -F flag to retry failed buildsSimon Glass2014-07-231-0/+1
| | | | | | | | | | | | | | | | | | | | Generally a build failure with a particular commit cannot be fixed except by changing that commit. Changing the commit will automatically cause buildman to retry when you run it again: buildman sees that the commit hash is different and that it has no previous build result for the new commit hash. However sometimes the build failure is due to a toolchain issue or some other environment problem. In that case, retrying failed builds may yield a different result. Add a flag to retry failed builds. This differs from the force rebuild flag (-f) in that it will not rebuild commits which are already marked as succeeded. Series-to: u-boot Change-Id: Iac4306df499d65ff0888b1c60f06fc162a6faad8
* buildman: make output dir configurableDaniel Schwierzeck2014-04-181-1/+1
| | | | | | | | Add an option to specify the output directory to override the default path '../'. This is useful for building in a ramdisk. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-241-17/+1
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* buildman: Produce a sensible error message when branch is missingSimon Glass2013-05-141-0/+4
| | | | | | | Rather than a backtrace, produce a nice error message when an invalid branch is provided to buildman. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Allow conflicting tags to avoid spurious errorsSimon Glass2013-05-091-0/+5
| | | | | | | | | | Conflicting tags can prevent buildman from building two series which exist one after the other in a branch. There is no reason not to allow this sort of workflow with buildman, so ignore conflicting tags in buildman. Change-Id: I2231d04d8684fe0f8fe77f8ea107e5899a3da5e8 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@ti.com>
* buildman - U-Boot multi-threaded builder and summary toolSimon Glass2013-04-041-0/+181
This tool handles building U-Boot to check that you have not broken it with your patch series. It can build each individual commit and report which boards fail on which commits, and which errors come up. It also shows differences in image sizes due to particular commits. Buildman aims to make full use of multi-processor machines. Documentation and caveats are in tools/buildman/README. Signed-off-by: Simon Glass <sjg@chromium.org>
OpenPOWER on IntegriCloud