Skip to content

Commit 73844e1

Browse files
authored
Update tests to honor REGION_SETS env if provided. (#1720)
Some tests can make use of multiple region sets. For those tests that do, use the env REGION_SETS if it is set, otherwise use a default. Updated the nightly test to print env variables on start as well. Run a few more loops of the test_replace_special.
1 parent 3ede71e commit 73844e1

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

tools/test_live_repair.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ if [[ ! -f "$crucible_test" ]] || [[ ! -f "$dsc" ]] || [[ ! -f "$downstairs" ]];
6363
fi
6464

6565
loops=5
66-
region_sets=1
66+
region_sets=${REGION_SETS:-1}
6767

6868
usage () {
6969
echo "Usage: $0 [-l #] [-r #]" >&2
7070
echo " -l loops Number of replacement loops to perform (default 5)" >&2
71-
echo " -r region_sets Number of region sets to create (default 1)" >&2
71+
echo ' -r region_sets Number of region sets to create (default 1, or $REGION_SETS)' >&2
7272
}
7373

7474
while getopts 'l:r:' opt; do

tools/test_nightly.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ export BINDIR=${BINDIR:-$ROOT/target/release}
1717
echo "Nightly starts at $(date)" | tee "$output_file"
1818
echo "Running on $(git log -1 --no-color | head -20)" | tee -a "$output_file"
1919
echo "" >> "$output_file"
20+
echo "Environment settings are (Some may be unset):" | tee -a "$output_file"
21+
echo "BINDIR is: $BINDIR" | tee -a "$output_file"
22+
echo "REGION_ROOT is: $REGION_ROOT" | tee -a "$output_file"
23+
echo "WORK_ROOT is: $WORK_ROOT" | tee -a "$output_file"
24+
echo "REGION_SETS is: $REGION_SETS" | tee -a "$output_file"
2025
echo "$(date) hammer start" >> "$output_file"
2126
banner hammer
2227
banner loop
@@ -93,7 +98,7 @@ sleep 1
9398
banner replace
9499
banner special
95100
echo "$(date) test_replace_special start" >> "$output_file"
96-
./tools/test_replace_special.sh -l 30
101+
./tools/test_replace_special.sh -l 50
97102
res=$?
98103
if [[ "$res" -eq 0 ]]; then
99104
echo "$(date) test_replace_special pass" >> "$output_file"

tools/test_replace_special.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ if [[ ! -f "$crucible_test" ]] || [[ ! -f "$dsc" ]] || [[ ! -f "$downstairs" ]];
5959
fi
6060

6161
loops=5
62-
region_sets=1
62+
region_sets=${REGION_SETS:-1}
6363

6464
usage () {
6565
echo "Usage: $0 [-l #] [-r #]" >&2
6666
echo " -l loops Number of test loops to perform (default 5)" >&2
67-
echo " -r region_sets Number of region sets to create (default 1)" >&2
67+
echo ' -r region_sets Number of region sets to create (default 1, or $REGION_SETS)' >&2
6868
}
6969

7070
while getopts 'l:r:' opt; do
@@ -149,6 +149,7 @@ ${dsc} cmd shutdown
149149
wait "$dsc_pid"
150150

151151
echo "$(date) Test ends with $result" | tee -a "$test_log"
152+
echo "copied log"
152153

153154
if [[ $result -eq 0 ]]; then
154155
# Cleanup

tools/test_replay.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ if [[ ! -f "$crucible_test" ]] || [[ ! -f "$dsc" ]] || [[ ! -f "$downstairs" ]];
5555
fi
5656

5757
loops=30
58-
region_sets=1
58+
region_sets=${REGION_SETS:-1}
5959

6060
usage () {
6161
echo "Usage: $0 [-l #]]" >&2
6262
echo " -l loops Number of times to cause a replay." >&2
63-
echo " -r regions Number of region sets to create (default 1)" >&2
63+
echo ' -r regions Number of region sets to create (default 1, or $REGION_SETS)' >&2
6464
}
6565

6666
while getopts 'l:r:' opt; do

0 commit comments

Comments
 (0)