summaryrefslogtreecommitdiffstats
path: root/src/build
diff options
context:
space:
mode:
authorDan Larson <dlarson@us.ibm.com>2019-10-02 13:07:00 -0500
committerWilliam G Hoffa <wghoffa@us.ibm.com>2019-10-09 09:51:08 -0500
commit514dce81ce897e3a7147604e503bd6613f01afa0 (patch)
tree1c7f1e88a1fb7bcea8a37b57647be6f3e13e64be /src/build
parent68ab1e874f968c77a5bdb7837c1fd104f4d3371f (diff)
downloadtalos-hostboot-514dce81ce897e3a7147604e503bd6613f01afa0.tar.gz
talos-hostboot-514dce81ce897e3a7147604e503bd6613f01afa0.zip
HCBI-239 Enable static analysis
Change-Id: Id07e25aeb7337060baab8eaa2bbf4e3e8df238cd Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/84660 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Luis P Fernandez <luis.fernandez@ibm.com> Reviewed-by: Camvan T Nguyen <ctnguyen@us.ibm.com> Reviewed-by: Nicholas E Bofferding <bofferdn@us.ibm.com> Reviewed-by: William G Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/build')
-rwxr-xr-xsrc/build/citest/autocitest7
-rwxr-xr-xsrc/build/citest/build-script41
2 files changed, 27 insertions, 21 deletions
diff --git a/src/build/citest/autocitest b/src/build/citest/autocitest
index 2eabcf38b..3e29c414f 100755
--- a/src/build/citest/autocitest
+++ b/src/build/citest/autocitest
@@ -154,8 +154,11 @@ waitkb
timestamp=`date +'%H:%M:%S'`
echo "$timestamp Starting autosample test..."
-# see simics license usage
-tail -n 500 /afs/rch/usr4/dlarson/public/stats/lic_usage.txt | grep hindsight
+# see simics license usage.
+hindsight_license=$(echo "hindsight_usage-"`date +%Y`-`date +%B`".log")
+# show last 4 hours. Gives alittle insight to license usage trends.
+#This log file is added to every twenty minutes. There are spaces between each line. 4x2x3=24 lines
+tail -n 24 /gsa/ausgsa/projects/s/simics_test/license_logs/$hindsight_license
# Run set up in current shell
echo "run autosimsetup.."
diff --git a/src/build/citest/build-script b/src/build/citest/build-script
index 315735957..7198ed5b2 100755
--- a/src/build/citest/build-script
+++ b/src/build/citest/build-script
@@ -110,27 +110,30 @@ fi
create-sandbox > create-sandbox.log 2>&1 &
CREATESANDBOX_PID=$!
+# normal build is empty quotes
+build_opt=""
+# code coverage
+if [[ ! -z "${HOSTBOOT_PROFILE}" ]]; then
+ build_opt="gcov"
+# static analysis
+elif [[ ! -z "${HOSTBOOT_CPPCHECK}" ]]; then
+ build_opt="cppcheck"
+ COMPILE_ONLY=1
+fi
+# Build Hostboot
start_time=$(date)
+echo "#--------------------------------"
+printf "\n\n$(date): STARTED running \"make -j32 $build_opt\"\n\n"
+echo "#--------------------------------"
+make -j32 $build_opt || exit -1
+make_rc=$?
+echo "#--------------------------------"
+printf "\n\nrc=$make_rc: $(date): FINISHED running (\"make -j32 $build_opt\" was started at $start_time)\n\n"
+echo "#--------------------------------"
-# Build Hostboot.
-if [[ -z "${HOSTBOOT_PROFILE}" ]]; then
- echo "#--------------------------------"
- printf "\n\n$start_time: STARTED running \"make -j32\"\n\n"
- echo "#--------------------------------"
- # if $POOL is defined then we are already in a vexec shell so do not vexec again
- make -j32 || exit -1
- echo "#--------------------------------"
- printf "\n\nrc=$?: $(date): FINISHED running (\"make -j32\" was started at $start_time)\n\n"
- echo "#--------------------------------"
-else
- # Build with code coverage when HOSTBOOT_PROFILE=1
- echo "#--------------------------------"
- printf "\n\n$start_time: STARTED running \"make -j32 gcov\"\n\n"
- echo "#--------------------------------"
- make -j32 gcov || exit -1
- echo "#--------------------------------"
- printf "\n\nrc=$?: $(date): FINISHED running (\"make -j32 gcov\" was started at $start_time)\n\n"
- echo "#--------------------------------"
+if [[ ! -z "${COMPILE_ONLY}" ]]; then
+ echo "Compile only"
+ exit $make_rc
fi
# Check sandbox create completion.
OpenPOWER on IntegriCloud