Index: docs/manual/debugging.txt ================================================================== --- docs/manual/debugging.txt +++ docs/manual/debugging.txt @@ -162,17 +162,17 @@ ---------------------------------------------------------------------- .How to check variable values and inspect logs at each stage [width="80%",cols="<,2m,2m",frame="topbot",options="header"] |====================== -|Stage | How to inspect | Watch for +|Stage | How to inspect | Watch for or try ... |A: post config processing | megatest -show-config -target your/target | #f (failed var processing) |B: post runconfig | megatest -show-runconfig -target your/target | Add -debug 0,9 to see which file your settings come from |C: processing testconfigs | inspect output from "megatest -run ..." | Messages indicating issues process configs, dependency problems |D: process testconfig for test launch | inspect output from megatest runner | Zero items (items expansion yielded no items) -|E,F: launching test | start test xterm, look at mt_launch.log | Did your batch system accept the job? Has the job landed on a machine? -|G: starting test | look at your batch systems logs for the process | Did the megatest -execute process start and run? +|E,F: launching test | start test xterm, look at mt_launch.log | Did your batch system accept the job? Has the job landed on a machine? +|G: starting test | look at your batch systems logs for the process | Did the megatest -execute process start and run? Extract the "megatest -execute ..." command and run it from your xterm. |H,H1,H2: step exectution | look at .log, .html and your own internal logs | Do you have sufficiently tight logpro rules? You must always have a "required" rule! |====================== Bisecting megatest.csh/sh ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -232,10 +232,11 @@ When this test is run an xterm will pop up. In that xterm the environment is exactly that in which the script "getcellnames.sh" would run. You can now debug the script to find out why it isn't working as expected. +Similarly in a script just call the xterm. NOTE: This technique can be very helpful in debugging running of EDA tools in Perl, Ruby, Python or tcl scripts: .Perl example .............................. some_code(); @@ -270,25 +271,44 @@ In scripts just insert the commands, this example helps you identify if "some commands ..." changed any environment variables.: .myscript.sh .............................. -env > somefile-before.log +env | sort > somefile-before.log some commands ... -env > somefile-after.log +env | sort > somefile-after.log .............................. .Use meld to examine the differences .............................. meld somefile-before.log somefile-after.log .............................. -Start an xterm to examine the environment, run scripts etc: +Oneshot Modifying a Variable +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +To try various values for a variable without mutating the current value + +.within a bash shell +.............................. +SOMEVAR=123 runcmd.sh +.............................. + +.within csh +.............................. +(setenv SOMEVAR 123;runcmd.sh) + +# OR + +env SOMEVAR=123 runcmd.sh +.............................. -In a config file: +Capturing output from a command +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.megatest.config, runconfigs.config and testconfig files +.Use the "script" utility .............................. -#{shell xterm} (this blocks) +script -c "virtuoso -params and switches ..." .............................. -Similarly in a script just call the xterm. + + Index: docs/manual/megatest_manual.html ================================================================== --- docs/manual/megatest_manual.html +++ docs/manual/megatest_manual.html @@ -2074,11 +2074,11 @@ Stage How to inspect - Watch for + Watch for or try …

A: post config processing

@@ -2106,11 +2106,11 @@

Did your batch system accept the job? Has the job landed on a machine?

G: starting test

look at your batch systems logs for the process

-

Did the megatest -execute process start and run?

+

Did the megatest -execute process start and run? Extract the "megatest -execute …" command and run it from your xterm.

H,H1,H2: step exectution

look at <stepname>.log, <stepname>.html and your own internal logs

Do you have sufficiently tight logpro rules? You must always have a "required" rule!

@@ -2166,18 +2166,12 @@

When this test is run an xterm will pop up. In that xterm the environment is exactly that in which the script "getcellnames.sh" would run. You can now debug the script to find out why it isn’t working as expected.

-
- - - -
-Note -This technique can be very helpful in debugging running of EDA tools in Perl, Ruby, Python or tcl scripts:
-
+

Similarly in a script just call the xterm. +NOTE: This technique can be very helpful in debugging running of EDA tools in Perl, Ruby, Python or tcl scripts:

Perl example
some_code();
 $cmdline="virtuoso -some-switches and params ...";
@@ -2207,27 +2201,37 @@
 

In scripts just insert the commands, this example helps you identify if "some commands …" changed any environment variables.:

myscript.sh
-
env > somefile-before.log
+
env | sort > somefile-before.log
 some commands ...
-env > somefile-after.log
+env | sort > somefile-after.log
Use meld to examine the differences
meld somefile-before.log somefile-after.log
-

Start an xterm to examine the environment, run scripts etc:

-

In a config file:

+
+
+

Oneshot Modifying a Variable

+

To try various values for a variable without mutating the current value

+
+
within a bash shell
+
+
SOMEVAR=123 runcmd.sh
+
-
megatest.config, runconfigs.config and testconfig files
+
within csh
-
#{shell xterm}  (this blocks)
+
(setenv SOMEVAR 123;runcmd.sh)
+
+# OR
+
+env SOMEVAR=123 runcmd.sh
-

Similarly in a script just call the xterm.

Index: docs/manual/megatest_manual.pdf ================================================================== --- docs/manual/megatest_manual.pdf +++ docs/manual/megatest_manual.pdf cannot compute difference between binary files