Megatest

Diff
Login

Differences From Artifact [41dcc3da03]:

To Artifact [e004bfd05c]:


1
2
3
4
5
6
7
8
9
10
11
12

13
14


15
16
17
18
19





20
21
22
23
24
25
26
1
2
3
4
5
6
7
8
9
10
11

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33











-
+


+
+





+
+
+
+
+







#!/bin/bash

if [ "$MT_CMDINFO" == "" ];then
  echo "ERROR: $0 should be run within a megatest test environment"
  exit
fi

# 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
   $command 2>&1| logpro ${stepname}.logpro ${stepname}.html &> ${stepname}.log 
   allstatus=(${PIPESTATUS[0]} ${PIPESTATUS[1]})