Updates to the board status script

This is the first major re-work for the board status script.
Summary:
- Added a command to the getrevision.sh script to retrieve tagged
  revision.

- Results are placed in a dynamically generated temporary location.
  This makes it easy to do multiple trial runs and avoids polluting
  the coreboot directory.

- Results are stored in a directory with the following form:
  <vendor>/<mainboard>/<tagged_revision>/<timestamp>/
  Vendor and mainboard are obtained from CONFIG_MAINBOARD_DIR so that
  hierarchy is consistent between coreboot and board-status.

- The results directory is used as the commit message.

- board-status repository is checked out automatically if results are
  to be uploaded.

TODO:
- Add ability to run commands which may fail. Currently we assume
  any failure should terminate the script, but some commands can be
  made optional.

Successfully uploaded first result to board-status repository. See
http://review.coreboot.org/gitweb?p=board-status.git;a=summary .

Change-Id: Icba41ccad4e6e6ee829b8092a2459c2d72a3365b
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: http://review.coreboot.org/4039
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
David Hendricks
2013-11-11 18:44:05 -08:00
parent 0dde01cad1
commit 1b6e7a6748
3 changed files with 99 additions and 25 deletions

View File

@@ -121,6 +121,20 @@ local_revision() {
echo "${r}"
}
# Similar to local_revision but uses "git describe" instead of "git log" which
# includes number of commits since most recent tag.
tagged_revision() {
local r
if git_is_file_tracked "$1" ; then
r=$(git describe --tags --dirty)
else
return ${EXIT_FAILURE}
fi
echo "${r}"
}
upstream_revision() {
local r=
@@ -143,6 +157,8 @@ Commands
local revision information including an indicator for uncommitted changes
-u or --upstream
upstream revision
-T or --tags
similar to -l, but uses \"git describe\" to obtain revision info with tags
-U or --url
URL associated with the latest commit
-d or --date
@@ -175,6 +191,10 @@ main() {
check_action $1
action=local_revision
shift;;
-T|--tags)
check_action $1
action=tagged_revision
shift;;
-u|--upstream)
check_action $1
action=upstream_revision