summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Geissler <andrewg@us.ibm.com>2011-11-28 16:03:02 -0600
committerAndrew J. Geissler <andrewg@us.ibm.com>2011-11-28 16:49:35 -0600
commit8c3bafa06b1e664c7139c95cc4a1007eeee78455 (patch)
treede2d6ea0c564c273d6b6742610bcf7884a4ef525 /src
parentd4c1403e772f0f8364d34bca3da8dbca5e9b7f08 (diff)
downloadtalos-hostboot-8c3bafa06b1e664c7139c95cc4a1007eeee78455.tar.gz
talos-hostboot-8c3bafa06b1e664c7139c95cc4a1007eeee78455.zip
Initfile - Fix for when user requests master branch for compile
Change-Id: I080bb54a2536831f6310a981b280eff7f6569826 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/516 Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com> Tested-by: Jenkins Server
Diffstat (limited to 'src')
-rwxr-xr-xsrc/build/hwpf/prcd_compile_test42
-rwxr-xr-xsrc/build/hwpf/prcd_server.tcl1
2 files changed, 26 insertions, 17 deletions
diff --git a/src/build/hwpf/prcd_compile_test b/src/build/hwpf/prcd_compile_test
index 6322512ce..5f89cca69 100755
--- a/src/build/hwpf/prcd_compile_test
+++ b/src/build/hwpf/prcd_compile_test
@@ -34,11 +34,24 @@ function check_good_rc {
if [ $1 -eq 0 ]; then
echo SUCCESS
- rm -f hbicore*
- rm -f hbotStringFile
echo
else
- echo FAIL; exit -1
+ echo FAIL: Bad RC Returned:$1; exit -1
+ fi
+}
+
+###############################################################
+# Validate return code and that binary was generated, exit on failure
+###############################################################
+function check_good_rc_and_bin {
+
+ if [ -f $2/hbicore.bin ] && [ -f $2/hbicore_extended.bin ] && [ -f $2/hbotStringFile ]; then
+ check_good_rc $1
+ rm -f $2/hbicore*
+ rm -f $2/*.bin
+ rm -f $2/hbotStringFile
+ else
+ echo FAIL: Missing File; exit -1
fi
}
@@ -88,51 +101,46 @@ sleep 20
echo
echo "TEST - Good Path - 1 C File"
./prcd_compile.tcl -d $BUILD ./fapiTestHwp.C
-check_good_rc $?
+check_good_rc_and_bin $? ./
echo
echo "TEST - Good Path - 1 H File with -o Param"
./prcd_compile.tcl -d $BUILD -o ./ ./fapiTestHwp.H
-check_good_rc $?
+check_good_rc_and_bin $? ./
echo
echo "TEST - Good Path - 2 Files"
./prcd_compile.tcl -d $BUILD ./fapiTestHwp.H ./fapiTestHwp.C
-check_good_rc $?
+check_good_rc_and_bin $? ./
echo
echo "TEST - Good Path - Directory Path and Output Directory"
cp fapiTestHwp.H /tmp/
-mkdir output
./prcd_compile.tcl -d $BUILD -o ./output/ /tmp/fapiTestHwp.H fapiTestHwp.C
-check_good_rc $?
-rm -rf output
+check_good_rc_and_bin $? ./output/
rm /tmp/fapiTestHwp.H
echo
echo "TEST - Good Path - No Files"
./prcd_compile.tcl -d $BUILD
-check_good_rc $?
+check_good_rc_and_bin $? ./
echo
echo "TEST - Good Path - Initfile"
./prcd_compile.tcl -o ./output/ sample.initfile
-check_good_rc $?
-rm -rf ./output
+check_good_rc_and_bin $? ./output/
echo
echo "TEST - Good Path - All Files"
./prcd_compile.tcl -o ./output/ sample.initfile fapiTestHwp.H ./fapiTestHwp.C
-check_good_rc $?
-rm -rf ./output
+check_good_rc_and_bin $? ./output/
echo
-echo "TEST - Bad Path - Compile Failure"
-rm -f hbicore*;
+echo "TEST - Bad Path - Compile Failure"
cp fapiTestHwp.H /tmp/
echo COMPILE_FAIL >> /tmp/fapiTestHwp.H
./prcd_compile.tcl -d $BUILD /tmp/fapiTestHwp.H fapiTestHwp.C
check_bad_rc $?
-rm /tmp/fapiTestHwp.H
rm *.bin
+rm /tmp/fapiTestHwp.H
diff --git a/src/build/hwpf/prcd_server.tcl b/src/build/hwpf/prcd_server.tcl
index 44b727ca6..92613502b 100755
--- a/src/build/hwpf/prcd_server.tcl
+++ b/src/build/hwpf/prcd_server.tcl
@@ -264,6 +264,7 @@ proc ExtractSandbox { sock git_sh} {
puts $git_sh {git init}
puts $git_sh {git remote add gerrit ssh://gfw160.austin.ibm.com:29418/hostboot}
puts $git_sh {unlog}
+ puts $git_sh {git fetch gerrit}
puts $git_sh {git fetch gerrit --tags}
if {[string compare $driver "master"] == 0} {
OpenPOWER on IntegriCloud