diff options
| author | Stephen Cprek <smcprek@us.ibm.com> | 2015-04-29 14:48:28 -0500 |
|---|---|---|
| committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2015-06-08 13:24:52 -0500 |
| commit | 2c58244681b00392889f7be602d1d80f3efa44ef (patch) | |
| tree | b3c73ff821df7cdb1667726d02fa98662d893278 /src | |
| parent | d35f14452a5cde7113cf2d9229f0e4f79fdbe69d (diff) | |
| download | blackbird-hostboot-2c58244681b00392889f7be602d1d80f3efa44ef.tar.gz blackbird-hostboot-2c58244681b00392889f7be602d1d80f3efa44ef.zip | |
Prevent hb prime errors when called in cronjobs
Change-Id: I42b2e1ba33ed4afdd36e8f5af424c2a06e13d53c
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/17533
Tested-by: Jenkins Server
Reviewed-by: PRACHI GUPTA <pragupta@us.ibm.com>
Reviewed-by: ANDRES A. LUGO-REYES <aalugore@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
| -rwxr-xr-x | src/build/tools/hb | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/src/build/tools/hb b/src/build/tools/hb index 76f933dd3..3856388a0 100755 --- a/src/build/tools/hb +++ b/src/build/tools/hb @@ -6,7 +6,9 @@ # # OpenPOWER HostBoot Project # -# COPYRIGHT International Business Machines Corp. 2011,2014 +# Contributors Listed Below - COPYRIGHT 2011,2015 +# [+] International Business Machines Corp. +# # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -289,15 +291,19 @@ hb_prime() exit -1 fi - SBDRIVER=`cat ${SANDBOXBASE}/rc_files/sb.conf | \ - grep "backing_build" | awk '{ print $3 }'` - DRIVER=`cat ${HOSTBOOTROOT}/src/build/citest/etc/bbuild` - - if [ ${SBDRIVER} != ${DRIVER} ]; then - echo "ERROR: Driver mismatch between sandbox and src/build/citest/etc/bbuild." - echo "Sandbox at ${SBDRIVER}" - echo "Update sandbox with 'hb simsetup'." - exit -1 + # Prevent error message in cases where SANDBOXBASE is set but hb simsetup + # is not performed. Example seen in cronjob scripts + if [[ -f ${SANDBOXBASE}/rc_files/sb.conf ]] && + [[ -f ${HOSTBOOTROOT}/src/build/citest/etc/bbuild ]]; then + SBDRIVER=`cat ${SANDBOXBASE}/rc_files/sb.conf | \ + grep "backing_build" | awk '{ print $3 }'` + DRIVER=`cat ${HOSTBOOTROOT}/src/build/citest/etc/bbuild` + if [ ${SBDRIVER} != ${DRIVER} ]; then + echo "ERROR: Driver mismatch between sandbox and src/build/citest/etc/bbuild." + echo "Sandbox at ${SBDRIVER}" + echo "Update sandbox with 'hb simsetup'." + exit -1 + fi fi hbDistribute $* |

