Megatest

Check-in [aaef4b35a4]
Login
Overview
Comment:Added mutils to make install of chicken. Use bashisms in mt_ezstep
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.60
Files: files | file ages | folders
SHA1: aaef4b35a4b132068d023f6424c6faf964f2741a
User & Date: matt on 2015-03-15 23:52:15
Other Links: branch diff | manifest | tags
Context
2015-03-19
21:58
Added event_time to runs and tests json output check-in: 7700e79406 user: matt tags: v1.60
2015-03-15
23:52
Added mutils to make install of chicken. Use bashisms in mt_ezstep check-in: aaef4b35a4 user: matt tags: v1.60
22:44
Merged in json output for -list-runs. Bumped version to 1.6009. check-in: b63a26d1e6 user: matt tags: v1.60
Changes

Modified utils/Makefile.installall from [a0d304926b] to [64d1b3ca85].

85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
ARCHSIZE=64_
endif

CSCLIBS=$(shell echo $(LD_LIBRARY_PATH) | sed 's/:/ -L/g')
CSC_OPTIONS="-I$(PREFIX)/include -L$(CSCLIBS) -C \"-fPIC\""
# CSC_OPTIONS=-I$(PREFIX)/include -L$(CSCLIBS)

all : chkn eggs libiup logprobin $(PREFIX)/lib/sqlite3.so $(PREFIX)/bin/hs

chkn : $(CHICKEN_INSTALL)

eggs : $(EGGSOFILES)

# libiup : $(PREFIX)/lib/libavcall.a 
libiup : $(CHICKEN_EGG_DIR)/iup.so $(CHICKEN_EGG_DIR)/canvas-draw.so







|







85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
ARCHSIZE=64_
endif

CSCLIBS=$(shell echo $(LD_LIBRARY_PATH) | sed 's/:/ -L/g')
CSC_OPTIONS="-I$(PREFIX)/include -L$(CSCLIBS) -C \"-fPIC\""
# CSC_OPTIONS=-I$(PREFIX)/include -L$(CSCLIBS)

all : chkn eggs libiup logprobin $(PREFIX)/lib/sqlite3.so $(PREFIX)/bin/hs $(PREFIX)/lib/chicken/7/mutils.so

chkn : $(CHICKEN_INSTALL)

eggs : $(EGGSOFILES)

# libiup : $(PREFIX)/lib/libavcall.a 
libiup : $(CHICKEN_EGG_DIR)/iup.so $(CHICKEN_EGG_DIR)/canvas-draw.so
176
177
178
179
180
181
182



183
184
185
186
187
188
189

opensrc.fossil :
	fossil clone http://www.kiatoa.com/fossils/opensrc opensrc.fossil

opensrc/histstore/histstore.scm : opensrc.fossil
	mkdir -p opensrc
	cd opensrc;fossil open ../opensrc.fossil




opensrc/histstore/hs : opensrc/histstore/histstore.scm chkn eggs $(PREFIX)/lib/sqlite3.so 
	cd opensrc/histstore;$(PREFIX)/bin/csc histstore.scm -o hs

$(PREFIX)/bin/hs : opensrc/histstore/hs 
	cp -f opensrc/histstore/hs $(PREFIX)/bin/hs








>
>
>







176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192

opensrc.fossil :
	fossil clone http://www.kiatoa.com/fossils/opensrc opensrc.fossil

opensrc/histstore/histstore.scm : opensrc.fossil
	mkdir -p opensrc
	cd opensrc;fossil open ../opensrc.fossil

$(PREFIX)/lib/chicken/7/mutils.so : opensrc/histstore/histstore.scm
	cd opensrc/mutils;chicken-install

opensrc/histstore/hs : opensrc/histstore/histstore.scm chkn eggs $(PREFIX)/lib/sqlite3.so 
	cd opensrc/histstore;$(PREFIX)/bin/csc histstore.scm -o hs

$(PREFIX)/bin/hs : opensrc/histstore/hs 
	cp -f opensrc/histstore/hs $(PREFIX)/bin/hs

Modified utils/mt_ezstep from [94c507b08a] to [298bdcd309].

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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/bash

usage="mt_ezstep stepname prevstepname command [args ...]"

if [ "$MT_CMDINFO" == "" ];then
  if [ -e megatest.sh ];then
    source megatest.sh
  else
    echo "ERROR: $0 should be run within a megatest test environment"
    echo "Usage: $usage"
    exit
  fi
fi

# Purpose: This is for the [ezsteps] secton in your testconfig file.
#   DO NOT USE IN YOUR SCRIPTS!
#
# Call like this:
# mt_ezstep stepname prevstepname command ....
# 
if [ "x$1" == "x" ];then
  echo "Usage: $usage"
  exit
fi

# Since the user may not have . on the path and since we are likely to want to 
# run test scripts in the current directory add the current dir to the path
export PATH=$PATH:$PWD

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
   # could do:
   $command 2>&1| tee ${stepname}.log | logpro ${stepname}.logpro ${stepname}.html &> /dev/null
   logprostatus=$?
   # $command 2>&1| logpro ${stepname}.logpro ${stepname}.html &> ${stepname}.log 
   # allstatus=(${PIPESTATUS[0]} ${PIPESTATUS[1]}) 
   allstatus=(${PIPESTATUS[0]} ${PIPESTATUS[1]})
   runstatus=${allstatus[0]}
   # logprostatus=${allstatus[1]}
else
   $command &> ${stepname}.log
   runstatus=$?
   logprostatus=$runstatus
fi

# If the test exits with non-zero, we will record FAIL even if logpro
# says it is a PASS

if [ $runstatus -ne 0 ]; then
    exitstatus=$runstatus
elif [ $logprostatus -eq 0 ]; then
    exitstatus=$logprostatus
elif [ $logprostatus -eq 2 ]; then
    exitstatus=2
elif [ $logprostatus -eq 1 ]; then
    exitstatus=1
else 
    exitstatus=0
fi

# $MT_MEGATEST -env2file .ezsteps/${stepname}
exit $exitstatus




|
|














|

















|
|






|

















|

|

|

|







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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/bash

usage="mt_ezstep stepname prevstepname command [args ...]"

if [[ "$MT_CMDINFO" == "" ]];then
  if [[ -e megatest.sh ]];then
    source megatest.sh
  else
    echo "ERROR: $0 should be run within a megatest test environment"
    echo "Usage: $usage"
    exit
  fi
fi

# Purpose: This is for the [ezsteps] secton in your testconfig file.
#   DO NOT USE IN YOUR SCRIPTS!
#
# Call like this:
# mt_ezstep stepname prevstepname command ....
# 
if [[ "x$1" == "x" ]];then
  echo "Usage: $usage"
  exit
fi

# Since the user may not have . on the path and since we are likely to want to 
# run test scripts in the current directory add the current dir to the path
export PATH=$PATH:$PWD

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
   # could do:
   $command 2>&1| tee ${stepname}.log | logpro ${stepname}.logpro ${stepname}.html &> /dev/null
   logprostatus=$?
   # $command 2>&1| logpro ${stepname}.logpro ${stepname}.html &> ${stepname}.log 
   # allstatus=(${PIPESTATUS[0]} ${PIPESTATUS[1]}) 
   allstatus=(${PIPESTATUS[0]} ${PIPESTATUS[1]})
   runstatus=${allstatus[0]}
   # logprostatus=${allstatus[1]}
else
   $command &> ${stepname}.log
   runstatus=$?
   logprostatus=$runstatus
fi

# If the test exits with non-zero, we will record FAIL even if logpro
# says it is a PASS

if [[ $runstatus -ne 0 ]]; then
    exitstatus=$runstatus
elif [[ $logprostatus -eq 0 ]]; then
    exitstatus=$logprostatus
elif [[ $logprostatus -eq 2 ]]; then
    exitstatus=2
elif [[ $logprostatus -eq 1 ]]; then
    exitstatus=1
else 
    exitstatus=0
fi

# $MT_MEGATEST -env2file .ezsteps/${stepname}
exit $exitstatus