summaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* | buildman: Ignore conflicting tagsSimon Glass2014-09-093-9/+13
| | | | | | | | | | | | | | | | | | | | | | 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-092-5/+14
| | | | | | | | | | | | | | | | | | | | 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: Expand output test to cover directory prefixesSimon Glass2014-09-091-8/+46
| | | | | | | | | | | | | | | | Now that buildman supports removing the build directory prefix from output, add a test for it. Also ensure that output directories are removed when the test completes. Signed-off-by: Simon Glass <sjg@chromium.org>
* | buildman: Add additional functional testsSimon Glass2014-09-091-18/+306
| | | | | | | | | | | | | | This adds coverage of core features of the builder, including the command-line options which affect building. Signed-off-by: Simon Glass <sjg@chromium.org>
* | patman: Start with a clean series when neededSimon Glass2014-09-091-1/+3
| | | | | | | | | | | | | | | | | | | | | | For reasons that are not well-understood, GetMetaDataForList() can end up adding to an existing series even when it appears that it should be starting a new one. Change from using a default constructor parameter to an explicit one, to work around this problem. 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: Correct counting of build failures on retrySimon Glass2014-09-091-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | When a build is to be performed, buildman checks to see if it has already been done. In most cases it will not bother trying again. However, it was not reading the return code from the 'done' file, so if the result was a failure, it would not be counted. This depresses the 'failure' count stats that buildman prints in this case. Fix this bug by always reading the return code. Signed-off-by: Simon Glass <sjg@chromium.org>
* | buildman: Allow tests to have their own boardsSimon Glass2014-09-092-10/+31
| | | | | | | | | | | | | | 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: Avoid looking at config file or toolchains in testsSimon Glass2014-09-092-5/+29
| | | | | | | | | | | | | | | | These files may not exist in the environment, or may not be suitable for testing. Provide our own config file and our own toolchains when running tests. Signed-off-by: Simon Glass <sjg@chromium.org>
* | buildman: Set up bsettings outside the control moduleSimon Glass2014-09-092-1/+2
| | | | | | | | | | | | | | 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-094-18/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | patman: Provide a way to intercept commands for testingSimon Glass2014-09-091-0/+20
| | | | | | | | | | | | | | | | | | | | Add a test point for the command module. This allows tests to emulate the execution of commands. This provides more control (since we can make the fake 'commands' do whatever we like), makes it faster to write tests since we don't need to set up as much environment, and speeds up test execution. Signed-off-by: Simon Glass <sjg@chromium.org>
* | buildman: Move full help code into the control moduleSimon Glass2014-09-092-6/+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: Move the command line code into its own fileSimon Glass2014-09-092-71/+87
| | | | | | | | | | | | | | | | We want to be able to issue parser commands from within buildman for test purposes. Move the parser code into its own file so we don't end up needing the buildman and test modules to reference each other. Signed-off-by: Simon Glass <sjg@chromium.org>
* | patman: RunPipe() should not pipe stdout/stderr unless askedSimon Glass2014-09-092-3/+7
| | | | | | | | | | | | | | RunPipe() currently pipes the output of stdout and stderr to a pty, but this is not the intended behaviour. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
* | buildman: Enhance basic test to check summary outputSimon Glass2014-09-091-5/+96
| | | | | | | | | | | | | | | | Adjust the basic test so that it checks all console output. This will help to ensure that the builder is behaving correctly with printing summary information. Signed-off-by: Simon Glass <sjg@chromium.org>
* | buildman: Send builder output through a function for testingSimon Glass2014-09-091-28/+30
| | | | | | | | | | | | | | To allow us to verify the builder's console output, send it through a function which can collect it when running in test mode. Signed-off-by: Simon Glass <sjg@chromium.org>
* | patman: Add a way of recording terminal output for testingSimon Glass2014-09-091-0/+72
| | | | | | | | | | | | | | | | When running unit tests we don't want output to go to the terminal. Provide a way of collecting it so that it can be examined by test code later. Signed-off-by: Simon Glass <sjg@chromium.org>
* | patman: Fix detection of git versionSimon Glass2014-09-051-0/+2
| | | | | | | | | | | | | | A missing 'global' declaration means that this feature does not currently work. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
* | buildman: Separate out display of warnings and errorsSimon Glass2014-09-052-23/+91
| | | | | | | | | | | | | | | | | | | | | | Some boards unfortunately build with warnings and it is useful to be able to easily distinguish the warnings from the errors. Use a simple pattern match to categorise gcc output into warnings and errors, and display each separately. New warnings are shown in magenta (with a w+ prefix) and fixed warnings are shown in yellow with a w- prefix. Signed-off-by: Simon Glass <sjg@chromium.org>
* | buildman: Add an option to show which boards caused which errorsSimon Glass2014-09-054-13/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Remove the directory prefix from each error lineSimon Glass2014-09-051-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The full path is long and also includes buildman private directories. Clean this up, so that only a relative U-Boot path is shown. This will change warnings like these: /home/sjg/c/src/third_party/u-boot/buildman5/.bm-work/00/arch/sandbox/cpu/cpu.c: In function 'timer_get_us': /home/sjg/c/src/third_party/u-boot/buildman5/.bm-work/00/arch/sandbox/cpu/cpu.c:40:9: warning: unused variable 'i' [-Wunused-variable] /home/sjg/c/src/third_party/u-boot/files/arch/sandbox/cpu/cpu.c: In function 'timer_get_us': /home/sjg/c/src/third_party/u-boot/files/arch/sandbox/cpu/cpu.c:40:9: warning: unused variable 'i' [-Wunused-variable] to: arch/sandbox/cpu/cpu.c: In function 'timer_get_us': arch/sandbox/cpu/cpu.c:40:9: warning: unused variable 'i' [-Wunused-variable] Signed-off-by: Simon Glass <sjg@chromium.org>
* | buildman: Implement an option to exclude boards from the buildSimon Glass2014-09-054-8/+41
| | | | | | | | | | | | | | | | | | | | | | | | 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: Allow make-flags variables to include '-' and '_'Simon Glass2014-09-052-2/+4
| | | | | | | | | | | | | | | | These characters are commonly used in variables, so permit them. Also document the permitted characters. Reported-by: Tom Rini <trini@ti.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* | buildman: Set the return code to indicate build resultSimon Glass2014-09-054-3/+20
| | | | | | | | | | | | | | | | 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>
* | patman: Avoid changing the order of tagsSimon Glass2014-09-051-13/+1
| | | | | | | | | | | | | | | | | | | | patman collects tags that it sees in the commit and places them nicely sorted at the end of the patch. However, this is not really necessary and in fact is apparently not desirable. Suggested-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | patman: Use --no-pager' to stop git from forking a pagerSimon Glass2014-09-051-1/+1
| | | | | | | | | | | | | | | | In a headless environment the pager can apparently hang. We don't want a pager anyway so let's request that none be used. Reported-by: Tom Rini <trini@ti.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* | patman: Remove the -a optionSimon Glass2014-09-052-95/+0
| | | | | | | | | | | | | | | | | | It seems that this is no longer needed, since checkpatch.pl will catch whitespace problems in patches. Also the option is not widely used, so it seems safe to just remove it. Suggested-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* | patman: Correct unit tests to run correctlySimon Glass2014-09-054-14/+22
| | | | | | | | | | | | | | | | | | | | It seems that doctest behaves differently now, and some of the unit tests do not run. Adjust the tests to work correctly. ./tools/patman/patman --test <unittest.result.TestResult run=10 errors=0 failures=0> Signed-off-by: Simon Glass <sjg@chromium.org>
* | patman: Fix indentation in terminal.pySimon Glass2014-09-051-53/+55
|/ | | | | | | This code came from a different project with 2-character indentation. Fix it for U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org>
* tools/genboardscfg.py: change shebang into /usr/bin/env python2Masahiro Yamada2014-08-281-1/+3
| | | | | | | | | This tool only works on python 2 (python 2.6 or lator). Change the shebang to make sure the script is run by python 2 and clearly say the supported version in the comment block. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* tools/genboardscfg.py: improve performanceMasahiro Yamada2014-08-281-6/+33
| | | | | | | | | | | | | | I guess some developers are already getting sick of this tool because it generally takes a few minites to generate the boards.cfg on a reasonable computer. The idea popped up on my mind was to skip Makefiles and to run script/kconfig/conf directly. This tool should become about 4 times faster. You might still not be satisfied, but better than doing nothing. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
* tools/genboardscfg.py: check if the boards.cfg is up to dateMasahiro Yamada2014-08-281-2/+56
| | | | | | | | | | | | | | It looks silly to regenerate the boards.cfg even when it is already up to date. The tool should exit with doing nothing if the boards.cfg is newer than any of defconfig, Kconfig and MAINTAINERS files. Specify -f (--force) option to get the boards.cfg regenerated regardless its time stamp. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
* tools/genboardscfg.py: fix minor problems on terminationMasahiro Yamada2014-08-281-66/+90
| | | | | | | | | | | | | | | | | | | This tool deletes the incomplete boards.cfg if it encounters an error or is is terminated by the user. I notice some problems even though they rarely happen. [1] The boards.cfg is removed if the program is terminated during __gen_boards_cfg() function but before boards.cfg is actually touched. In this case, the previous boards.cfg should be kept as it is. [2] If an error occurs while deleting the incomplete boards.cfg, the program throws another exception. This hides the privious exception and we will not be able to know the real cause. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
* tools/genboardscfg.py: wait for unfinished subprocesses before error-outMasahiro Yamada2014-08-281-0/+3
| | | | | | | | | | | | | | | When an error occurs or the program is terminated by the user on the way, the destructer __del__ of class Slot is invoked and the work directories are removed. We have to make sure there are no subprocesses (in this case, "make O=<work_dir> ...") using the work directories before removing them. Otherwise the subprocess spits a bunch of error messages possibly causing more problems. Perhaps some users may get upset to see too many error messages. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
* tools/genboardscfg.py: be tolerant of insane KconfigMasahiro Yamada2014-08-281-2/+9
| | | | | | | | | | The tools/genboardscfg.py expects all the Kconfig and defconfig are written correctly. Imagine someone accidentally has broken a board. Error-out just for one broken board is annoying for the other developers. Let the tool skip insane boards and continue processing. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
* tools/genboardscfg.py: be tolerant of missing MAINTAINERSMasahiro Yamada2014-08-281-1/+11
| | | | | | | | | | | | | | tools/genboardscfg.py expects all the boards have MAINTAINERS. If someone adds a new board but misses to add its MAINTAINERS file, tools/genboardscfg.py fails to generate the boards.cfg file. It is annoying for the other developers. This commit allows tools/genboardscfg.py to display warning messages and continue processing even if some MAINTAINERS files are missing or have broken formats. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
* tools/genboardscfg.py: ignore defconfigs starting with a dotMasahiro Yamada2014-08-281-0/+2
| | | | | | | | | | | | Kconfig in U-Boot creates a temporary file configs/.tmp_defconfig during processing "make <board>_defconfig". The temporary file might be left over for some reasons. Just in case, tools/genboardscfg.py should make sure to not read such garbage files. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-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/genboardscfg.py: fix a bug of MAINTAINERS handlingMasahiro Yamada2014-08-281-1/+1
| | | | | | | | | This patch fixes a minor problem: If a block without "F: configs/*_defconfig" is followed by another block with "F: configs/*_defconfig", the maintainers from the former block are squashed into the latter. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* patman: Support the 'reverse' option for 'git log'Simon Glass2014-08-281-0/+2
| | | | | | | | This option is currently not supported, but needs to be, for buildman to operate as expected. Reported-by: York Sun <yorksun@freescale.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* Merge branch 'agust@denx.de' of git://git.denx.de/u-boot-stagingTom Rini2014-08-253-3/+6
|\
| * mkimage: fix compilation issues on OpenBSDLuka Perkov2014-08-141-0/+2
| | | | | | | | Signed-off-by: Luka Perkov <luka@openwrt.org>
| * tools, fit_info: increase buffer for command nameHeiko Schocher2014-08-141-2/+3
| | | | | | | | | | | | | | | | | | | | currently the buffer for command name is 50 bytes only. If using fit_info with long absolute paths, this is not enough, so raise it to 256 (as it is in fit_check_sign) Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
| * tools: fix typo in tools/image-host.cHeiko Schocher2014-08-141-1/+1
| | | | | | | | | | | | | | | | | | fix a typo in error printf. If FIT_CONFS_PATH is not found print FIT_CONFS_PATH not FIT_IMAGES_PATH. Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
* | buildman: refactor help messageMasahiro Yamada2014-08-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | "buildman [options]" is displayed by default. Append the rest of help messages to parser.usage instead of replacing it. Besides, "-b <branch>" is not mandatory since commit fea5858e. Drop it from the usage. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | patman: refactor help messageMasahiro Yamada2014-08-221-1/+1
| | | | | | | | | | | | | | | | | | "patman [options]" is displayed by default. Append the rest of help messages to parser.usage instead of replacing it. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | Makefile: remove generated boards.cfg within make distcleanRoger Meier2014-08-222-4/+4
| | | | | | | | | | | | | | | | | | Signed-off-by: Roger Meier <roger@bufferoverflow.ch> Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Tested-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Tom Rini <trini@ti.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Simon Glass <sjg@chromium.org>
* | tools/genboardscfg.py: no exception if columns undetectableRoger Meier2014-08-211-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | The existing terminalsize detection raised an exception on build server. Just removes the exception. This also deactivates the progress indicator. Remove a trainling whitespace. Signed-off-by: Roger Meier <roger@bufferoverflow.ch> CC: Masahiro Yamada <yamada.m@jp.panasonic.com> CC: Tom Rini <trini@ti.com>
* | tools/genboardscfg.py: Do not output SPLCPU fieldMasahiro Yamada2014-08-211-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to Kconfig, the CPU field of boards.cfg could optionally have ":SPLCPU", like "armv7:arm720t". (Actually this syntax was only used for Tegra platform.) Now it is not necessary at all because CPU is defined by CONFIG_SYS_CPU in Kconfig. For Tegra platform, the Kconfig option is described as follows: config SYS_CPU string default "arm720t" if SPL_BUILD default "armv7" if !SPL_BUILD Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
OpenPOWER on IntegriCloud