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 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341
|
#!/bin/bash
#
# @echo off
#
# Settings and initializations
#
# Initialize all the AVAILABLE test cases
# and collections (all which are).
#
INIT_ALL_AVAILABLE_CASES()
{
# Functional test collection
FUNC_COLL="arithmetic bfield constant control descriptor"
FUNC_COLL="$FUNC_COLL logic manipulation name reference region synchronization"
FUNC_COLL="$FUNC_COLL table module external"
# Complex test collection
OPER_TCASES="oarg oconst oconversion olocal onamedglob onamedloc opackageel oreftonamed oreftopackageel oreturn"
RES_TCASES="rconversion rcopyobject rexplicitconv rindecrement roptional rstore"
CPLX_COLL="misc provoke"
CPLX_COLL="$CPLX_COLL $OPER_TCASES"
CPLX_COLL="$CPLX_COLL $RES_TCASES"
CPLX_COLL="$CPLX_COLL badasl namespace"
# Exceptions test collection
EXCP_COLL="exc exc_operand1 exc_operand2 exc_ref exc_result1 exc_result2"
EXCP_COLL="$EXCP_COLL exc_tbl"
# Bug-demo test collection
BDEMO_COLL="bdemo bdemof"
# Service test collection
SERV_COLL="condbranches"
# Implementation dependent test collection
IMPL_COLL="dynobj"
# Tests of multi-threading functionality (mt-tests)
MT_COLL="mt_mutex"
# Tests to prove identity of ACPICA to MS
MS_IDENT_COLL="extra extra_aslts"
# All collections of tests
ALL_AVAILABLE_COLLS="functional complex exceptions bdemo service mt Identity2MS IMPL"
ALL_AVAILABLE_TEST_CASES="$FUNC_COLL $CPLX_COLL $EXCP_COLL $BDEMO_COLL $MT_COLL $SERV_COLL $IMPL_COLL $MS_IDENT_COLL"
}
#
# Initialize all the AVAILABLE test modes
#
INIT_ALL_AVAILABLE_MODES()
{
# All test modes
ALL_AVAILABLE_TEST_MODES="n32 n64 o32 o64"
}
#
# Report all the available test cases
#
echo_available_test_cases()
{
echo "All available test cases:"
echo_list "functional" "$FUNC_COLL"
echo_list "complex" "$CPLX_COLL"
echo_list "exceptions" "$EXCP_COLL"
echo_list "bug-demo" "$BDEMO_COLL"
echo_list "mt" "$MT_COLL"
echo_list "service" "$SERV_COLL"
echo_list "implementation dependent" "$IMPL_COLL"
echo_list "Identity2MS" "$MS_IDENT_COLL"
}
#
# Return the number of all the available test cases
#
get_num_of_available_test_cases()
{
local count=0
for tcase in $ALL_AVAILABLE_TEST_CASES
do
count=$[ $count + 1 ]
done
return $count
}
#
# Set up a list of test cases you want
# to be processed by run and compare utilities.
# Do that here manually.
#
INIT_SET_OF_TEST_CASES()
{
local func compl excep bdemo serv impl
# Functional test collection
func="arithmetic bfield constant control descriptor"
func="$func logic manipulation name reference region synchronization"
func="$func table external"
# Complex test collection
compl="misc provoke"
compl="$compl oarg oconst olocal onamedloc onamedglob opackageel oreftonamed oreftopackageel oreturn"
compl="$compl rstore roptional rcopyobject rindecrement rexplicitconv"
compl="$compl badasl namespace"
# Exceptions test collection
excep="exc exc_ref exc_operand2 exc_result2"
excep="$excep exc_tbl"
# Bug-demo test collection
bdemo="bdemo bdemof"
# Service test collection
serv="condbranches"
# Tests of multi-threading functionality (mt-tests)
mt="mt_mutex"
# Tests to prove identity of ACPICA to MS
Identity2MS="extra extra_aslts"
# Implementation dependent test collection
impl="dynobj"
# The test cases to be processed by run and compare utilities:
if [ "x$ENABLED_TCASES" = "x" ]; then
# ENABLED_TCASES="$func $compl $excep $bdemo $serv"
# ENABLED_TCASES="$func $compl $excep $Identity2MS $bdemo $serv"
ENABLED_TCASES="$func $compl $excep $mt $Identity2MS $bdemo $serv"
# ENABLED_TCASES="extra extra_aslts"
# ENABLED_TCASES="control"
# ENABLED_TCASES="bdemo"
# ENABLED_TCASES="bdemo bdemof"
# ENABLED_TCASES="bdemo misc"
# ENABLED_TCASES="arithmetic constant"
# ENABLED_TCASES="condbranches"
# ENABLED_TCASES="exc"
# ENABLED_TCASES="arithmetic constant exc condbranches"
# ENABLED_TCASES="arithmetic bfield constant control descriptor logic manipulation name reference region synchronization misc provoke exc bdemo"
# ENABLED_TCASES="oarg oconst olocal onamedloc onamedglob opackageel oreftonamed oreftopackageel oreturn"
# ENABLED_TCASES="rstore roptional rcopyobject rindecrement rexplicitconv exc_ref exc_operand2 exc_result2"
# ENABLED_TCASES="condbranches"
# ENABLED_TCASES="arithmetic bfield"
# ENABLED_TCASES="descriptor"
# ENABLED_TCASES="reference"
# ENABLED_TCASES="arithmetic misc logic bdemo"
# ENABLED_TCASES="misc control manipulation"
# ENABLED_TCASES="exc_ref"
# ENABLED_TCASES="rstore"
# ENABLED_TCASES="bdemo reference"
# ENABLED_TCASES="name"
# ENABLED_TCASES="badasl"
# ENABLED_TCASES="constant"
# ENABLED_TCASES="arithmetic constant exc mt_mutex bdemo"
# ENABLED_TCASES="mt_mutex"
# ENABLED_TCASES="region"
fi
}
#
# Set up a list of test modes you want
# to be processed by run and compare utilities.
#
INIT_SET_OF_TEST_MODES()
{
local m n found
for m in $ALL_AVAILABLE_TEST_MODES
do
found=0
for n in $ENABLED_TMODES
do
if [ "x$m" = "x$n" ]; then
found=1
fi
done
if [ $found -eq 1 ]; then
# 32-bit unoptimized code:
if [ "$m" = "n32" ]; then
ENABLENORM32=1
fi
# 64-bit unoptimized code:
if [ "$m" = "n64" ]; then
ENABLENORM64=1
fi
# 32-bit optimized code:
if [ "$m" = "o32" ]; then
ENABLEOPT32=1
fi
# 64-bit unoptimized code:
if [ "$m" = "o64" ]; then
ENABLEOPT64=1
fi
fi
done
}
#
# Set it up to zero to exclude the aslts/RESULTS technique at all
#
INIT_LOG_RESULTS()
{
ENABLELOG=1
}
#
# Set it up to the maximal number of bdemo tests (of all bugs of ACPICA)
#
INIT_MAX_BDEMO()
{
MAXBDEMO=307
}
#
# Reset collections involved flags
#
reset_collections_flags()
{
FUNC_COLL_FLAG=0
CPLX_COLL_FLAG=0
EXCP_COLL_FLAG=0
BDEMO_COLL_FLAG=0
MT_COLL_FLAG=0
SERV_COLL_FLAG=0
IMPL_COLL_FLAG=0
MS_IDENT_COLL_FLAG=0
}
RESET_SETTINGS()
{
# Log enable flag
ENABLELOG=0
# Enabled modes
ENABLENORM32=0
ENABLENORM64=0
ENABLEOPT32=0
ENABLEOPT64=0
# Available test collections
FUNC_COLL=
CPLX_COLL=
EXCP_COLL=
BDEMO_COLL=
MT_COLL=
SERV_COLL=
MS_IDENT_COLL=
IMPL_COLL=
ALL_AVAILABLE_COLLS=
ALL_AVAILABLE_TEST_CASES=
# Particular test cases staff
OPER_TCASES=
RES_TCASES=
# Test collections involved flags
reset_collections_flags
# Run test error flags
HAVE_LARGE_REF_CNT=no
}
INIT_MEM_STAT()
{
# If 'yes', eliminates all settings of comparing below
DO_ALL_COMPARE=yes
DO_COMPARE_TOTAL_ONLY=no
# Enable memory statistics processing
DO_MEMSTAT=yes
#
# Enable comparing of memory statistics for the test cases
# (not only the total figures related to all the test cases
# of mode).
# Allows to reduce the time of the comparing utility.
# This comparing utility takes too long time on Cygwin
# (more than 1 hour 10 minutes, though quickly on Linux -
# not more than 1 minute).
#
DO_COMPARE_OF_TEST_CASES=no
DO_COMPARE_OF_EXCEPTIONS=no
if [ "$DO_COMPARE_OF_TEST_CASES" != yes -a "$DO_COMPARE_OF_EXCEPTIONS" != yes ]; then
DO_COMPARE_TOTAL_ONLY=yes
fi
if [ "$DO_ALL_COMPARE" == yes ]; then
DO_COMPARE_TOTAL_ONLY=no
DO_COMPARE_OF_TEST_CASES=yes
DO_COMPARE_OF_EXCEPTIONS=yes
fi
}
|