[coreboot-gerrit] Patch set updated for coreboot: fc27a46 Add a test for vendor naming consistency.

Vladimir Serbinenko (phcoder@gmail.com) gerrit at coreboot.org
Sat Oct 25 02:52:12 CEST 2014


Vladimir Serbinenko (phcoder at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7182

-gerrit

commit fc27a46b53b7207194556b41ebb3ca9f3a2618b9
Author: Vladimir Serbinenko <phcoder at gmail.com>
Date:   Tue Oct 21 09:05:18 2014 +0200

    Add a test for vendor naming consistency.
    
    Change-Id: I1da7482154664493b824dca8d6287c8022298a98
    Signed-off-by: Vladimir Serbinenko <phcoder at gmail.com>
---
 util/lint/lint-stable-006-mobodirs | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/util/lint/lint-stable-006-mobodirs b/util/lint/lint-stable-006-mobodirs
new file mode 100755
index 0000000..aed8f24
--- /dev/null
+++ b/util/lint/lint-stable-006-mobodirs
@@ -0,0 +1,34 @@
+#!/bin/sh
+# This file is part of the coreboot project.
+#
+# Copyright (C) 2014 Vladimir Serbinenko <phcoder at 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 vendor and model match directory
+
+LC_ALL=C export LC_ALL
+
+for kconfig in src/mainboard/*/Kconfig; do
+    vendor=$(grep -A3 MAINBOARD_VENDOR "$kconfig"|sed -n 's,^[[:space:]]*default[[:space:]]*"\(.*\)"[[:space:]]*$,\1,p'|sed 'y at ABCDEFGHIJKLMNOPQRSTUVWXYZ /,- at abcdefghijklmnopqrstuvwxyz____@;s,(,,g;s,),,g');
+    dir="$(basename "$(dirname "$kconfig")")";
+    if [ x"$dir" != x"$vendor" ]; then
+	echo "directory src/mainboard/$dir should be src/mainboard/$vendor";
+	exit 1
+    fi;
+done
+
+exit 0
+



More information about the coreboot-gerrit mailing list