From c34436886e64789be29877c5d2dc747147d24ae7 Mon Sep 17 00:00:00 2001 From: Jaymes Wilks Date: Thu, 8 Jun 2017 09:53:20 -0500 Subject: Create current list of persistent read/write attributes each build Modified xmltohb.pl to output a list of persistent read/write attributes to a file named rwAttrList.csv in obj/genfiles. Change-Id: I7f17a709891f9742c9e4943174c0fd7a023ed940 RTC:163084 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41536 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Reviewed-by: Stephen M. Cprek Tested-by: FSP CI Jenkins Reviewed-by: Michael Baiocchi Reviewed-by: Daniel M. Crowell Reviewed-by: Nicholas E. Bofferding --- src/usr/targeting/common/xmltohb/xmltohb.pl | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src') diff --git a/src/usr/targeting/common/xmltohb/xmltohb.pl b/src/usr/targeting/common/xmltohb/xmltohb.pl index 0ca61f5e9..483df2083 100755 --- a/src/usr/targeting/common/xmltohb/xmltohb.pl +++ b/src/usr/targeting/common/xmltohb/xmltohb.pl @@ -249,6 +249,33 @@ else handleTgtPtrAttributesHb(\$attributes, \%Target_t); } +# Output R/W attributes +my $rwAttrOutputDir = ""; +if (!($cfgSrcOutputDir =~ "none")) +{ + $rwAttrOutputDir = $cfgSrcOutputDir; +} +open(my $rwAttrFile, ">$rwAttrOutputDir"."PersistRwAttrList.csv") + or croak("R/W data file 'PersistRwAttrList.csv' could not be opened."); + +print $rwAttrFile "# PersistRwAttrList.csv\n" +. "# This file is generated by perl script xmltohb.pl\n" +. "# It lists all non-volatile read/write attributes that persist in PNOR\n" +. "# and can be manipulated at will.\n"; + +foreach my $attrs (@{$attributes->{attribute}}) +{ + if (exists $attrs->{readable} && + exists $attrs->{writeable} && + exists $attrs->{persistency} && + $attrs->{persistency} eq "non-volatile") + { + print $rwAttrFile "$attrs->{id}\n"; + } + +} +close $rwAttrFile; + # Open the output files and write them if( !($cfgSrcOutputDir =~ "none") ) { -- cgit v1.2.1