@@ -179,6 +179,7 @@ function nightly_functionality_stress_tests() {
179179 --num-tables ${ntables} \
180180 --cache-capacity-gib ${cache_size} \
181181 --db-location ${dbname}
182+ rm ${dbname}
182183
183184 # ----
184185 ntables=2
@@ -190,6 +191,7 @@ function nightly_functionality_stress_tests() {
190191 --num-tables ${ntables} \
191192 --cache-capacity-gib ${cache_size} \
192193 --db-location ${dbname}
194+ rm ${dbname}
193195
194196 # ----
195197 cache_size=1 # GiB
@@ -206,6 +208,7 @@ function nightly_functionality_stress_tests() {
206208 --num-tables ${ntables} \
207209 --cache-capacity-gib ${cache_size} \
208210 --db-location ${dbname}
211+ rm ${dbname}
209212
210213 # ----
211214 ntables=4
@@ -217,6 +220,8 @@ function nightly_functionality_stress_tests() {
217220 --num-tables ${ntables} \
218221 --cache-capacity-gib ${cache_size} \
219222 --db-location ${dbname}
223+ rm ${dbname}
224+
220225 # ----
221226 cache_size=512 # MiB
222227 test_descr=" ${nrows_h} rows, ${ntables} tables, ${cache_size} MiB cache"
@@ -238,6 +243,7 @@ function nightly_unit_stress_tests() {
238243 local n_mills=10
239244 local num_rows=$(( n_mills * 1000 * 1000 ))
240245 local nrows_h=" ${n_mills} mil"
246+ local dbname=" splinterdb_unit_tests_db"
241247
242248 # ----
243249 local n_threads=32
@@ -252,6 +258,8 @@ function nightly_unit_stress_tests() {
252258 --num-inserts ${num_rows} \
253259 --num-memtable-bg-threads 8 \
254260 --num-normal-bg-threads 20
261+ rm ${dbname}
262+
255263}
256264
257265# #############################################################################
@@ -298,7 +306,7 @@ function nightly_sync_perf_tests() {
298306 --tree-size-gib 4 \
299307 --db-capacity-gib 60 \
300308 --db-location ${dbname} \
301- --verbose-progress
309+ --verbose-progress \
302310 ${Use_shmem}
303311 rm ${dbname}
304312
@@ -353,6 +361,7 @@ function nightly_cache_perf_tests() {
353361 " $BINDIR " /driver_test cache_test --perf \
354362 --db-location ${dbname} \
355363 ${Use_shmem}
364+ rm ${dbname}
356365
357366 cache_size=6 # GiB
358367 test_descr=" ${cache_size} GiB cache"
@@ -377,13 +386,16 @@ function nightly_async_perf_tests() {
377386 local npthreads=20
378387 local nbgthreads=20
379388 local nasync=10
389+ local tree_size=5
380390 local test_descr=" ${npthreads} pthreads,bgt=${nbgthreads} ,async=${nasync} "
381391 local dbname=" splinter_test.perf.db"
382392 run_with_timing " Parallel Async Performance test ${test_descr} " \
383393 " $BINDIR " /driver_test splinter_test --parallel-perf \
384- --num-bg-threads ${nbgthreads} \
385394 --max-async-inflight ${nasync} \
386395 --num-pthreads ${npthreads} \
396+ --tree-size-gib ${tree_size} \
397+ --num-normal-bg-threads ${nbgthreads} \
398+ --num-memtable-bg-threads 2 \
387399 --db-capacity-gib 60 \
388400 --db-location ${dbname}
389401 rm ${dbname}
@@ -397,7 +409,7 @@ function run_nightly_perf_tests() {
397409
398410 nightly_cache_perf_tests
399411
400- # nightly_async_perf_tests
412+ nightly_async_perf_tests
401413}
402414
403415# #############################################################################
@@ -692,6 +704,7 @@ function run_slower_forked_process_tests() {
692704 msg=" Splinter tests using ${num_forked_procs} forked child processes"
693705 run_with_timing " ${msg} " " $BINDIR " /unit/splinterdb_forked_child_test \
694706 --num-processes ${num_forked_procs}
707+ rm splinterdb_unit_tests_db
695708
696709 # ---- Run large_inserts_stress_test with small configuration as a quick check
697710 # using forked child process execution.
@@ -934,71 +947,6 @@ testRunStartSeconds=$SECONDS
934947echo " $( TZ=" America/Los_Angeles" date) **** SplinterDB${run_type} Test Suite Execution Times **** " > " ${test_exec_log_file} "
935948echo >> " ${test_exec_log_file} "
936949
937- # ---- Nightly Stress and Performance test runs ----
938- if [ " $RUN_NIGHTLY_TESTS " == " true" ]; then
939-
940- set +e
941- run_with_timing " Check limits, error conditions." nightly_test_limitations
942-
943- run_nightly_stress_tests
944-
945- Use_shmem=" " run_nightly_perf_tests
946- Use_shmem=" --use-shmem" run_nightly_perf_tests
947- set -e
948-
949- record_elapsed_time ${testRunStartSeconds} " Nightly Stress & Performance Tests"
950- cat_exec_log_file
951- exit 0
952- fi
953-
954- # ---- Fast running Smoke test runs ----
955- if [ " $INCLUDE_SLOW_TESTS " != " true" ]; then
956-
957- # For some coverage, exercise --help, --list args for unit test binaries
958- set -x
959- " $BINDIR " /unit_test --help
960- " $BINDIR " /unit_test --list
961- " $BINDIR " /unit_test --list splinterdb_quick
962- " $BINDIR " /unit/btree_test --help
963- " $BINDIR " /unit/splinterdb_quick_test --list
964- set +x
965-
966- echo " "
967- echo " NOTE: **** Only running fast unit tests ****"
968- echo " To run all tests, set the env var, and re-run: $ INCLUDE_SLOW_TESTS=true ./$Me "
969- echo " "
970-
971- # Exercise config-parsing test case. Here, we feed-in a set of
972- # --config-params that the test code knows to "expect" and validates.
973- # These options can come in any order.
974- set -x
975- run_with_timing " Config-params parsing test"
976- " $BINDIR " /unit/config_parse_test --log \
977- --num-inserts 20 \
978- --rough-count-height 11 \
979- --stats \
980- --verbose-logging \
981- --verbose-progress
982- set +x
983-
984- start_seconds=$SECONDS
985-
986- run_with_timing " Smoke tests" run_fast_unit_tests " "
987-
988- Use_shmem=" --use-shmem"
989- run_with_timing " Smoke tests using shared memory" run_fast_unit_tests
990-
991- if [ " $RUN_MAKE_TESTS " == " true" ]; then
992- run_with_timing " Basic build-and-test tests" test_make_run_tests
993- fi
994-
995- cat_exec_log_file
996- exit 0
997- fi
998-
999- # ---- Rest of the coverage runs included in CI test runs ----
1000- UNIT_TESTS_DB_DEV=" unit_tests_db"
1001-
1002950# ------------------------------------------------------------------------
1003951# Fast-path execution support. You can invoke this script specifying the
1004952# name of one of the functions to execute a specific set of tests. If the
@@ -1039,29 +987,94 @@ if [ $# -ge 1 ]; then
1039987 exit 0
1040988fi
1041989
1042- # Run all the unit-tests first, to get basic coverage
1043- run_with_timing " Fast unit tests" " $BINDIR " /unit_test
990+ #
991+ # Fast tests
992+ #
1044993
1045- # ------------------------------------------------------------------------
1046- # Run mini-unit-tests that were excluded from bin/unit_test binary:
1047- # ------------------------------------------------------------------------
1048- Use_shmem=" "
1049- run_slower_unit_tests
994+ # For some coverage, exercise --help, --list args for unit test binaries
995+ set -x
996+ " $BINDIR " /unit_test --help
997+ " $BINDIR " /unit_test --list
998+ " $BINDIR " /unit_test --list splinterdb_quick
999+ " $BINDIR " /unit/btree_test --help
1000+ " $BINDIR " /unit/splinterdb_quick_test --list
1001+ set +x
1002+
1003+ # Exercise config-parsing test case. Here, we feed-in a set of
1004+ # --config-params that the test code knows to "expect" and validates.
1005+ # These options can come in any order.
1006+ set -x
1007+ run_with_timing " Config-params parsing test"
1008+ " $BINDIR " /unit/config_parse_test --log \
1009+ --num-inserts 20 \
1010+ --rough-count-height 11 \
1011+ --stats \
1012+ --verbose-logging \
1013+ --verbose-progress
1014+ set +x
10501015
1051- if [ -f ${UNIT_TESTS_DB_DEV} ] ; then rm ${UNIT_TESTS_DB_DEV} ; fi
1016+ run_with_timing " Smoke tests " run_fast_unit_tests " "
10521017
1053- run_splinter_functionality_tests
1018+ Use_shmem=" --use-shmem"
1019+ run_with_timing " Smoke tests using shared memory" run_fast_unit_tests
10541020
1055- run_splinter_perf_tests
1021+ if [ " $RUN_MAKE_TESTS " == " true" ]; then
1022+ run_with_timing " Basic build-and-test tests" test_make_run_tests
1023+ fi
10561024
1057- run_btree_tests
1025+ #
1026+ # Slow tests
1027+ #
1028+
1029+ if [ " $INCLUDE_SLOW_TESTS " == " true" ]; then
1030+
1031+ # ---- Rest of the coverage runs included in CI test runs ----
1032+ UNIT_TESTS_DB_DEV=" unit_tests_db"
1033+
1034+ # Run all the unit-tests first, to get basic coverage
1035+ run_with_timing " Fast unit tests" " $BINDIR " /unit_test
1036+
1037+ # ------------------------------------------------------------------------
1038+ # Run mini-unit-tests that were excluded from bin/unit_test binary:
1039+ # ------------------------------------------------------------------------
1040+ Use_shmem=" "
1041+ run_slower_unit_tests
1042+
1043+ if [ -f ${UNIT_TESTS_DB_DEV} ]; then rm ${UNIT_TESTS_DB_DEV} ; fi
1044+
1045+ run_splinter_functionality_tests
1046+
1047+ run_splinter_perf_tests
1048+
1049+ run_btree_tests
1050+
1051+ run_other_driver_tests
1052+
1053+ record_elapsed_time ${testRunStartSeconds} " Tests without shared memory configured"
1054+ # ------------------------------------------------------------------------
1055+ # Re-run a collection of tests using shared-memory.
1056+ Use_shmem=" --use-shmem" run_tests_with_shared_memory
1057+
1058+ fi
1059+
1060+ # ---- Nightly Stress and Performance test runs ----
1061+ if [ " $RUN_NIGHTLY_TESTS " == " true" ]; then
1062+
1063+ set +e
1064+ run_with_timing " Check limits, error conditions." nightly_test_limitations
1065+
1066+ run_nightly_stress_tests
1067+
1068+ Use_shmem=" " run_nightly_perf_tests
1069+ Use_shmem=" --use-shmem" run_nightly_perf_tests
1070+ set -e
1071+
1072+ record_elapsed_time ${testRunStartSeconds} " Nightly Stress & Performance Tests"
1073+ cat_exec_log_file
1074+ exit 0
1075+ fi
10581076
1059- run_other_driver_tests
10601077
1061- record_elapsed_time ${testRunStartSeconds} " Tests without shared memory configured"
1062- # ------------------------------------------------------------------------
1063- # Re-run a collection of tests using shared-memory.
1064- Use_shmem=" --use-shmem" run_tests_with_shared_memory
10651078
10661079record_elapsed_time ${testRunStartSeconds} " All Tests"
10671080echo ALL PASSED
0 commit comments