1 of 1 people found this helpful
setenv CALIBRE_ECHO_RULE_FILE ON
please set the above environmet variable and pipe the runlog to a separate file.
calibre -drc -hier rulefile | tee runlog
the runlog will have parsed rule file. Note the #IFDEF statements are commented out in the log file. This is very similar to *.ev file in hercules. I don't think there is any special way which gives the parsed rule file like hercules. In calibre we get the parsed rule file + the complete log file.
I am using that already, but I will need to run the job (and suspend it immediately after it starts to run) in order to get the rule file in the output log.
I was wondering if there was a way to have Calibre only parse the file but not start the run.
Thanks for the answer any way.
For parsing a rule file without running calibre, one may run calibre interactive instead: calibre -gui
In the launched window, just fill-in primary SVRF file and working directory for calibre, then press "Load"
Parser will check integrity of the deck.
Hope this helps
Hi Ravi. Does this suggestion help?
Thanks Laurent, Karen for the follow-up.
"LOAD" can help for the integrity check but I am more interested in churning out different rule files with different settings. From the design flow side, it is very important that we demonstrate the significance of different switches to the user and explain in simple terms how they combine with or differ with each other for a particular selection or exclusion of section of rules for a given purpose.
If this is made possibe, I could simply make different settings/switch combinations (for different scenarios) and get the 'effective' rule files out for each of those scenarios (without having to subject them to execution). I could then also visually see the differences between the rule files and the exclusion/inclusion of rules. This will definitely help for a clearer understanding of the switches set up.
I hope you appreciate the need now.
Hi Ravi, I've used Laurent's suggestion many times but it was always for a one shot deal that I only needed to do for an individual testcase. To run different switch configurations in one or multiple rule files you'll definitely want something scripted. There is a free unsupported utility on SupportNet called Rules Syntax Checker (RSC) that you can use to check Calibre rules syntax. RSC is just a shell script that runs a dummy test in Calibre that will compile the rules. You could embed this in a script that will output the log file with the different settings. Once you have that, parse the log file and write the log file with switches. You'll have to modify it a bit, but it is pretty simple as you'll see. Download it from the RSC link above. Hope that helps. James
You are not the only one with this request. I agree, it is difficult, if not impossible, to have a complex rule file with many variables, conditionals and include files, to know exactly what is going to be run.
Beyond what has already been suggested, one other thing to look at is the treeview in Calibre Interactive. Browse to your rule file and press "view". Interactive shows a tree of the rules.
I know this still isn't exactly what you want, but may be useful anyway.
In the meantime, we do have some ideas in this space and are working on them. I expect that we will get a solution to this, but we still have work ahead of us to get there.
The unsupported "distill" Perl script does exactly what you are looking for. Here is the link on Supportnet.
Usage: distill rules_all > rules_actually_run
Hope this helps,