Index: launch.scm ================================================================== --- launch.scm +++ launch.scm @@ -168,17 +168,18 @@ (debug:print 4 "ezsteps:\n stepname: " stepname " stepinfo: " stepinfo " stepparts: " stepparts " stepparms: " stepparms " stepcmd: " stepcmd) (if (file-exists? (conc stepname ".logpro"))(set! logpro-used #t)) - ;; first source the previous environment - (let ((prev-env (conc ".ezsteps/" prevstep (if (string-search (regexp "csh") (get-environment-variable "SHELL")) ".csh" ".sh")))) - (if (and prevstep (file-exists? prev-env)) - (set! script (conc script "source " prev-env)))) + ;; ;; first source the previous environment + ;; (let ((prev-env (conc ".ezsteps/" prevstep (if (string-search (regexp "csh") + ;; (get-environment-variable "SHELL")) ".csh" ".sh")))) + ;; (if (and prevstep (file-exists? prev-env)) + ;; (set! script (conc script "source " prev-env)))) ;; call the command using mt_ezstep - (set! script (conc script ";mt_ezstep " stepname " " stepcmd)) + (set! script (conc "mt_ezstep " stepname " " (if prevstep prevstep "-") " " stepcmd)) (debug:print 4 "script: " script) (teststep-set-status! db run-id test-name stepname "start" "-" itemdat #f #f) ;; now launch ADDED tests/tests/ez_exit2_fail/testconfig Index: tests/tests/ez_exit2_fail/testconfig ================================================================== --- /dev/null +++ tests/tests/ez_exit2_fail/testconfig @@ -0,0 +1,15 @@ +[setup] + +[ezsteps] +exit2 exit 2 +lookithome ls /home + +[test_meta] +author matt +owner bob +description This test runs two steps; the first exits with + code 2 (a fail because not using logpro) and the second + is a pass + +tags first,single +reviewed 09/10/2011, by Matt DELETED tests/tests/ez_warn/testconfig Index: tests/tests/ez_warn/testconfig ================================================================== --- tests/tests/ez_warn/testconfig +++ /dev/null @@ -1,15 +0,0 @@ -[setup] - -[ezsteps] -exit2 exit 2 -lookithome ls /home - -[test_meta] -author matt -owner bob -description This test runs two steps; the first exits with - code 2 (a fail because not using logpro) and the second - is a pass - -tags first,single -reviewed 09/10/2011, by Matt Index: tests/tests/ezlog_fail/lookittmp.logpro ================================================================== --- tests/tests/ezlog_fail/lookittmp.logpro +++ tests/tests/ezlog_fail/lookittmp.logpro @@ -1,8 +1,6 @@ ;; (c) 2006,2007,2008,2009 Matthew Welland matt@kiatoa.com ;; ;; License GPL. - -(expect:ignore in "LogFileBody" < 99 "Ignore the word error in comments" #/^\/\/.*error/) (expect:warning in "LogFileBody" = 0 "Any warning" #/WARNING/) (expect:error in "LogFileBody" = 0 "Any error" (list #/ERROR/ #/.*/)) ;; force an error Index: utils/mt_ezstep ================================================================== --- utils/mt_ezstep +++ utils/mt_ezstep @@ -7,18 +7,25 @@ # Purpose: This is for the [ezsteps] secton in your testconfig file. # DO NOT USE IN YOUR SCRIPTS! # # Call like this: -# mt_ezstep stepname command .... +# mt_ezstep stepname prevstepname command .... # stepname=$1;shift +prevstepname=$1;shift + command=$* allstatus=99 runstatus=99 logpropstatus=99 + +prev_env=.ezsteps/${prevstepname}.sh +if [ -e $prev_env ];then + source $prev_env +fi # source the environment from the previous step if it exists # if a logpro file exists then use it otherwise just run the command, nb// was using 2>&1 if [ -e ${stepname}.logpro ];then