Skip to content

Commit beb6e47

Browse files
author
Kerry Kimbrough
committed
Add support for -R option.
1 parent bb3548f commit beb6e47

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

tcases-shell/bin/tcases

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ usage()
6464
echo " -r seed If -r is defined, use the given random number seed for all generators." >&2
6565
echo " This updates the generator definitions specified by the genDef file." >&2
6666
echo "" >&2
67+
echo " -R If -R is defined, choose a new random number seed for all generators." >&2
68+
echo " This updates the generator definitions specified by the genDef file." >&2
69+
echo "" >&2
6770
echo " -t testDef If -t is defined, test definition output is written to the specified" >&2
6871
echo " testDef path, relative to the outDir. If omitted, the default testDef" >&2
6972
echo " name is derived from the inputDef name. If an output path cannot be" >&2
@@ -90,6 +93,7 @@ while [ $# -gt 0 ] ; do
9093
-o) shift; outDir="$1";;
9194
-p) shift; params="$params -p $1";;
9295
-r) shift; seed="$1";;
96+
-R) newSeed="$1";;
9397
-t) shift; testDef="$1";;
9498
-v) showVersion="$1";;
9599
-x) shift; xsltDef="$1";;
@@ -145,6 +149,7 @@ java \
145149
$showVersion \
146150
${genDef:+-g "$genDef"} \
147151
${seed:+-r "$seed"} \
152+
$newSeed \
148153
${defTupleSize:+-c "$defTupleSize"} \
149154
$noExtend \
150155
$isJUnit \

tcases-shell/bin/tcases-reducer

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ usage()
3838
echo " each round, define resampleFactor > 0. To decrease sample count with each round," >&2
3939
echo " define -1 < resampleFactor < 0. If resampleFactor is omitted, the default value is 0." >&2
4040
echo "" >&2
41+
echo " -R If defined, ignore any random seed defined in the genDef file and search for a new seed." >&2
42+
echo "" >&2
4143
echo " -s sampleCount Defines the number of samples for the initial round of reducing. If omitted," >&2
4244
echo " the default sampleCount is 10." >&2
4345
echo "" >&2
@@ -52,6 +54,7 @@ while [ $# -gt 0 ] ; do
5254
-l) shift; logFile="$1";;
5355
-L) shift; logLevel="$1";;
5456
-r) shift; resmpf="$1";;
57+
-R) newSeed="$1";;
5558
-s) shift; smpc="$1";;
5659
-t) shift; testDef="$1";;
5760
-*) usage; exit 1;;
@@ -102,6 +105,7 @@ java \
102105
org.cornutum.tcases.Reducer \
103106
${genDef:+-g "$genDef"} \
104107
${resmpf:+-r "$resmpf"} \
108+
$newSeed \
105109
${smpc:+-s "$smpc"} \
106110
${function:+-f "$function"} \
107111
${testDef:+-t "$testDef"} \

0 commit comments

Comments
 (0)