diff options
author | Vladimir Serbinenko <phcoder@gmail.com> | 2014-08-15 02:06:00 +0200 |
---|---|---|
committer | Vladimir Serbinenko <phcoder@gmail.com> | 2014-08-16 17:17:52 +0200 |
commit | fb2a9a9e30e40f546628ea48296e5f9c0ddec9c7 (patch) | |
tree | 0ee8d9ca970f0524d05316461911240afe64b309 | |
parent | ae143f71e7287cb676ce165995fe8c1cc62e8a22 (diff) | |
download | coreboot-fb2a9a9e30e40f546628ea48296e5f9c0ddec9c7.tar.xz |
lint-stable: Check that modified boards contain meaningful board_info.txt.
Change-Id: Idd3ff029e16b4b963f13d341dabdc1949c4e9275
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/6670
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
-rwxr-xr-x | util/lint/lint-stable-005-board-status | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/util/lint/lint-stable-005-board-status b/util/lint/lint-stable-005-board-status new file mode 100755 index 0000000000..2ef2e3b7f5 --- /dev/null +++ b/util/lint/lint-stable-005-board-status @@ -0,0 +1,45 @@ +#!/bin/sh +# This file is part of the coreboot project. +# +# Copyright (C) 2014 Vladimir Serbinenko <phcoder@gmail.com> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# DESCR: Check that every board has a meaningful board_info.txt + +LC_ALL=C export LC_ALL +for mobodir in $(git diff --name-status |grep -v "^D" |cut -c3- | sed -n 's,^\(src/mainboard/[^/]*/[^/]*\).*$,\1,p'|sort|uniq); do + board_info="$mobodir/board_info.txt" + if ! [ -f "$board_info" ]; then + echo "No $board_info found" >&2 + exit 1 + fi + category="$(sed -n 's#^Category: \(.*\)$#\1#p' < "$board_info")" + case "$category" in + desktop|server|laptop|half|mini|settop|"eval"|sbc|emulation|misc) + ;; + "") + echo "$board_info doesn't contain 'Category' tag" >&2 + exit 1 + ;; + *) + echo "$board_info specifies unknown category '$category'" >&2 + exit 1 + ;; + esac +done + +exit 0 + |