Skip to content

Commit

Permalink
HCBI-239 Enable static analysis
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
danlarson-ibm authored and wghoffa committed Oct 9, 2019
1 parent 68ab1e8 commit 514dce8
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 21 deletions.
7 changes: 5 additions & 2 deletions src/build/citest/autocitest
Expand Up @@ -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.."
Expand Down
41 changes: 22 additions & 19 deletions src/build/citest/build-script
Expand Up @@ -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.
Expand Down

0 comments on commit 514dce8

Please sign in to comment.