diff options
| author | Andrew Geissler <andrewg@us.ibm.com> | 2011-10-31 08:59:30 -0500 | 
|---|---|---|
| committer | Andrew J. Geissler <andrewg@us.ibm.com> | 2011-11-01 13:33:49 -0500 | 
| commit | 308c993928937070e462c027f7e6b183e7858a2a (patch) | |
| tree | 76bac801cbeb489331e765ba9349f8565d71411e /src | |
| parent | 5554e9d53859a91b39b01c8f789fe536e4688ecb (diff) | |
| download | blackbird-hostboot-308c993928937070e462c027f7e6b183e7858a2a.tar.gz blackbird-hostboot-308c993928937070e462c027f7e6b183e7858a2a.zip | |
Initfile - Support for remote compile of initfiles
Change-Id: I6609c7abc4dac6ad165d4bed4ee9a45a7d7b7f0c
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/472
Tested-by: Jenkins Server
Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com>
Reviewed-by: CAMVAN T. NGUYEN <ctnguyen@us.ibm.com>
Diffstat (limited to 'src')
| -rwxr-xr-x | src/build/hwpf/prcd_compile.tcl | 29 | ||||
| -rwxr-xr-x | src/build/hwpf/prcd_compile_test | 42 | ||||
| -rwxr-xr-x | src/build/hwpf/prcd_server.tcl | 34 | 
3 files changed, 97 insertions, 8 deletions
| diff --git a/src/build/hwpf/prcd_compile.tcl b/src/build/hwpf/prcd_compile.tcl index 1e8d7a3bd..184692aa9 100755 --- a/src/build/hwpf/prcd_compile.tcl +++ b/src/build/hwpf/prcd_compile.tcl @@ -1,4 +1,26 @@  #!/bin/sh +#  IBM_PROLOG_BEGIN_TAG +#  This is an automatically generated prolog. +# +#  $Source: src/build/hwpf/prcd_compile.tcl $ +# +#  IBM CONFIDENTIAL +# +#  COPYRIGHT International Business Machines Corp. 2011 +# +#  p1 +# +#  Object Code Only (OCO) source materials +#  Licensed Internal Code Source Materials +#  IBM HostBoot Licensed Internal Code +# +#  The source code for this program is not published or other- +#  wise divested of its trade secrets, irrespective of what has +#  been deposited with the U.S. Copyright Office. +# +#  Origin: 30 +# +#  IBM_PROLOG_END  # The next line is executed by /bin/sh, but not tcl \  exec tclsh "$0" "$@"  @@ -227,11 +249,11 @@ foreach arg $argv {  # NOT SUPPORTED -p    { set state portflag }                  -v    { set verbose 1 }                  -o    { set state outputflag } -		-*h* { puts {prcd_compile.tcl [--help] [-d <drivername>] [-o <ouput dir> ] fapiTestHwp.C fapiTestHwp.H } +		-*h* { puts {prcd_compile.tcl [--help] [-d <drivername>] [-o <ouput dir> ] fapiTestHwp.C fapiTestHwp.H sample.initfile}                         puts {} -                       puts {Note that currently this tool only supports the 2 files listed above as input } +                       puts {Note that currently this tool only supports the 3 files listed above as input }                         puts {} -		       puts {example: > prcd_compile.tcl -d b0621a_2001_Sprint2 -o ./output/ fapiTestHwp.C fapiTestHwp.C } +		       puts {example: > prcd_compile.tcl -d b0621a_2001_Sprint2 -o ./output/ fapiTestHwp.C fapiTestHwp.C sample.initfile}                         puts {}  		       puts {On success, 5 files (hbicore.bin and hbicore_test.bin, hbicore.syms }                         puts { hbicore_test.syms and hbotStringFile) will be placed in the output dir. } @@ -244,6 +266,7 @@ foreach arg $argv {                         exit                       }                   *fapiTestHwp\.* { lappend files $arg } +                 *\.initfile     { lappend files $arg }  		default { puts "Unsupported File or Argument: $arg "                            exit                          } diff --git a/src/build/hwpf/prcd_compile_test b/src/build/hwpf/prcd_compile_test index a1f4abed5..522ab97de 100755 --- a/src/build/hwpf/prcd_compile_test +++ b/src/build/hwpf/prcd_compile_test @@ -1,9 +1,31 @@  #!/bin/bash +#  IBM_PROLOG_BEGIN_TAG +#  This is an automatically generated prolog. +# +#  $Source: src/build/hwpf/prcd_compile_test $ +# +#  IBM CONFIDENTIAL +# +#  COPYRIGHT International Business Machines Corp. 2011 +# +#  p1 +# +#  Object Code Only (OCO) source materials +#  Licensed Internal Code Source Materials +#  IBM HostBoot Licensed Internal Code +# +#  The source code for this program is not published or other- +#  wise divested of its trade secrets, irrespective of what has +#  been deposited with the U.S. Copyright Office. +# +#  Origin: 30 +# +#  IBM_PROLOG_END  #Note that this test case assumes 2 files present in the PWD (along with prcd_compile.tcl)  # - fapiTestHwp.C and fapiTestHwp.H -#BUILD="b0621a_2001_Sprint2" +#BUILD="b0923a_2011_Sprint5"  BUILD="master"  ############################################################### @@ -49,6 +71,11 @@ if [ ! -f "./fapiTestHwp.C" ]; then      check_good_rc $?  fi +if [ ! -f "./sample.initfile" ]; then +    cp ../../usr/hwpf/hwp/initfiles/sample.initfile ./ +    check_good_rc $? +fi +  echo   echo "TEST - Good Path - Multi Process" @@ -89,6 +116,18 @@ echo "TEST - Good Path - No Files"  check_good_rc $?  echo +echo "TEST - Good Path - Initfile" +./prcd_compile.tcl -o ./output/ sample.initfile +check_good_rc $? +rm -rf ./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 + +echo  echo "TEST - Bad Path - Compile Failure"  rm -f hbicore*;   cp fapiTestHwp.H /tmp/ @@ -96,4 +135,5 @@ 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 diff --git a/src/build/hwpf/prcd_server.tcl b/src/build/hwpf/prcd_server.tcl index 2382872a1..55b780393 100755 --- a/src/build/hwpf/prcd_server.tcl +++ b/src/build/hwpf/prcd_server.tcl @@ -1,3 +1,25 @@ +#  IBM_PROLOG_BEGIN_TAG +#  This is an automatically generated prolog. +# +#  $Source: src/build/hwpf/prcd_server.tcl $ +# +#  IBM CONFIDENTIAL +# +#  COPYRIGHT International Business Machines Corp. 2011 +# +#  p1 +# +#  Object Code Only (OCO) source materials +#  Licensed Internal Code Source Materials +#  IBM HostBoot Licensed Internal Code +# +#  The source code for this program is not published or other- +#  wise divested of its trade secrets, irrespective of what has +#  been deposited with the U.S. Copyright Office. +# +#  Origin: 30 +# +#  IBM_PROLOG_END  # the next line restarts using tclsh\  exec tclsh "$0" "$@" @@ -77,6 +99,7 @@ proc AquireData { sock } {              ################################################################              set sbname($sock) "sb[string range [clock seconds] 4 end]" +              puts $sock "$sbname($sock)"              puts $log "$sock: $sbname($sock)" @@ -114,7 +137,8 @@ proc AquireData { sock } {              ################################################################              # Create the path to the file in the git sandbox              # If it's a .C file it goes to src/usr/hwpf/hwp/ otherwise -            # it's a .H and needs to go to src/include/usr/hwpf/hwp/ +            # it's a .H and needs to go to src/include/usr/hwpf/hwp/ otherwise +            # it's an initfile and needs to go to src/usr/hwpf/hwp/initfiles/              # Note that I can't get /* to work correctly in the regexp so I had to              # hard code in the fapi which should be ok, but annoying.              ################################################################ @@ -123,8 +147,10 @@ proc AquireData { sock } {                  set filen "$sb_dir/$sbname($sock)/src/usr/hwpf/hwp/$file"	              } elseif {[regexp {.*/*(fapi.+\.H)} $b -> file] } {                  set filen "$sb_dir/$sbname($sock)/src/include/usr/hwpf/hwp/$file" +            } elseif {[regexp {(.*\.initfile)} $b -> file] } { +                set filen "$sb_dir/$sbname($sock)/src/usr/hwpf/hwp/initfiles/$file"              } else { -                puts $sock "Invalid Input File - $b" +                puts $sock "error: Invalid Input File - $b"                  puts $log "$sock: Invalid Input File - $b"                  CloseOut $sock                  return @@ -208,7 +234,7 @@ proc CloseOut { sock } {      unset socklist(addr,$sock)      if {[info exists git_sh($sock)] } {          # Comment out next line to avoid deleting the /tmp/hwp/ sandbox -        # eval {exec} "rm -rf $sb_dir/$sbname($sock)" +        eval {exec} "rm -rf $sb_dir/$sbname($sock)"          unset git_sh($sock)          #unset sandbox($sbname($sock))      } @@ -317,7 +343,7 @@ proc SendSandbox { sock git_sh} {  # Start Compile  ################################################################## -    puts $git_sh "source env.bash; make -j4" +    puts $git_sh "source env.bash; make -j4"   ##################################################################  # tell the workon shell to terminate | 

