autotest_quickmerge: Pick up the default board if one is available.
autotest_quickmerge requires the --board flag for the current board. After this
CL, it will pick up the default board from src/scripts/.default_board if one is
available.
This brings the behaviour of autotest_quickmerge in line with other scripts we
use.
BUG=chromium:258238
TEST=Manually tested that autotest_quickmerge picks up the default board. Also
tested that it skips ill-formed default board names.
Change-Id: If78fa3c8f0130dcc6adf7b63dd7d89859dabd3c9
Reviewed-on: https://gerrit.chromium.org/gerrit/61227
Commit-Queue: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Tested-by: Aviv Keshet <akeshet@chromium.org>
diff --git a/scripts/autotest_quickmerge.py b/scripts/autotest_quickmerge.py
index 44d254f..685f71d 100644
--- a/scripts/autotest_quickmerge.py
+++ b/scripts/autotest_quickmerge.py
@@ -324,7 +324,11 @@
'to emerge-$board autotest-all, by '
'rsyncing source tree to sysroot.')
- parser.add_argument('--board', metavar='BOARD', default=None, required=True)
+
+ default_board = cros_build_lib.GetDefaultBoard()
+ parser.add_argument('--board', metavar='BOARD', default=default_board,
+ help='Board to perform quickmerge for. Default: ' +
+ (default_board or 'Not configured.'))
parser.add_argument('--pretend', action='store_true',
help='Dry run only, do not modify sysroot autotest.')
parser.add_argument('--overwrite', action='store_true',