diff options
author | Alpana Kumari <alpankum@in.ibm.com> | 2017-10-08 12:32:17 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-11-17 09:24:24 -0500 |
commit | 663aae09de4001c7d17225f44ae824215e459bc7 (patch) | |
tree | 7daff290b48e98d0ef28e596435f4b8ca345789d /src/usr/targeting/common/filter_out_unwanted_attributes.pl | |
parent | 73859ef374f2b44bb4d4e2c222721db4b960b55b (diff) | |
download | talos-hostboot-663aae09de4001c7d17225f44ae824215e459bc7.tar.gz talos-hostboot-663aae09de4001c7d17225f44ae824215e459bc7.zip |
Fix in filter Unwanted Attribute script
New generated target_types_sp.xml has differnt pattern than
target_types.xml, so it is failing to parse the values.
Fixed it by changing the way of parsing
Change-Id: I521e820bd32ceb5d213a36b6efbe1c6531a24bef
CQ: SW404369
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/48091
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: RAJA DAS <rajadas2@in.ibm.com>
Reviewed-by: Prachi Gupta <pragupta@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/targeting/common/filter_out_unwanted_attributes.pl')
-rwxr-xr-x | src/usr/targeting/common/filter_out_unwanted_attributes.pl | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/usr/targeting/common/filter_out_unwanted_attributes.pl b/src/usr/targeting/common/filter_out_unwanted_attributes.pl index ab6ab99c8..3471529d2 100755 --- a/src/usr/targeting/common/filter_out_unwanted_attributes.pl +++ b/src/usr/targeting/common/filter_out_unwanted_attributes.pl @@ -133,13 +133,22 @@ open (FH, "<$tgt_files[0]"); #To read out each line my $check = 0; my $id = ""; my $endOfLine = 0; +my $attrId = 0; while (my $line = <FH>) { if ( $line =~ /^\s*<targetType>.*/) { $check = 1; } - elsif ($check == 1 && $line =~ /^\s*<id>/) + elsif ($line =~ /^\s*<attribute>.*/) + { + $attrId = 1; + } + elsif ($line =~ /^\s*<\/attribute>.*/) + { + $attrId = 0; + } + elsif ($check == 1 && $attrId == 0 && $line =~ /^\s*<id>/) { $check = 0; $id = $line; |