summaryrefslogtreecommitdiff
path: root/util/compare_build.sh
Commit message (Collapse)AuthorAgeFilesLines
* compare_build.sh: Add private directory handlingCraig Hesling2020-08-211-0/+12
| | | | | | | | | | | | | | | | This allows compare_build.sh to use private libs if available. BRANCH=none BUG=none TEST=# Ensure that you have an ec checkout that has a broken # public build, but working private build. ./compare_build.sh -p # This will only work if private was accessible Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: Id5e2d1afe474e0175dbba2cddfd84de7c895a927 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2357870
* compare_build.sh: Fix chip boards-with parsingCraig Hesling2020-05-071-3/+2
| | | | | | | | | | | | | | | | | This fixes board expansions that use the boards-with search feature. The boards-with function outputs a newline separated list, while the static board expansions emit a space separated list. This allows read to tokenize either format. BRANCH=none BUG=none TEST=./util/compare_build.sh -bstm32f4 TEST=./util/compare_build.sh -bfp Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: Iebf4309fc7ea2ba66a637a5446aa283552ef67c8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2187951 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* compare_build.sh: Add stm32f4 and stm32h7 board groupsCraig Hesling2020-05-071-0/+4
| | | | | | | | | | | BRANCH=none BUG=none TEST=./util/compare_build.sh -b "stm32f4 stm32h7" Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: Ie7645300d3731bbd93449722b674b4806dff8063 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2110536 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* compare_build.sh: Modularize parsing board groupsCraig Hesling2020-05-071-49/+61
| | | | | | | | | | | | | Allow reuse of the board/board-group parsing function. BRANCH=none BUG=none TEST=./util/compare_build.sh -b "mchp fp -nucleo-h743zi" TEST=./util/compare_build.sh Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: I7acaeaf93830c10dca2fa49c23593d0940191848 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2110535
* compare_build.sh: Improve board selectionCraig Hesling2020-05-071-29/+135
| | | | | | | | | | | | | | | | | | | | New features: * Add board validation * Add many new board groups BRANCH=none BUG=none TEST=time ./util/compare_build.sh -b "all -all"; echo $? TEST=time ./util/compare_build.sh -b ""; echo $? TEST=time ./util/compare_build.sh -b stm32 -j 7; echo $? TEST=time ./util/compare_build.sh -b hatch_fp -j 7; echo $? TEST=time ./util/compare_build.sh -o -b fp -j 7; echo $? TEST=time ./util/compare_build.sh -o -b bloonchipper; echo $? TEST=time ./util/compare_build.sh -o -b "fp -bloonchipper" -j 7; echo $? Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: Ia802f3b0c595f2c7aafeee8e247077333625888a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2093897
* compare_builds.sh: Changed to parallel operationCraig Hesling2020-03-241-69/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This completely changes the way compare_build.sh operates. * The test checkouts are done in /tmp directories. This detaches the test environment from your local EC workspace and allows builds for all references to occur at the same time. * Builds for all board and all references happen in parallel, unless disabled from command-line args. * New arguments: -k Allows the tmp dir to be preserved after compare -j 8 Number of jobs that will run concurrently (make -j) -o Forces only one EC ref to be built at a time. Although -j is always enforced, this option limits memory usage. BRANCH=none BUG=none TEST=time ./util/compare_build.sh TEST=time ./util/compare_build.sh -k -o -j 1 TEST=time ./util/compare_build.sh -k -o -j 4 TEST=time ./util/compare_build.sh -k -o TEST=# Introduce syntax error to board/nocturne_fp/board.c # Commit it time ./util/compare_build.sh # Ensure that the script detected the build error Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: I3453f58a0ce08988e86572e6979f1a75a553f9b3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2094695
* compare_build.sh: Fix restore detached HEADCraig Hesling2020-03-011-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the scenario where you want to run compare_build.sh, but you are currently are in a detached HEAD state. Without it, ./compare_build.sh moves your HEAD and cannot restore it. The command "git rev-parse --abbrev-ref HEAD" only returns a unique identifier (branch name) when HEAD is on a branch. If you are in detached HEAD mode, it simply returns HEAD, which isn't useful. BRANCH=none BUG=none TEST=git checkout cros/master git rev-parse HEAD ./util/compare_build.sh git rev-parse HEAD # We should still be on the same hash Change-Id: Ib8dbedc61a77567262fceab59c17e1fb9c78cdd6 Signed-off-by: Craig Hesling <hesling@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2080917
* util: Add script to compare builds at different commitsTom Hughes2020-02-051-0/+112
This script is useful for verifying changes that should not affect the build results. It performs a build for a given board at two different commits and diffs the resulting ec.bin. The build output and results are also saved on failure to allow further inspection. BRANCH=none BUG=none TEST=make buildall -j TEST=git commit --allow-empty -m "Test" && ./util/compare_build.sh --board nocturne_fp --ref1 HEAD --ref2 HEAD^ && ./util/compare_build.sh --board all --ref1 HEAD --ref2 HEAD^ Change-Id: I8750b8614a421928b4b8403345354fe90021db16 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2001130 Commit-Queue: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>