Open CI Scripts: Initial Commit

* build_helper: Python script which builds sets
of configurations from a json file input
* checkpatch: Bash scripts helping with running checkpatch
* cppcheck: Bash script helping with running cppcheck
* lava_helper: Python script which generates a lava job
definition and parses the output of a lava dispatcher
* tfm_ci_pylib: Generic Python module for Open CI
* configs: Directory storing reference configurations

Change-Id: Ibda0cbfeb5b004b35fef3c2af4cb5c012f2672b4
Signed-off-by: Galanakis, Minos <minos.galanakis@linaro.org>
diff --git a/make_checkpatch_summary.sh b/make_checkpatch_summary.sh
new file mode 100755
index 0000000..8e068af
--- /dev/null
+++ b/make_checkpatch_summary.sh
@@ -0,0 +1,46 @@
+#!/bin/bash
+#-------------------------------------------------------------------------------
+# Copyright (c) 2018-2019, Arm Limited and Contributors. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+#-------------------------------------------------------------------------------
+
+##
+##@file
+##@brief This script is to make a summary of run-checkpatch.sh generated output
+##files.
+##
+##The generated summary will hold the number of error and warning messages for
+##each file.
+##
+##The first parameter of the script must be the location of input file.
+##
+
+#Check parameter
+if [ -z ${1+x} ]
+then
+	echo "Checkpatch output file not specified!"
+	exit 1
+fi
+
+infile="$1"
+
+#Find the summary line for each file. Cut the summary line plus the file name
+#the previous line.
+#Concatenate the current line to the previos one,
+#Print the two lines match the following regexp:
+#   remember anything any number of non : characters (this is the file path)
+#     followed by a :
+#   match any nuber of following characters till "total:" is found
+#   remember all characters after "total:" (this is the summary)
+#   replace the matched string with first and and the second match concatenated
+#       with new line and a tab character in between.
+#   we use s: single line and m: multi line modificators for the regexp match
+res=$(perl -ne '$l=$l.$_; print "$l" if $l=~s/.*?([^:]+):.*\ntotal:(.*)/$1:\n\t$2/sm;$l=$_;' "$infile")
+
+#Print the result to standard output.
+cat <<EOM
+Checkpatch result summary:
+$res
+EOM