diff options
author | Don Anderson <dda@mongodb.com> | 2016-07-21 19:04:20 -0400 |
---|---|---|
committer | Alex Gorrod <alexander.gorrod@mongodb.com> | 2016-07-22 09:04:20 +1000 |
commit | 64db71fcd9f819cafc4cc89b317e2225d90d66f2 (patch) | |
tree | 5a7fd0e9db938e0574e4278fff2c893eddc55e69 | |
parent | bbc17c2a586d56ff462b237c94a4ebab513a44cc (diff) | |
download | mongo-64db71fcd9f819cafc4cc89b317e2225d90d66f2.tar.gz |
WT-2778 Enhance output formatting when running Python test suite (#2888)
Update make_scenarios function as a standard way to create scenarios that plays well with the new run.py -s option.
Modified all tests that use scenarios to use make_scenarios.
A couple other minor changes in scenario naming to ensure that no final scenario ends up with a number as a name.
105 files changed, 260 insertions, 278 deletions
diff --git a/test/suite/test_async01.py b/test/suite/test_async01.py index 71a18a68121..9322748c30f 100644 --- a/test/suite/test_async01.py +++ b/test/suite/test_async01.py @@ -29,7 +29,7 @@ import sys, threading, wiredtiger, wttest from suite_subprocess import suite_subprocess from wiredtiger import WiredTigerError -from wtscenario import check_scenarios +from wtscenario import make_scenarios # TODO - tmp code def tty_pr(s): @@ -122,7 +122,7 @@ class test_async01(wttest.WiredTigerTestCase, suite_subprocess): async_threads = 3 current = {} - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('file-col', dict(tablekind='col',uri='file')), ('file-fix', dict(tablekind='fix',uri='file')), ('file-row', dict(tablekind='row',uri='file')), diff --git a/test/suite/test_async02.py b/test/suite/test_async02.py index 7aa1b85a2f3..bc6b389fc27 100644 --- a/test/suite/test_async02.py +++ b/test/suite/test_async02.py @@ -29,7 +29,7 @@ import sys, threading, wiredtiger, wttest from suite_subprocess import suite_subprocess from wiredtiger import WiredTigerError -from wtscenario import check_scenarios +from wtscenario import make_scenarios class Callback(wiredtiger.AsyncCallback): def __init__(self, current): @@ -119,7 +119,7 @@ class test_async02(wttest.WiredTigerTestCase, suite_subprocess): async_threads = 3 current = {} - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('file-col', dict(tablekind='col',uri='file')), ('file-fix', dict(tablekind='fix',uri='file')), ('file-row', dict(tablekind='row',uri='file')), diff --git a/test/suite/test_backup02.py b/test/suite/test_backup02.py index 095bfbe404a..398d55abd7a 100644 --- a/test/suite/test_backup02.py +++ b/test/suite/test_backup02.py @@ -30,13 +30,13 @@ import Queue import threading, time, wiredtiger, wttest from helper import key_populate, simple_populate from wtthread import backup_thread, checkpoint_thread, op_thread -from wtscenario import check_scenarios +from wtscenario import make_scenarios # test_backup02.py # Run background checkpoints and backsups repeatedly while doing inserts # in another thread class test_backup02(wttest.WiredTigerTestCase): - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('table', dict(uri='table:test',fmt='L',dsize=100,nops=200,nthreads=1,time=30)), ]) diff --git a/test/suite/test_backup03.py b/test/suite/test_backup03.py index e810a2ec714..053009c6edb 100644 --- a/test/suite/test_backup03.py +++ b/test/suite/test_backup03.py @@ -28,7 +28,7 @@ import glob, os, shutil, string from suite_subprocess import suite_subprocess -from wtscenario import multiply_scenarios, number_scenarios +from wtscenario import make_scenarios import wiredtiger, wttest from helper import compare_files,\ complex_populate, complex_populate_lsm, simple_populate @@ -56,25 +56,25 @@ class test_backup_target(wttest.WiredTigerTestCase, suite_subprocess): ('table:' + pfx + '.4', complex_populate_lsm, 3), ] list = [ - ( '1', dict(big=0,list=[0])), # Target objects individually - ( '2', dict(big=1,list=[1])), - ( '3', dict(big=2,list=[2])), - ( '4', dict(big=3,list=[3])), - ('5a', dict(big=0,list=[0,2])), # Target groups of objects - ('5b', dict(big=2,list=[0,2])), - ('6a', dict(big=1,list=[1,3])), - ('6b', dict(big=3,list=[1,3])), - ('7a', dict(big=0,list=[0,1,2])), - ('7b', dict(big=1,list=[0,1,2])), - ('7c', dict(big=2,list=[0,1,2])), - ('8a', dict(big=0,list=[0,1,2,3])), - ('8b', dict(big=1,list=[0,1,2,3])), - ('8c', dict(big=2,list=[0,1,2,3])), - ('8d', dict(big=3,list=[0,1,2,3])), - ( '9', dict(big=3,list=[])), # Backup everything + ( 'backup_1', dict(big=0,list=[0])), # Target objects individually + ( 'backup_2', dict(big=1,list=[1])), + ( 'backup_3', dict(big=2,list=[2])), + ( 'backup_4', dict(big=3,list=[3])), + ('backup_5a', dict(big=0,list=[0,2])), # Target groups of objects + ('backup_5b', dict(big=2,list=[0,2])), + ('backup_6a', dict(big=1,list=[1,3])), + ('backup_6b', dict(big=3,list=[1,3])), + ('backup_7a', dict(big=0,list=[0,1,2])), + ('backup_7b', dict(big=1,list=[0,1,2])), + ('backup_7c', dict(big=2,list=[0,1,2])), + ('backup_8a', dict(big=0,list=[0,1,2,3])), + ('backup_8b', dict(big=1,list=[0,1,2,3])), + ('backup_8c', dict(big=2,list=[0,1,2,3])), + ('backup_8d', dict(big=3,list=[0,1,2,3])), + ('backup_9', dict(big=3,list=[])), # Backup everything ] - scenarios = number_scenarios(multiply_scenarios('.', list)) + scenarios = make_scenarios(list) # Create a large cache, otherwise this test runs quite slowly. conn_config = 'cache_size=1G' diff --git a/test/suite/test_backup04.py b/test/suite/test_backup04.py index 852a22c1e0c..866e673dccb 100644 --- a/test/suite/test_backup04.py +++ b/test/suite/test_backup04.py @@ -30,7 +30,7 @@ import Queue import threading, time, wiredtiger, wttest import glob, os, shutil from suite_subprocess import suite_subprocess -from wtscenario import check_scenarios +from wtscenario import make_scenarios from wtthread import op_thread from helper import compare_files, key_populate @@ -54,7 +54,7 @@ class test_backup_target(wttest.WiredTigerTestCase, suite_subprocess): # and that is not what we want here. # pfx = 'test_backup' - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('table', dict(uri='table:test',dsize=100,nops=2000,nthreads=1,time=30)), ]) diff --git a/test/suite/test_backup05.py b/test/suite/test_backup05.py index fbe219d8de8..131732e9a89 100644 --- a/test/suite/test_backup05.py +++ b/test/suite/test_backup05.py @@ -35,7 +35,6 @@ import fnmatch, os, shutil, time from suite_subprocess import suite_subprocess -from wtscenario import multiply_scenarios, number_scenarios, prune_scenarios from helper import copy_wiredtiger_home import wiredtiger, wttest diff --git a/test/suite/test_base02.py b/test/suite/test_base02.py index 70117573241..2b51fe1b530 100644 --- a/test/suite/test_base02.py +++ b/test/suite/test_base02.py @@ -32,14 +32,14 @@ import json import wiredtiger, wttest -from wtscenario import check_scenarios +from wtscenario import make_scenarios # Test configuration strings. class test_base02(wttest.WiredTigerTestCase): name = 'test_base02a' extra_config = '' - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('file', dict(uri='file:')), ('table', dict(uri='table:')), ('lsm', dict(uri='lsm:')), diff --git a/test/suite/test_base05.py b/test/suite/test_base05.py index f191f23561f..4bee0efcfe2 100644 --- a/test/suite/test_base05.py +++ b/test/suite/test_base05.py @@ -27,7 +27,7 @@ # OTHER DEALINGS IN THE SOFTWARE. import wiredtiger, wttest -from wtscenario import check_scenarios +from wtscenario import make_scenarios # test_base05.py # Cursor operations @@ -40,7 +40,7 @@ class test_base05(wttest.WiredTigerTestCase): table_name1 = 'test_base05a' table_name2 = 'test_base05b' nentries = 1000 - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('no_huffman', dict(extraconfig='')), ('huffman_key', dict(extraconfig='huffman_key="english"')), ('huffman_val', dict(extraconfig='huffman_value="english"')), diff --git a/test/suite/test_bug003.py b/test/suite/test_bug003.py index 739279a0141..28d71a534e2 100644 --- a/test/suite/test_bug003.py +++ b/test/suite/test_bug003.py @@ -30,7 +30,7 @@ # Regression tests. import wiredtiger, wttest -from wtscenario import multiply_scenarios, number_scenarios +from wtscenario import make_scenarios # Regression tests. class test_bug003(wttest.WiredTigerTestCase): @@ -43,7 +43,7 @@ class test_bug003(wttest.WiredTigerTestCase): ('yes', dict(name=1)), ] - scenarios = number_scenarios(multiply_scenarios('.', types, ckpt)) + scenarios = make_scenarios(types, ckpt) # Confirm bulk-load isn't stopped by checkpoints. def test_bug003(self): diff --git a/test/suite/test_bug006.py b/test/suite/test_bug006.py index e522cdf96f7..314ba57038f 100644 --- a/test/suite/test_bug006.py +++ b/test/suite/test_bug006.py @@ -31,13 +31,13 @@ import wiredtiger, wttest from helper import key_populate, value_populate -from wtscenario import check_scenarios +from wtscenario import make_scenarios # Check that verify and salvage both raise exceptions if there is an open # cursor. class test_bug006(wttest.WiredTigerTestCase): name = 'test_bug006' - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('file', dict(uri='file:')), ('table', dict(uri='table:')), ]) diff --git a/test/suite/test_bug008.py b/test/suite/test_bug008.py index 0243887e258..c4fa411f55e 100644 --- a/test/suite/test_bug008.py +++ b/test/suite/test_bug008.py @@ -31,13 +31,13 @@ import wiredtiger, wttest from helper import simple_populate, key_populate, value_populate -from wtscenario import check_scenarios +from wtscenario import make_scenarios # Test search/search-near operations, including invisible values and keys # past the end of the table. class test_bug008(wttest.WiredTigerTestCase): uri = 'file:test_bug008' # This is a btree layer test. - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('fix', dict(fmt='key_format=r,value_format=8t', empty=1, colvar=0)), ('row', dict(fmt='key_format=S', empty=0, colvar=0)), ('var', dict(fmt='key_format=r', empty=0, colvar=1)) diff --git a/test/suite/test_bug009.py b/test/suite/test_bug009.py index 4d10e4391d9..2bdfb7dec52 100644 --- a/test/suite/test_bug009.py +++ b/test/suite/test_bug009.py @@ -33,7 +33,6 @@ import wiredtiger, wttest from wiredtiger import stat -from wtscenario import multiply_scenarios, number_scenarios class test_bug009(wttest.WiredTigerTestCase): name = 'test_bug009' diff --git a/test/suite/test_bulk01.py b/test/suite/test_bulk01.py index 1add11af26b..5bacfafaa20 100644 --- a/test/suite/test_bulk01.py +++ b/test/suite/test_bulk01.py @@ -32,7 +32,7 @@ import wiredtiger, wttest from helper import key_populate, value_populate -from wtscenario import check_scenarios, multiply_scenarios, number_scenarios +from wtscenario import make_scenarios # Smoke test bulk-load. class test_bulk_load(wttest.WiredTigerTestCase): @@ -52,7 +52,7 @@ class test_bulk_load(wttest.WiredTigerTestCase): ('integer', dict(valfmt='i')), ('string', dict(valfmt='S')), ] - scenarios = number_scenarios(multiply_scenarios('.', types, keyfmt, valfmt)) + scenarios = make_scenarios(types, keyfmt, valfmt) # Test a simple bulk-load def test_bulk_load(self): diff --git a/test/suite/test_bulk02.py b/test/suite/test_bulk02.py index fe8118209f2..af0b6d4485d 100644 --- a/test/suite/test_bulk02.py +++ b/test/suite/test_bulk02.py @@ -32,7 +32,7 @@ import shutil, os from helper import confirm_empty, key_populate, value_populate from suite_subprocess import suite_subprocess -from wtscenario import multiply_scenarios, number_scenarios +from wtscenario import make_scenarios import wiredtiger, wttest # test_bulkload_checkpoint @@ -47,7 +47,7 @@ class test_bulkload_checkpoint(wttest.WiredTigerTestCase, suite_subprocess): ('unnamed', dict(ckpt_type='unnamed')), ] - scenarios = number_scenarios(multiply_scenarios('.', types, ckpt_type)) + scenarios = make_scenarios(types, ckpt_type) # Bulk-load handles are skipped by checkpoints. # Named and unnamed checkpoint versions. @@ -90,8 +90,7 @@ class test_bulkload_backup(wttest.WiredTigerTestCase, suite_subprocess): ('different', dict(session_type='different')), ('same', dict(session_type='same')), ] - scenarios = number_scenarios( - multiply_scenarios('.', types, ckpt_type, session_type)) + scenarios = make_scenarios(types, ckpt_type, session_type) # Backup a set of chosen tables/files using the wt backup command. # The only files are bulk-load files, so they shouldn't be copied. diff --git a/test/suite/test_checkpoint01.py b/test/suite/test_checkpoint01.py index 6e1ad7814ed..78754dc82fa 100644 --- a/test/suite/test_checkpoint01.py +++ b/test/suite/test_checkpoint01.py @@ -28,7 +28,7 @@ import wiredtiger, wttest from helper import key_populate, complex_populate_lsm, simple_populate -from wtscenario import check_scenarios +from wtscenario import make_scenarios # test_checkpoint01.py # Checkpoint tests @@ -36,7 +36,7 @@ from wtscenario import check_scenarios # with a set of checkpoints, then confirm the checkpoint's values are correct, # including after other checkpoints are dropped. class test_checkpoint(wttest.WiredTigerTestCase): - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('file', dict(uri='file:checkpoint',fmt='S')), ('table', dict(uri='table:checkpoint',fmt='S')) ]) @@ -139,7 +139,7 @@ class test_checkpoint(wttest.WiredTigerTestCase): # Check some specific cursor checkpoint combinations. class test_checkpoint_cursor(wttest.WiredTigerTestCase): - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('file', dict(uri='file:checkpoint',fmt='S')), ('table', dict(uri='table:checkpoint',fmt='S')) ]) @@ -205,7 +205,7 @@ class test_checkpoint_cursor(wttest.WiredTigerTestCase): # Check that you can checkpoint targets. class test_checkpoint_target(wttest.WiredTigerTestCase): - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('file', dict(uri='file:checkpoint',fmt='S')), ('table', dict(uri='table:checkpoint',fmt='S')) ]) @@ -252,7 +252,7 @@ class test_checkpoint_target(wttest.WiredTigerTestCase): # Check that you can't write checkpoint cursors. class test_checkpoint_cursor_update(wttest.WiredTigerTestCase): - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('file-r', dict(uri='file:checkpoint',fmt='r')), ('file-S', dict(uri='file:checkpoint',fmt='S')), ('table-r', dict(uri='table:checkpoint',fmt='r')), @@ -277,7 +277,7 @@ class test_checkpoint_cursor_update(wttest.WiredTigerTestCase): # Check that WiredTigerCheckpoint works as a checkpoint specifier. class test_checkpoint_last(wttest.WiredTigerTestCase): - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('file', dict(uri='file:checkpoint',fmt='S')), ('table', dict(uri='table:checkpoint',fmt='S')) ]) @@ -343,7 +343,7 @@ class test_checkpoint_lsm_name(wttest.WiredTigerTestCase): class test_checkpoint_empty(wttest.WiredTigerTestCase): - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('file', dict(uri='file:checkpoint')), ('table', dict(uri='table:checkpoint')), ]) diff --git a/test/suite/test_checkpoint02.py b/test/suite/test_checkpoint02.py index 71c8792359c..ac57499a9e4 100644 --- a/test/suite/test_checkpoint02.py +++ b/test/suite/test_checkpoint02.py @@ -30,13 +30,13 @@ import Queue import threading, time, wiredtiger, wttest from helper import key_populate, simple_populate from wtthread import checkpoint_thread, op_thread -from wtscenario import check_scenarios +from wtscenario import make_scenarios # test_checkpoint02.py # Run background checkpoints repeatedly while doing inserts and other # operations in another thread class test_checkpoint02(wttest.WiredTigerTestCase): - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('table-100', dict(uri='table:test',fmt='L',dsize=100,nops=50000,nthreads=10)), ('table-10', dict(uri='table:test',fmt='L',dsize=10,nops=50000,nthreads=30)) ]) diff --git a/test/suite/test_colgap.py b/test/suite/test_colgap.py index 46682c23167..5cc363dbd4a 100644 --- a/test/suite/test_colgap.py +++ b/test/suite/test_colgap.py @@ -28,7 +28,7 @@ import wiredtiger, wttest from helper import simple_populate, key_populate, value_populate -from wtscenario import check_scenarios, multiply_scenarios, number_scenarios +from wtscenario import make_scenarios # test_colgap.py # Test variable-length column-store gap performance. @@ -149,8 +149,8 @@ class test_colmax(wttest.WiredTigerTestCase): ('not-single', dict(single=0)), ] - scenarios = number_scenarios(multiply_scenarios(\ - '.', types, valfmt, record_number, bulk, reopen, single)) + scenarios = make_scenarios(\ + types, valfmt, record_number, bulk, reopen, single) # Test that variable-length column-store correctly/efficiently handles big # records (if it's not efficient, we'll just hang). diff --git a/test/suite/test_collator.py b/test/suite/test_collator.py index 34b5c20247f..a8103fb3671 100644 --- a/test/suite/test_collator.py +++ b/test/suite/test_collator.py @@ -28,7 +28,6 @@ import os import wiredtiger, wttest, run -from wtscenario import check_scenarios, number_scenarios # test_collator.py # Test indices using a custom extractor and collator. diff --git a/test/suite/test_compact01.py b/test/suite/test_compact01.py index 3af550708ed..183d75f9d31 100644 --- a/test/suite/test_compact01.py +++ b/test/suite/test_compact01.py @@ -30,7 +30,7 @@ import wiredtiger, wttest from helper import complex_populate, simple_populate, key_populate from suite_subprocess import suite_subprocess from wiredtiger import stat -from wtscenario import multiply_scenarios, number_scenarios +from wtscenario import make_scenarios # test_compact.py # session level compact operation @@ -53,7 +53,7 @@ class test_compact(wttest.WiredTigerTestCase, suite_subprocess): ('method_reopen', dict(utility=0,reopen=1)), ('utility', dict(utility=1,reopen=0)), ] - scenarios = number_scenarios(multiply_scenarios('.', types, compact)) + scenarios = make_scenarios(types, compact) # We want a large cache so that eviction doesn't happen # (which could skew our compaction results). conn_config = 'cache_size=250MB,statistics=(all)' diff --git a/test/suite/test_compact02.py b/test/suite/test_compact02.py index 7ad05cd2536..1ca0392ba41 100644 --- a/test/suite/test_compact02.py +++ b/test/suite/test_compact02.py @@ -32,7 +32,7 @@ import wiredtiger, wttest from wiredtiger import stat -from wtscenario import multiply_scenarios, number_scenarios +from wtscenario import make_scenarios # Test basic compression class test_compact02(wttest.WiredTigerTestCase): @@ -57,8 +57,7 @@ class test_compact02(wttest.WiredTigerTestCase): ('64KB', dict(fileConfig='leaf_page_max=64KB')), ('128KB', dict(fileConfig='leaf_page_max=128KB')), ] - scenarios = \ - number_scenarios(multiply_scenarios('.', types, cacheSize, fileConfig)) + scenarios = make_scenarios(types, cacheSize, fileConfig) # We want about 22K records that total about 130Mb. That is an average # of 6196 bytes per record. Half the records should be smaller, about diff --git a/test/suite/test_compress01.py b/test/suite/test_compress01.py index 94c748fc3e5..2a7e2a7e1a8 100644 --- a/test/suite/test_compress01.py +++ b/test/suite/test_compress01.py @@ -32,7 +32,7 @@ import os, run import wiredtiger, wttest -from wtscenario import multiply_scenarios, number_scenarios +from wtscenario import make_scenarios # Test basic compression class test_compress01(wttest.WiredTigerTestCase): @@ -46,7 +46,7 @@ class test_compress01(wttest.WiredTigerTestCase): ('snappy', dict(compress='snappy')), ('none', dict(compress=None)), ] - scenarios = number_scenarios(multiply_scenarios('.', types, compress)) + scenarios = make_scenarios(types, compress) nrecords = 10000 bigvalue = "abcdefghij" * 1000 diff --git a/test/suite/test_config03.py b/test/suite/test_config03.py index e91c5de62f8..88ca6ae3f39 100644 --- a/test/suite/test_config03.py +++ b/test/suite/test_config03.py @@ -69,14 +69,11 @@ class test_config03(test_base03.test_base03): 'eviction_trigger', 'hazard_max', 'multiprocess', 'session_max', 'verbose' ] - all_scenarios = wtscenario.multiply_scenarios('_', + scenarios = wtscenario.make_scenarios( cache_size_scenarios, create_scenarios, error_prefix_scenarios, eviction_target_scenarios, eviction_trigger_scenarios, hazard_max_scenarios, multiprocess_scenarios, session_max_scenarios, - transactional_scenarios, verbose_scenarios) - - scenarios = wtscenario.prune_scenarios(all_scenarios, 1000) - scenarios = wtscenario.number_scenarios(scenarios) + transactional_scenarios, verbose_scenarios, prune=1000) #wttest.WiredTigerTestCase.printVerbose(2, 'test_config03: running ' + \ # str(len(scenarios)) + ' of ' + \ diff --git a/test/suite/test_cursor01.py b/test/suite/test_cursor01.py index cf39d4a4ba4..8c66042eec0 100644 --- a/test/suite/test_cursor01.py +++ b/test/suite/test_cursor01.py @@ -27,7 +27,7 @@ # OTHER DEALINGS IN THE SOFTWARE. import wiredtiger, wttest -from wtscenario import check_scenarios +from wtscenario import make_scenarios # test_cursor01.py # Cursor operations @@ -41,7 +41,7 @@ class test_cursor01(wttest.WiredTigerTestCase): table_name1 = 'test_cursor01' nentries = 10 - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('file-col', dict(tablekind='col',uri='file')), ('file-fix', dict(tablekind='fix',uri='file')), ('file-row', dict(tablekind='row',uri='file')), diff --git a/test/suite/test_cursor02.py b/test/suite/test_cursor02.py index eb1ba4dfc41..a83d30def47 100644 --- a/test/suite/test_cursor02.py +++ b/test/suite/test_cursor02.py @@ -28,7 +28,7 @@ import wiredtiger from test_cursor_tracker import TestCursorTracker -from wtscenario import check_scenarios +from wtscenario import make_scenarios # test_cursor02.py # Cursor operations on small tables. @@ -39,7 +39,7 @@ class test_cursor02(TestCursorTracker): key/value content and to track/verify content after inserts and removes. """ - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('row', dict(tablekind='row', uri='table')), ('lsm-row', dict(tablekind='row', uri='lsm')), ('col', dict(tablekind='col', uri='table')), diff --git a/test/suite/test_cursor03.py b/test/suite/test_cursor03.py index 63237f942ca..b4598483c12 100644 --- a/test/suite/test_cursor03.py +++ b/test/suite/test_cursor03.py @@ -28,7 +28,7 @@ import wiredtiger from test_cursor_tracker import TestCursorTracker -from wtscenario import multiply_scenarios +from wtscenario import make_scenarios # test_cursor03.py # Cursor operations on tables of various sizes, with key/values of various @@ -40,7 +40,7 @@ class test_cursor03(TestCursorTracker): key/value content and to track/verify content after inserts and removes. """ - scenarios = multiply_scenarios('.', [ + scenarios = make_scenarios([ ('row', dict(tablekind='row', keysize=None, valsize=None, uri='table')), ('lsm-row', dict(tablekind='row', keysize=None, valsize=None, uri='lsm')), ('col', dict(tablekind='col', keysize=None, valsize=None, uri='table')), diff --git a/test/suite/test_cursor04.py b/test/suite/test_cursor04.py index 6576c623f8a..8cbf922b5eb 100644 --- a/test/suite/test_cursor04.py +++ b/test/suite/test_cursor04.py @@ -27,7 +27,7 @@ # OTHER DEALINGS IN THE SOFTWARE. import wiredtiger, wttest -from wtscenario import check_scenarios +from wtscenario import make_scenarios # test_base04.py # Cursor operations @@ -38,7 +38,7 @@ class test_cursor04(wttest.WiredTigerTestCase): table_name1 = 'test_cursor04' nentries = 20 - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('row', dict(tablekind='row', uri='table')), ('lsm-row', dict(tablekind='row', uri='lsm')), ('col', dict(tablekind='col', uri='table')), diff --git a/test/suite/test_cursor06.py b/test/suite/test_cursor06.py index 5545c862dd7..3a6240bc6c7 100644 --- a/test/suite/test_cursor06.py +++ b/test/suite/test_cursor06.py @@ -29,13 +29,13 @@ import wiredtiger, wttest from helper import key_populate, value_populate, simple_populate from helper import complex_value_populate, complex_populate -from wtscenario import check_scenarios +from wtscenario import make_scenarios # test_cursor06.py # Test cursor reconfiguration. class test_cursor06(wttest.WiredTigerTestCase): name = 'reconfigure' - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('file-r', dict(type='file:', config='key_format=r', complex=0)), ('file-S', dict(type='file:', config='key_format=S', complex=0)), ('lsm-S', dict(type='lsm:', config='key_format=S', complex=0)), diff --git a/test/suite/test_cursor07.py b/test/suite/test_cursor07.py index d8de0874d7f..d6078183fc1 100644 --- a/test/suite/test_cursor07.py +++ b/test/suite/test_cursor07.py @@ -33,7 +33,7 @@ import fnmatch, os, shutil, run, time from suite_subprocess import suite_subprocess from wiredtiger import stat -from wtscenario import check_scenarios +from wtscenario import make_scenarios import wttest class test_cursor07(wttest.WiredTigerTestCase, suite_subprocess): @@ -44,7 +44,7 @@ class test_cursor07(wttest.WiredTigerTestCase, suite_subprocess): # test that scenario for log cursors. nkeys = 7000 - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('regular', dict(reopen=False)), ('reopen', dict(reopen=True)) ]) diff --git a/test/suite/test_cursor08.py b/test/suite/test_cursor08.py index 1a379518224..3f8f50defa7 100644 --- a/test/suite/test_cursor08.py +++ b/test/suite/test_cursor08.py @@ -33,7 +33,7 @@ import fnmatch, os, shutil, run, time from suite_subprocess import suite_subprocess from wiredtiger import stat, WiredTigerError -from wtscenario import multiply_scenarios, number_scenarios, check_scenarios +from wtscenario import make_scenarios import wttest class test_cursor08(wttest.WiredTigerTestCase, suite_subprocess): @@ -42,17 +42,17 @@ class test_cursor08(wttest.WiredTigerTestCase, suite_subprocess): uri = 'table:' + tablename nkeys = 500 - reopens = check_scenarios([ + reopens = [ ('regular', dict(reopen=False)), ('reopen', dict(reopen=True)) - ]) - compress = check_scenarios([ + ] + compress = [ ('nop', dict(compress='nop')), ('snappy', dict(compress='snappy')), ('zlib', dict(compress='zlib')), ('none', dict(compress='none')), - ]) - scenarios = number_scenarios(multiply_scenarios('.', reopens, compress)) + ] + scenarios = make_scenarios(reopens, compress) # Load the compression extension, and enable it for logging. def conn_config(self, dir): return 'log=(archive=false,enabled,file_max=%s,' % self.logmax + \ diff --git a/test/suite/test_cursor09.py b/test/suite/test_cursor09.py index b77336bc1d7..a05caea4f1f 100644 --- a/test/suite/test_cursor09.py +++ b/test/suite/test_cursor09.py @@ -29,12 +29,12 @@ import wiredtiger, wttest from helper import key_populate, value_populate, simple_populate from helper import complex_populate, complex_value_populate -from wtscenario import check_scenarios +from wtscenario import make_scenarios # test_cursor09.py # JIRA WT-2217: insert resets key/value "set". class test_cursor09(wttest.WiredTigerTestCase): - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('file-r', dict(type='file:', config='key_format=r', complex=0)), ('file-S', dict(type='file:', config='key_format=S', complex=0)), ('lsm-S', dict(type='lsm:', config='key_format=S', complex=0)), diff --git a/test/suite/test_cursor_compare.py b/test/suite/test_cursor_compare.py index 130f4e8ca96..179e20682d2 100644 --- a/test/suite/test_cursor_compare.py +++ b/test/suite/test_cursor_compare.py @@ -29,7 +29,7 @@ import wiredtiger, wttest, exceptions from helper import complex_populate, simple_populate, key_populate from helper import complex_populate_index_name -from wtscenario import multiply_scenarios, number_scenarios +from wtscenario import make_scenarios # Test cursor comparisons. class test_cursor_comparison(wttest.WiredTigerTestCase): @@ -45,7 +45,7 @@ class test_cursor_comparison(wttest.WiredTigerTestCase): ('recno', dict(keyfmt='r')), ('string', dict(keyfmt='S')) ] - scenarios = number_scenarios(multiply_scenarios('.', types, keyfmt)) + scenarios = make_scenarios(types, keyfmt) def test_cursor_comparison(self): uri = self.type + 'compare' diff --git a/test/suite/test_cursor_pin.py b/test/suite/test_cursor_pin.py index 329759d8fc8..1aea49c32b0 100644 --- a/test/suite/test_cursor_pin.py +++ b/test/suite/test_cursor_pin.py @@ -28,7 +28,7 @@ import wiredtiger, wttest from helper import simple_populate, key_populate, value_populate -from wtscenario import check_scenarios +from wtscenario import make_scenarios # test_cursor_pin.py # Smoke-test fast-path searching for pinned pages before re-descending @@ -37,7 +37,7 @@ class test_cursor_pin(wttest.WiredTigerTestCase): uri = 'file:cursor_pin' nentries = 10000 config = 'allocation_size=512,leaf_page_max=512,value_format=S,key_format=' - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('recno', dict(keyfmt='r')), ('string', dict(keyfmt='S')), ]) diff --git a/test/suite/test_cursor_random.py b/test/suite/test_cursor_random.py index 16ce5cae685..8d7c230043b 100644 --- a/test/suite/test_cursor_random.py +++ b/test/suite/test_cursor_random.py @@ -29,7 +29,7 @@ import wiredtiger, wttest from helper import complex_populate, simple_populate from helper import key_populate, value_populate -from wtscenario import check_scenarios, multiply_scenarios, number_scenarios +from wtscenario import make_scenarios # test_cursor_random.py # Cursor next_random operations @@ -42,7 +42,7 @@ class test_cursor_random(wttest.WiredTigerTestCase): ('sample', dict(config='next_random=true,next_random_sample_size=35')), ('not-sample', dict(config='next_random=true')) ] - scenarios =number_scenarios(multiply_scenarios('.', types, config)) + scenarios = make_scenarios(types, config) # Check that opening a random cursor on a row-store returns not-supported # for methods other than next, reconfigure and reset, and next returns @@ -136,7 +136,7 @@ class test_cursor_random(wttest.WiredTigerTestCase): # Check that opening a random cursor on column-store returns not-supported. class test_cursor_random_column(wttest.WiredTigerTestCase): - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('file', dict(uri='file:random')), ('table', dict(uri='table:random')) ]) @@ -159,7 +159,7 @@ class test_cursor_random_invisible(wttest.WiredTigerTestCase): ('sample', dict(config='next_random=true,next_random_sample_size=35')), ('not-sample', dict(config='next_random=true')) ] - scenarios =number_scenarios(multiply_scenarios('.', types, config)) + scenarios = make_scenarios(types, config) def test_cursor_random_invisible_all(self): uri = self.type diff --git a/test/suite/test_cursor_random02.py b/test/suite/test_cursor_random02.py index 84ac0279fc4..93aa97f2282 100644 --- a/test/suite/test_cursor_random02.py +++ b/test/suite/test_cursor_random02.py @@ -29,7 +29,7 @@ import wiredtiger, wttest from helper import complex_populate, simple_populate from helper import key_populate, value_populate -from wtscenario import check_scenarios, multiply_scenarios, number_scenarios +from wtscenario import make_scenarios # test_cursor_random02.py # Cursor next_random operations @@ -46,7 +46,7 @@ class test_cursor_random02(wttest.WiredTigerTestCase): ('10000', dict(records=10000)), ('50000', dict(records=50000)), ] - scenarios = number_scenarios(multiply_scenarios('.', config, records)) + scenarios = make_scenarios(config, records) # Check that next_random works in the presence of a larger set of values, # where the values are in an insert list. diff --git a/test/suite/test_drop.py b/test/suite/test_drop.py index 52ea7251ab5..a3e80214295 100644 --- a/test/suite/test_drop.py +++ b/test/suite/test_drop.py @@ -30,7 +30,7 @@ import os, time import wiredtiger, wttest from helper import confirm_does_not_exist, complex_populate, \ complex_populate_index_name, simple_populate -from wtscenario import check_scenarios +from wtscenario import make_scenarios # test_drop.py # session level drop operation @@ -38,7 +38,7 @@ class test_drop(wttest.WiredTigerTestCase): name = 'test_drop' extra_config = '' - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('file', dict(uri='file:')), ('table', dict(uri='table:')), ('table-lsm', dict(uri='table:', extra_config=',type=lsm')), diff --git a/test/suite/test_dump.py b/test/suite/test_dump.py index cac95589137..280d5870359 100644 --- a/test/suite/test_dump.py +++ b/test/suite/test_dump.py @@ -33,7 +33,7 @@ from helper import \ simple_populate, simple_populate_check, \ simple_index_populate, simple_index_populate_check from suite_subprocess import suite_subprocess -from wtscenario import multiply_scenarios, number_scenarios +from wtscenario import make_scenarios # test_dump.py # Utilities: wt dump @@ -78,8 +78,7 @@ class test_dump(wttest.WiredTigerTestCase, suite_subprocess): populate=complex_populate, populate_check=complex_populate_check)) ] - scenarios = number_scenarios( - multiply_scenarios('.', types, keyfmt, dumpfmt)) + scenarios = make_scenarios(types, keyfmt, dumpfmt) # Extract the values lines from the dump output. def value_lines(self, fname): diff --git a/test/suite/test_dupc.py b/test/suite/test_dupc.py index ec55a36df4c..12b18f1ba79 100644 --- a/test/suite/test_dupc.py +++ b/test/suite/test_dupc.py @@ -33,7 +33,7 @@ import os, time import wiredtiger, wttest from helper import complex_populate, key_populate, simple_populate -from wtscenario import check_scenarios +from wtscenario import make_scenarios # Test session.open_cursor with cursor duplication. class test_duplicate_cursor(wttest.WiredTigerTestCase): @@ -42,7 +42,7 @@ class test_duplicate_cursor(wttest.WiredTigerTestCase): config = 'key_format=' - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('file-r', dict(uri='file:', fmt='r')), ('file-S', dict(uri='file:', fmt='S')), ('table-r', dict(uri='table:', fmt='r')), diff --git a/test/suite/test_durability01.py b/test/suite/test_durability01.py index f578a79baf1..32cdd795914 100644 --- a/test/suite/test_durability01.py +++ b/test/suite/test_durability01.py @@ -34,7 +34,6 @@ import fnmatch, os, shutil, time from helper import copy_wiredtiger_home from suite_subprocess import suite_subprocess -from wtscenario import multiply_scenarios, number_scenarios, prune_scenarios import wttest class test_durability01(wttest.WiredTigerTestCase, suite_subprocess): diff --git a/test/suite/test_empty.py b/test/suite/test_empty.py index 50b79db70e4..9fe88107412 100644 --- a/test/suite/test_empty.py +++ b/test/suite/test_empty.py @@ -29,14 +29,14 @@ import os import wiredtiger, wttest from helper import key_populate -from wtscenario import check_scenarios +from wtscenario import make_scenarios # test_empty.py # Test that empty objects don't write anything other than a single sector. class test_empty(wttest.WiredTigerTestCase): name = 'test_empty' - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('file-r', dict(type='file:', fmt='r')), ('file-S', dict(type='file:', fmt='S')), ('table-r', dict(type='table:', fmt='r')), diff --git a/test/suite/test_encrypt01.py b/test/suite/test_encrypt01.py index 0f2782204d2..d48605aaa83 100644 --- a/test/suite/test_encrypt01.py +++ b/test/suite/test_encrypt01.py @@ -32,7 +32,7 @@ import os, run, random import wiredtiger, wttest -from wtscenario import multiply_scenarios, number_scenarios +from wtscenario import make_scenarios # Test basic encryption class test_encrypt01(wttest.WiredTigerTestCase): @@ -60,8 +60,7 @@ class test_encrypt01(wttest.WiredTigerTestCase): ('none-snappy', dict(log_compress=None, block_compress='snappy')), ('snappy-lz4', dict(log_compress='snappy', block_compress='lz4')), ] - scenarios = number_scenarios(multiply_scenarios('.', types, - encrypt, compress)) + scenarios = make_scenarios(types, encrypt, compress) nrecords = 5000 bigvalue = "abcdefghij" * 1001 # len(bigvalue) = 10010 diff --git a/test/suite/test_encrypt02.py b/test/suite/test_encrypt02.py index 0376b3e42e4..648686274c4 100644 --- a/test/suite/test_encrypt02.py +++ b/test/suite/test_encrypt02.py @@ -33,7 +33,7 @@ import os, run, random import wiredtiger, wttest from suite_subprocess import suite_subprocess -from wtscenario import multiply_scenarios, number_scenarios +from wtscenario import make_scenarios # Test basic encryption class test_encrypt02(wttest.WiredTigerTestCase, suite_subprocess): @@ -48,7 +48,7 @@ class test_encrypt02(wttest.WiredTigerTestCase, suite_subprocess): ('keyid-pass', dict( encrypt='rotn', encrypt_args='name=rotn,keyid=11', secret_arg='ABC')), ] - scenarios = number_scenarios(encrypt_type) + scenarios = make_scenarios(encrypt_type) nrecords = 5000 bigvalue = "abcdefghij" * 1001 # len(bigvalue) = 10010 diff --git a/test/suite/test_encrypt03.py b/test/suite/test_encrypt03.py index 702d0a2369f..0dc1755d6eb 100644 --- a/test/suite/test_encrypt03.py +++ b/test/suite/test_encrypt03.py @@ -32,7 +32,7 @@ import os, run, random import wiredtiger, wttest -from wtscenario import multiply_scenarios, number_scenarios +from wtscenario import make_scenarios # Test basic encryption class test_encrypt03(wttest.WiredTigerTestCase): @@ -48,7 +48,7 @@ class test_encrypt03(wttest.WiredTigerTestCase): #('noname', dict( sys_encrypt='rotn', sys_encrypt_args=',keyid=11', # file_encrypt='none', file_encrypt_args=',keyid=13')), ] - scenarios = number_scenarios(multiply_scenarios('.', types, encrypt)) + scenarios = make_scenarios(types, encrypt) # Override WiredTigerTestCase, we have extensions. def setUpConnectionOpen(self, dir): diff --git a/test/suite/test_encrypt04.py b/test/suite/test_encrypt04.py index d7c12d2cba8..97d2cee03a0 100644 --- a/test/suite/test_encrypt04.py +++ b/test/suite/test_encrypt04.py @@ -32,7 +32,7 @@ import os, run, random import wiredtiger, wttest -from wtscenario import multiply_scenarios, number_scenarios +from wtscenario import make_scenarios from suite_subprocess import suite_subprocess # Test basic encryption with mismatched configuration @@ -69,8 +69,7 @@ class test_encrypt04(wttest.WiredTigerTestCase, suite_subprocess): ('rotn11xyz_and_clear', dict( name2='rotn', keyid2='11', secretkey2='XYZ', fileinclear2=True)) ] - scenarios = number_scenarios(multiply_scenarios \ - ('.', encrypt_scen_1, encrypt_scen_2)) + scenarios = make_scenarios(encrypt_scen_1, encrypt_scen_2) nrecords = 5000 bigvalue = "abcdefghij" * 1001 # len(bigvalue) = 10010 diff --git a/test/suite/test_encrypt05.py b/test/suite/test_encrypt05.py index afd8a8103f9..19a3522b3d5 100644 --- a/test/suite/test_encrypt05.py +++ b/test/suite/test_encrypt05.py @@ -32,7 +32,7 @@ import os, run, random import wiredtiger, wttest -from wtscenario import multiply_scenarios, number_scenarios +from wtscenario import make_scenarios # Test raw compression with encryption class test_encrypt05(wttest.WiredTigerTestCase): @@ -44,8 +44,7 @@ class test_encrypt05(wttest.WiredTigerTestCase): compress = [ ('zlib', dict(log_compress='zlib', block_compress='zlib')), ] - scenarios = number_scenarios(multiply_scenarios('.', - encrypt, compress)) + scenarios = make_scenarios(encrypt, compress) nrecords = 500 bigvalue = 'a' * 500 # we use values that will definitely give compression diff --git a/test/suite/test_encrypt06.py b/test/suite/test_encrypt06.py index 5c88b698aeb..9300583d099 100644 --- a/test/suite/test_encrypt06.py +++ b/test/suite/test_encrypt06.py @@ -32,7 +32,7 @@ import os, run, random import wiredtiger, wttest -from wtscenario import multiply_scenarios, number_scenarios +from wtscenario import make_scenarios # Test encryption, when on, does not leak any information class test_encrypt06(wttest.WiredTigerTestCase): @@ -86,7 +86,7 @@ class test_encrypt06(wttest.WiredTigerTestCase): file0_encrypt='rotn', file0_encrypt_args=key13, encrypt0=True, file1_encrypt='none', file1_encrypt_args='', encrypt1=False)), ] - scenarios = number_scenarios(multiply_scenarios('.', encrypt, storagetype)) + scenarios = make_scenarios(encrypt, storagetype) nrecords = 1000 # Override WiredTigerTestCase, we have extensions. diff --git a/test/suite/test_encrypt07.py b/test/suite/test_encrypt07.py index 30f28e096a8..97ab1987d4f 100644 --- a/test/suite/test_encrypt07.py +++ b/test/suite/test_encrypt07.py @@ -32,7 +32,6 @@ import os, run, string, codecs import wiredtiger, wttest -from wtscenario import multiply_scenarios, number_scenarios import test_salvage # Run the regular salvage test, but with encryption on diff --git a/test/suite/test_excl.py b/test/suite/test_excl.py index 90926f51877..cea5756dfbb 100644 --- a/test/suite/test_excl.py +++ b/test/suite/test_excl.py @@ -27,11 +27,11 @@ # OTHER DEALINGS IN THE SOFTWARE. import wiredtiger, wttest -from wtscenario import check_scenarios +from wtscenario import make_scenarios # Test session.create with the exclusive configuration. class test_create_excl(wttest.WiredTigerTestCase): - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('file', dict(type='file:')), ('table', dict(type='table:')) ]) diff --git a/test/suite/test_huffman01.py b/test/suite/test_huffman01.py index d71198e3151..be307550f2e 100644 --- a/test/suite/test_huffman01.py +++ b/test/suite/test_huffman01.py @@ -28,7 +28,7 @@ import os from suite_subprocess import suite_subprocess -from wtscenario import multiply_scenarios, number_scenarios +from wtscenario import make_scenarios import wiredtiger, wttest # test_huffman01.py @@ -52,7 +52,7 @@ class test_huffman01(wttest.WiredTigerTestCase, suite_subprocess): ('utf8', dict(huffval=',huffman_value=utf8t8file',vfile='t8file')), ('utf16', dict(huffval=',huffman_value=utf16t16file',vfile='t16file')), ] - scenarios = number_scenarios(multiply_scenarios('.', huffkey, huffval)) + scenarios = make_scenarios(huffkey, huffval) def test_huffman(self): dir = self.conn.get_home() diff --git a/test/suite/test_huffman02.py b/test/suite/test_huffman02.py index aa4329415a4..d74704daf58 100644 --- a/test/suite/test_huffman02.py +++ b/test/suite/test_huffman02.py @@ -28,7 +28,7 @@ import os from suite_subprocess import suite_subprocess -from wtscenario import multiply_scenarios, number_scenarios +from wtscenario import make_scenarios import wiredtiger, wttest # test_huffman02.py @@ -48,7 +48,7 @@ class test_huffman02(wttest.WiredTigerTestCase, suite_subprocess): ('file', dict(uri='file:huff')), ('table', dict(uri='table:huff')), ] - scenarios = number_scenarios(multiply_scenarios('.',type,huffkey, huffval)) + scenarios = make_scenarios(type, huffkey, huffval) def test_huffman(self): if self.keybad or self.valbad: diff --git a/test/suite/test_inmem01.py b/test/suite/test_inmem01.py index fd2b04bf7e3..c6ae7ff6c4b 100644 --- a/test/suite/test_inmem01.py +++ b/test/suite/test_inmem01.py @@ -30,7 +30,7 @@ import wiredtiger, wttest from time import sleep from helper import simple_populate, simple_populate_check from helper import key_populate, value_populate -from wtscenario import check_scenarios +from wtscenario import make_scenarios # test_inmem01.py # Test in-memory configuration. @@ -40,7 +40,7 @@ class test_inmem01(wttest.WiredTigerTestCase): 'cache_size=5MB,file_manager=(close_idle_time=0),in_memory=true' table_config = ',memory_page_max=32k,leaf_page_max=4k' - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('col', dict(fmt='key_format=r,value_format=S')), ('fix', dict(fmt='key_format=r,value_format=8t')), ('row', dict(fmt='key_format=S,value_format=S')) diff --git a/test/suite/test_intpack.py b/test/suite/test_intpack.py index 7c499ded407..b0cece09494 100644 --- a/test/suite/test_intpack.py +++ b/test/suite/test_intpack.py @@ -31,7 +31,7 @@ # import wiredtiger, wttest -from wtscenario import check_scenarios, number_scenarios +from wtscenario import make_scenarios class PackTester: def __init__(self, formatcode, validlow, validhigh, equals): @@ -129,7 +129,7 @@ class test_intpack(wttest.WiredTigerTestCase): # We have to be a bit verbose here with naming, as there can be problems with # case insensitive test names:w - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('int8_t_b', dict(formatcode='b', low=-128, high=127, nbits=8)), ('uint8_t_B', dict(formatcode='B', low=0, high=255, nbits=8)), ('fix_len_8t', dict(formatcode='8t', low=0, high=255, nbits=8)), @@ -147,7 +147,6 @@ class test_intpack(wttest.WiredTigerTestCase): ('uint64_t_Q', dict(formatcode='Q', low=0, high=18446744073709551615, nbits=64)), ]) - scenarios = check_scenarios(number_scenarios(scenarios)) def test_packing(self): pt = PackTester(self.formatcode, self.low, self.high, self.assertEquals) diff --git a/test/suite/test_join01.py b/test/suite/test_join01.py index f8d96a2718a..f3b13026896 100644 --- a/test/suite/test_join01.py +++ b/test/suite/test_join01.py @@ -27,7 +27,7 @@ # OTHER DEALINGS IN THE SOFTWARE. import wiredtiger, wttest -from wtscenario import check_scenarios, multiply_scenarios, number_scenarios +from wtscenario import make_scenarios # test_join01.py # Join operations @@ -67,11 +67,9 @@ class test_join01(wttest.WiredTigerTestCase): ('order=2', dict(join_order=2)), ('order=3', dict(join_order=3)), ] - scenarios = number_scenarios(multiply_scenarios('.', type_scen, - bloom0_scen, bloom1_scen, - projection_scen, - nested_scen, stats_scen, - order_scen)) + scenarios = make_scenarios(type_scen, bloom0_scen, bloom1_scen, + projection_scen, nested_scen, stats_scen, + order_scen) # We need statistics for these tests. conn_config = 'statistics=(all)' diff --git a/test/suite/test_join02.py b/test/suite/test_join02.py index a691c499cf6..db11ed01039 100644 --- a/test/suite/test_join02.py +++ b/test/suite/test_join02.py @@ -27,7 +27,7 @@ # OTHER DEALINGS IN THE SOFTWARE. import wiredtiger, wttest, suite_random -from wtscenario import check_scenarios, multiply_scenarios, number_scenarios +from wtscenario import make_scenarios # test_join02.py # Join operations @@ -48,7 +48,7 @@ class test_join02(wttest.WiredTigerTestCase): ('nobloom', dict(usebloom=False)) ] - scenarios = number_scenarios(multiply_scenarios('.', keyscen, bloomscen)) + scenarios = make_scenarios(keyscen, bloomscen) # Start our range from 1, since WT record numbers start at 1, # it makes things work out nicer. diff --git a/test/suite/test_join03.py b/test/suite/test_join03.py index 613d2396b07..af19d934d70 100644 --- a/test/suite/test_join03.py +++ b/test/suite/test_join03.py @@ -28,7 +28,6 @@ import os import wiredtiger, wttest, run -from wtscenario import check_scenarios, multiply_scenarios, number_scenarios # test_join03.py # Join operations diff --git a/test/suite/test_join04.py b/test/suite/test_join04.py index 7e2afb15285..b270cb7a21c 100644 --- a/test/suite/test_join04.py +++ b/test/suite/test_join04.py @@ -28,7 +28,6 @@ import os import wiredtiger, wttest, run -from wtscenario import check_scenarios, multiply_scenarios, number_scenarios # test_join04.py # Join operations diff --git a/test/suite/test_join05.py b/test/suite/test_join05.py index ef2be4c6460..7dcb3e08911 100644 --- a/test/suite/test_join05.py +++ b/test/suite/test_join05.py @@ -27,7 +27,6 @@ # OTHER DEALINGS IN THE SOFTWARE. import wiredtiger, wttest -from wtscenario import check_scenarios, multiply_scenarios, number_scenarios # test_join05.py # Tests based on JIRA reports diff --git a/test/suite/test_join06.py b/test/suite/test_join06.py index 9af6f93792f..5fedd365712 100644 --- a/test/suite/test_join06.py +++ b/test/suite/test_join06.py @@ -28,7 +28,7 @@ import os import wiredtiger, wttest, run -from wtscenario import check_scenarios, multiply_scenarios, number_scenarios +from wtscenario import make_scenarios # test_join06.py # Join operations @@ -46,7 +46,7 @@ class test_join06(wttest.WiredTigerTestCase): ('nobloom', dict(bloom=False)) ] - scenarios = number_scenarios(multiply_scenarios('.', isoscen, bloomscen)) + scenarios = make_scenarios(isoscen, bloomscen) def gen_values(self, i): s = str(i) # 345 => "345" diff --git a/test/suite/test_join07.py b/test/suite/test_join07.py index 36e91361329..2a32e678d72 100644 --- a/test/suite/test_join07.py +++ b/test/suite/test_join07.py @@ -28,7 +28,7 @@ import os, re, run import wiredtiger, wttest, suite_random -from wtscenario import check_scenarios, multiply_scenarios, number_scenarios +from wtscenario import make_scenarios class ParseException(Exception): def __init__(self, msg): @@ -198,7 +198,7 @@ class test_join07(wttest.WiredTigerTestCase): ('noextractor', dict(extractor=False)) ] - scenarios = number_scenarios(extractscen) + scenarios = make_scenarios(extractscen) # Return the wiredtiger_open extension argument for a shared library. def extensionArg(self, exts): diff --git a/test/suite/test_join08.py b/test/suite/test_join08.py index 6d674ab8193..d389fad706b 100644 --- a/test/suite/test_join08.py +++ b/test/suite/test_join08.py @@ -27,7 +27,6 @@ # OTHER DEALINGS IN THE SOFTWARE. import wiredtiger, wttest -from wtscenario import check_scenarios, multiply_scenarios, number_scenarios # test_join08.py # Test join error paths diff --git a/test/suite/test_jsondump01.py b/test/suite/test_jsondump01.py index a6d134e3a9d..dc8027c2115 100644 --- a/test/suite/test_jsondump01.py +++ b/test/suite/test_jsondump01.py @@ -34,7 +34,7 @@ from helper import \ simple_index_populate, simple_index_populate_check, \ simple_index_populate_check_cursor, compare_files from suite_subprocess import suite_subprocess -from wtscenario import multiply_scenarios, number_scenarios +from wtscenario import make_scenarios # A 'fake' cursor based on a set of rows. # It emulates a WT cursor well enough for the *_check_cursor methods. @@ -108,8 +108,7 @@ class test_jsondump01(wttest.WiredTigerTestCase, suite_subprocess): populate_check=complex_populate_check, populate_check_cursor=complex_populate_check_cursor)) ] - scenarios = number_scenarios( - multiply_scenarios('.', types, keyfmt)) + scenarios = make_scenarios(types, keyfmt) # Dump using util, re-load using python's JSON, and do a content comparison. def test_jsondump_util(self): diff --git a/test/suite/test_lsm01.py b/test/suite/test_lsm01.py index 1f89cf38d77..f6cee20e896 100644 --- a/test/suite/test_lsm01.py +++ b/test/suite/test_lsm01.py @@ -54,12 +54,10 @@ class test_lsm01(wttest.WiredTigerTestCase): config_vars = [ 'chunk_size', 'merge_max', 'bloom', 'bloom_bit_count', 'bloom_hash_count' ] - all_scenarios = wtscenario.multiply_scenarios('_', + scenarios = wtscenario.make_scenarios( chunk_size_scenarios, merge_max_scenarios, bloom_scenarios, - bloom_bit_scenarios, bloom_hash_scenarios, record_count_scenarios) - - scenarios = wtscenario.prune_scenarios(all_scenarios, 500) - scenarios = wtscenario.number_scenarios(scenarios) + bloom_bit_scenarios, bloom_hash_scenarios, record_count_scenarios, + prune=500) # Test drop of an object. def test_lsm(self): diff --git a/test/suite/test_metadata_cursor01.py b/test/suite/test_metadata_cursor01.py index e759c14f846..7802f89f174 100644 --- a/test/suite/test_metadata_cursor01.py +++ b/test/suite/test_metadata_cursor01.py @@ -27,7 +27,7 @@ # OTHER DEALINGS IN THE SOFTWARE. import wiredtiger, wttest -from wtscenario import check_scenarios +from wtscenario import make_scenarios # test_metadata_cursor01.py # Metadata cursor operations @@ -39,7 +39,7 @@ class test_metadata_cursor01(wttest.WiredTigerTestCase): """ table_name1 = 'test_metadata_cursor01' - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('plain', {'metauri' : 'metadata:'}), ('create', {'metauri' : 'metadata:create'}), ]) diff --git a/test/suite/test_nsnap01.py b/test/suite/test_nsnap01.py index 5207b577ba4..7e8951750f8 100644 --- a/test/suite/test_nsnap01.py +++ b/test/suite/test_nsnap01.py @@ -30,7 +30,6 @@ # Named snapshots: basic API from suite_subprocess import suite_subprocess -from wtscenario import multiply_scenarios, number_scenarios from helper import simple_populate import wiredtiger, wttest diff --git a/test/suite/test_nsnap02.py b/test/suite/test_nsnap02.py index e4ed65ef72a..510c9d421ef 100644 --- a/test/suite/test_nsnap02.py +++ b/test/suite/test_nsnap02.py @@ -30,7 +30,6 @@ # Named snapshots: Combinations of dropping snapshots from suite_subprocess import suite_subprocess -from wtscenario import multiply_scenarios, number_scenarios from helper import simple_populate import wiredtiger, wttest diff --git a/test/suite/test_nsnap03.py b/test/suite/test_nsnap03.py index 0e853522940..3986c0c1a0a 100644 --- a/test/suite/test_nsnap03.py +++ b/test/suite/test_nsnap03.py @@ -30,7 +30,6 @@ # Named snapshots: Access and create from multiple sessions from suite_subprocess import suite_subprocess -from wtscenario import multiply_scenarios, number_scenarios from helper import simple_populate import wiredtiger, wttest diff --git a/test/suite/test_nsnap04.py b/test/suite/test_nsnap04.py index e8a5c9b6140..f9ef26b5600 100644 --- a/test/suite/test_nsnap04.py +++ b/test/suite/test_nsnap04.py @@ -30,7 +30,6 @@ # Named snapshots: Create snapshot from running transaction from suite_subprocess import suite_subprocess -from wtscenario import multiply_scenarios, number_scenarios from helper import simple_populate import wiredtiger, wttest diff --git a/test/suite/test_overwrite.py b/test/suite/test_overwrite.py index e22cdab4dea..4972a016bec 100644 --- a/test/suite/test_overwrite.py +++ b/test/suite/test_overwrite.py @@ -28,13 +28,13 @@ import wiredtiger, wttest from helper import key_populate, simple_populate -from wtscenario import check_scenarios +from wtscenario import make_scenarios # test_overwrite.py # cursor overwrite configuration method class test_overwrite(wttest.WiredTigerTestCase): name = 'overwrite' - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('file-r', dict(type='file:',keyfmt='r')), ('file-S', dict(type='file:',keyfmt='S')), ('lsm-S', dict(type='lsm:',keyfmt='S')), diff --git a/test/suite/test_perf001.py b/test/suite/test_perf001.py index 1280639c9dd..b22ed2baeb0 100644 --- a/test/suite/test_perf001.py +++ b/test/suite/test_perf001.py @@ -32,13 +32,13 @@ import wiredtiger, wttest import random from time import clock, time -from wtscenario import check_scenarios +from wtscenario import make_scenarios # Test performance of inserting into a table with an index. class test_perf001(wttest.WiredTigerTestCase): table_name = 'test_perf001' - scenarios = check_scenarios([ + scenarios = make_scenarios([ #('file-file', dict(tabletype='file',indextype='file')), ('file-lsm', dict(tabletype='file',indextype='lsm')), #('lsm-file', dict(tabletype='lsm',indextype='file')), diff --git a/test/suite/test_readonly01.py b/test/suite/test_readonly01.py index 59e9743ab7e..e4b431ca1da 100644 --- a/test/suite/test_readonly01.py +++ b/test/suite/test_readonly01.py @@ -32,7 +32,7 @@ import fnmatch, os, shutil, time from suite_subprocess import suite_subprocess -from wtscenario import multiply_scenarios, number_scenarios, prune_scenarios +from wtscenario import make_scenarios import wttest class test_readonly01(wttest.WiredTigerTestCase, suite_subprocess): @@ -73,8 +73,7 @@ class test_readonly01(wttest.WiredTigerTestCase, suite_subprocess): create_params = 'key_format=r,value_format=8t')), ] - scenarios = multiply_scenarios('.', - basecfg_list, dir_list, log_list, types) + scenarios = make_scenarios(basecfg_list, dir_list, log_list, types) def conn_config(self, dir): self.home = dir diff --git a/test/suite/test_rebalance.py b/test/suite/test_rebalance.py index f2167e864c9..98bd81de602 100644 --- a/test/suite/test_rebalance.py +++ b/test/suite/test_rebalance.py @@ -29,7 +29,7 @@ import os, time import wiredtiger, wttest from helper import complex_populate, simple_populate -from wtscenario import check_scenarios +from wtscenario import make_scenarios # test_rebalance.py # session level rebalance operation @@ -41,7 +41,7 @@ class test_rebalance(wttest.WiredTigerTestCase): config = 'key_format=S,allocation_size=512,internal_page_max=512' + \ ',leaf_page_max=1k,lsm=(chunk_size=512k,merge_min=10)' - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('file', dict(uri='file:')), ('table', dict(uri='table:')), ('lsm', dict(uri='lsm:')) diff --git a/test/suite/test_rename.py b/test/suite/test_rename.py index af968a4a38d..1979bbb802a 100644 --- a/test/suite/test_rename.py +++ b/test/suite/test_rename.py @@ -31,7 +31,7 @@ import wiredtiger, wttest from helper import confirm_does_not_exist,\ complex_populate, complex_populate_check,\ simple_populate, simple_populate_check -from wtscenario import check_scenarios +from wtscenario import make_scenarios # test_rename.py # session level rename operation @@ -39,7 +39,7 @@ class test_rename(wttest.WiredTigerTestCase): name1 = 'test_rename1' name2 = 'test_rename2' - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('file', dict(uri='file:')), ('table', dict(uri='table:')) ]) diff --git a/test/suite/test_schema02.py b/test/suite/test_schema02.py index b404261c066..bccc7dfc728 100644 --- a/test/suite/test_schema02.py +++ b/test/suite/test_schema02.py @@ -27,7 +27,7 @@ # OTHER DEALINGS IN THE SOFTWARE. import wiredtiger, wttest -from wtscenario import check_scenarios +from wtscenario import make_scenarios # test_schema02.py # Columns, column groups, indexes @@ -37,7 +37,7 @@ class test_schema02(wttest.WiredTigerTestCase): """ nentries = 1000 - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('normal', { 'idx_config' : '' }), ('lsm', { 'idx_config' : ',type=lsm' }), ]) diff --git a/test/suite/test_schema03.py b/test/suite/test_schema03.py index f48bfdf3cf8..81556393e78 100644 --- a/test/suite/test_schema03.py +++ b/test/suite/test_schema03.py @@ -29,7 +29,7 @@ import os import suite_random import wiredtiger, wtscenario, wttest -from wtscenario import check_scenarios +from wtscenario import make_scenarios try: # Windows does not getrlimit/setrlimit so we must catch the resource @@ -249,7 +249,7 @@ class test_schema03(wttest.WiredTigerTestCase): # but boost it up to this limit anyway. OPEN_FILE_LIMIT = 1000 - restart_scenarios = check_scenarios([('table', dict(s_restart=['table'],P=0.3)), + restart_scenarios = [('table', dict(s_restart=['table'],P=0.3)), ('colgroup0', dict(s_restart=['colgroup0'],P=0.3)), ('index0', dict(s_restart=['index0'],P=0.3)), ('colgroup1', dict(s_restart=['colgroup1'],P=0.3)), @@ -259,7 +259,7 @@ class test_schema03(wttest.WiredTigerTestCase): ('populate1', dict(s_restart=['populate1'],P=0.3)), ('ipop', dict(s_restart=['index0','populate0'],P=0.3)), ('all', dict(s_restart=['table','colgroup0','index0','colgroup1','index1','populate0','index2','populate1'],P=1.0)), - ]) + ] ntable_scenarios = wtscenario.quick_scenarios('s_ntable', [1,2,5,8], [1.0,0.4,0.5,0.5]) @@ -272,11 +272,10 @@ class test_schema03(wttest.WiredTigerTestCase): table_args_scenarios = wtscenario.quick_scenarios('s_extra_table_args', ['', ',type=file', ',type=lsm'], [0.5, 0.3, 0.2]) - all_scenarios = wtscenario.multiply_scenarios('_', restart_scenarios, ntable_scenarios, ncolgroup_scenarios, nindex_scenarios, idx_args_scenarios, table_args_scenarios) - - # Prune the scenarios according to the probabilities given above. - scenarios = wtscenario.prune_scenarios(all_scenarios, 30) - scenarios = wtscenario.number_scenarios(scenarios) + scenarios = wtscenario.make_scenarios( + restart_scenarios, ntable_scenarios, ncolgroup_scenarios, + nindex_scenarios, idx_args_scenarios, table_args_scenarios, + prune=30) # Note: the set can be reduced here for debugging, e.g. # scenarios = scenarios[40:44] diff --git a/test/suite/test_schema04.py b/test/suite/test_schema04.py index cd41138deb0..8ac81690819 100644 --- a/test/suite/test_schema04.py +++ b/test/suite/test_schema04.py @@ -28,7 +28,7 @@ import os import wiredtiger, wttest, run -from wtscenario import check_scenarios, number_scenarios +from wtscenario import make_scenarios # test_schema04.py # Test indices with duplicates @@ -47,7 +47,7 @@ class test_schema04(wttest.WiredTigerTestCase): """ nentries = 100 - scenarios = number_scenarios([ + scenarios = make_scenarios([ ('index-before', { 'create_index' : 0 }), ('index-during', { 'create_index' : 1 }), ('index-after', { 'create_index' : 2 }), diff --git a/test/suite/test_schema05.py b/test/suite/test_schema05.py index 89722d5f89a..89484cfc7bd 100644 --- a/test/suite/test_schema05.py +++ b/test/suite/test_schema05.py @@ -28,7 +28,7 @@ import os import wiredtiger, wttest, run -from wtscenario import check_scenarios, number_scenarios +from wtscenario import make_scenarios # test_schema05.py # Test indices using a custom extractor. @@ -51,7 +51,7 @@ class test_schema05(wttest.WiredTigerTestCase): nentries = 1000 nindices = 6 - scenarios = number_scenarios([ + scenarios = make_scenarios([ ('index-before', { 'create_index' : 0 }), ('index-during', { 'create_index' : 1 }), ('index-after', { 'create_index' : 2 }), diff --git a/test/suite/test_schema06.py b/test/suite/test_schema06.py index e72959edf2a..e0eec189137 100644 --- a/test/suite/test_schema06.py +++ b/test/suite/test_schema06.py @@ -27,6 +27,7 @@ # OTHER DEALINGS IN THE SOFTWARE. import wiredtiger, wttest +from wtscenario import make_scenarios # test_schema06.py # Repeatedly create and drop indices @@ -36,10 +37,10 @@ class test_schema06(wttest.WiredTigerTestCase): """ nentries = 1000 - scenarios = [ + scenarios = make_scenarios([ ('normal', { 'idx_config' : '' }), ('lsm', { 'idx_config' : ',type=lsm' }), - ] + ]) def flip(self, inum, val): """ diff --git a/test/suite/test_split.py b/test/suite/test_split.py index d09613e1c52..28bf6bc59b0 100644 --- a/test/suite/test_split.py +++ b/test/suite/test_split.py @@ -35,7 +35,6 @@ from wiredtiger import stat from helper import confirm_empty,\ key_populate, value_populate, simple_populate,\ complex_populate, complex_value_populate -from wtscenario import multiply_scenarios, number_scenarios # Test splits class test_split(wttest.WiredTigerTestCase): diff --git a/test/suite/test_stat01.py b/test/suite/test_stat01.py index 5c3259696eb..1ad51ee9882 100644 --- a/test/suite/test_stat01.py +++ b/test/suite/test_stat01.py @@ -29,7 +29,7 @@ import helper, wiredtiger, wttest from wiredtiger import stat from helper import key_populate, simple_populate -from wtscenario import multiply_scenarios, number_scenarios +from wtscenario import make_scenarios # test_stat01.py # Statistics operations @@ -49,7 +49,7 @@ class test_stat01(wttest.WiredTigerTestCase): ('recno', dict(keyfmt='r')), ('string', dict(keyfmt='S')), ] - scenarios = number_scenarios(multiply_scenarios('.', types, keyfmt)) + scenarios = make_scenarios(types, keyfmt) conn_config = 'statistics=(all)' diff --git a/test/suite/test_stat02.py b/test/suite/test_stat02.py index 88371947b5b..ef3907e54b1 100644 --- a/test/suite/test_stat02.py +++ b/test/suite/test_stat02.py @@ -28,7 +28,7 @@ import itertools, wiredtiger, wttest from suite_subprocess import suite_subprocess -from wtscenario import multiply_scenarios, number_scenarios +from wtscenario import make_scenarios from wiredtiger import stat from helper import complex_populate, complex_populate_lsm, simple_populate @@ -57,8 +57,7 @@ class test_stat_cursor_config(wttest.WiredTigerTestCase): ('size', dict(cursor_config='size')) ] - scenarios = number_scenarios( - multiply_scenarios('.', uri, data_config, cursor_config)) + scenarios = make_scenarios(uri, data_config, cursor_config) # Turn on statistics for this test. def conn_config(self, dir): @@ -106,13 +105,13 @@ class test_stat_cursor_dsrc_clear(wttest.WiredTigerTestCase): pfx = 'test_stat_cursor_dsrc_clear' uri = [ - ('1', dict(uri='file:' + pfx, pop=simple_populate)), - ('2', dict(uri='table:' + pfx, pop=simple_populate)), - ('3', dict(uri='table:' + pfx, pop=complex_populate)), - ('4', dict(uri='table:' + pfx, pop=complex_populate_lsm)) + ('dsrc_clear_1', dict(uri='file:' + pfx, pop=simple_populate)), + ('dsrc_clear_2', dict(uri='table:' + pfx, pop=simple_populate)), + ('dsrc_clear_3', dict(uri='table:' + pfx, pop=complex_populate)), + ('dsrc_clear_4', dict(uri='table:' + pfx, pop=complex_populate_lsm)) ] - scenarios = number_scenarios(multiply_scenarios('.', uri)) + scenarios = make_scenarios(uri) conn_config = 'statistics=(all)' def test_stat_cursor_dsrc_clear(self): @@ -136,13 +135,13 @@ class test_stat_cursor_fast(wttest.WiredTigerTestCase): pfx = 'test_stat_cursor_fast' uri = [ - ('1', dict(uri='file:' + pfx, pop=simple_populate)), - ('2', dict(uri='table:' + pfx, pop=simple_populate)), - ('3', dict(uri='table:' + pfx, pop=complex_populate)), - ('4', dict(uri='table:' + pfx, pop=complex_populate_lsm)) + ('fast_1', dict(uri='file:' + pfx, pop=simple_populate)), + ('fast_2', dict(uri='table:' + pfx, pop=simple_populate)), + ('fast_3', dict(uri='table:' + pfx, pop=complex_populate)), + ('fast_4', dict(uri='table:' + pfx, pop=complex_populate_lsm)) ] - scenarios = number_scenarios(multiply_scenarios('.', uri)) + scenarios = make_scenarios(uri) conn_config = 'statistics=(all)' def test_stat_cursor_fast(self): @@ -180,13 +179,13 @@ class test_stat_cursor_dsrc_error(wttest.WiredTigerTestCase): pfx = 'test_stat_cursor_dsrc_error' uri = [ - ('1', dict(uri='file:' + pfx, pop=simple_populate)), - ('2', dict(uri='table:' + pfx, pop=simple_populate)), - ('3', dict(uri='table:' + pfx, pop=complex_populate)), - ('4', dict(uri='table:' + pfx, pop=complex_populate_lsm)) + ('dsrc_error_1', dict(uri='file:' + pfx, pop=simple_populate)), + ('dsrc_error_2', dict(uri='table:' + pfx, pop=simple_populate)), + ('dsrc_error_3', dict(uri='table:' + pfx, pop=complex_populate)), + ('dsrc_error_4', dict(uri='table:' + pfx, pop=complex_populate_lsm)) ] - scenarios = number_scenarios(multiply_scenarios('.', uri)) + scenarios = make_scenarios(uri) conn_config = 'statistics=(all)' def test_stat_cursor_dsrc_error(self): diff --git a/test/suite/test_stat03.py b/test/suite/test_stat03.py index 039ad1f7f8d..b17fe6eb91c 100644 --- a/test/suite/test_stat03.py +++ b/test/suite/test_stat03.py @@ -34,7 +34,7 @@ from helper import complex_populate, complex_populate_lsm, simple_populate from helper import key_populate, complex_value_populate, value_populate from helper import complex_populate_colgroup_count, complex_populate_index_count from helper import complex_populate_colgroup_name, complex_populate_index_name -from wtscenario import multiply_scenarios, number_scenarios +from wtscenario import make_scenarios # test_stat03.py # Statistics reset test. @@ -51,7 +51,7 @@ class test_stat_cursor_reset(wttest.WiredTigerTestCase): dict(uri='table:' + pfx, pop=complex_populate_lsm)), ] - scenarios = number_scenarios(multiply_scenarios('.', uri)) + scenarios = make_scenarios(uri) conn_config = 'statistics=(all)' def stat_cursor(self, uri): diff --git a/test/suite/test_stat04.py b/test/suite/test_stat04.py index 0246a927a76..b5309efff37 100644 --- a/test/suite/test_stat04.py +++ b/test/suite/test_stat04.py @@ -28,7 +28,7 @@ import os, struct from suite_subprocess import suite_subprocess -from wtscenario import number_scenarios, multiply_scenarios +from wtscenario import make_scenarios import wiredtiger, wttest from wiredtiger import stat @@ -49,7 +49,7 @@ class test_stat04(wttest.WiredTigerTestCase, suite_subprocess): ('large', dict(nentries=100000, valuesize=1)), ('jumboval', dict(nentries=100, valuesize=4200000)), ] - scenarios = number_scenarios(multiply_scenarios('.', keyfmt, nentries)) + scenarios = make_scenarios(keyfmt, nentries) conn_config = 'statistics=(all)' def init_test(self): diff --git a/test/suite/test_stat05.py b/test/suite/test_stat05.py index 9bcedd65089..9d755aeff0a 100644 --- a/test/suite/test_stat05.py +++ b/test/suite/test_stat05.py @@ -28,7 +28,7 @@ import itertools, wiredtiger, wttest from suite_subprocess import suite_subprocess -from wtscenario import multiply_scenarios, number_scenarios +from wtscenario import make_scenarios from wiredtiger import stat from helper import complex_populate, complex_populate_lsm, simple_populate from helper import complex_value_populate, key_populate, value_populate @@ -52,7 +52,7 @@ class test_stat_cursor_config(wttest.WiredTigerTestCase): cfg=',lsm=(chunk_size=1MB,merge_min=2)')), ] - scenarios = number_scenarios(uri) + scenarios = make_scenarios(uri) def openAndWalkStatCursor(self): c = self.session.open_cursor( diff --git a/test/suite/test_sweep01.py b/test/suite/test_sweep01.py index bccd2bce012..71f8fcb180e 100644 --- a/test/suite/test_sweep01.py +++ b/test/suite/test_sweep01.py @@ -33,8 +33,8 @@ import fnmatch, os, shutil, run, time from suite_subprocess import suite_subprocess +from wtscenario import make_scenarios from wiredtiger import stat -from wtscenario import multiply_scenarios, number_scenarios, prune_scenarios import wttest class test_sweep01(wttest.WiredTigerTestCase, suite_subprocess): @@ -55,7 +55,7 @@ class test_sweep01(wttest.WiredTigerTestCase, suite_subprocess): create_params = 'key_format=r,value_format=8t')), ] - scenarios = types + scenarios = make_scenarios(types) def test_ops(self): # diff --git a/test/suite/test_sweep03.py b/test/suite/test_sweep03.py index 061c2f5b37b..61078fa96b5 100644 --- a/test/suite/test_sweep03.py +++ b/test/suite/test_sweep03.py @@ -33,7 +33,7 @@ import fnmatch, os, shutil, run, time from suite_subprocess import suite_subprocess from wiredtiger import stat -from wtscenario import multiply_scenarios, number_scenarios, prune_scenarios +from wtscenario import make_scenarios import wttest class test_sweep03(wttest.WiredTigerTestCase, suite_subprocess): @@ -54,7 +54,7 @@ class test_sweep03(wttest.WiredTigerTestCase, suite_subprocess): create_params = 'key_format=r,value_format=8t')), ] - scenarios = types + scenarios = make_scenarios(types) def test_disable_idle_timeout1(self): # diff --git a/test/suite/test_truncate01.py b/test/suite/test_truncate01.py index 77a476e40c1..9a3518c6984 100644 --- a/test/suite/test_truncate01.py +++ b/test/suite/test_truncate01.py @@ -34,13 +34,13 @@ import wiredtiger, wttest from helper import confirm_empty,\ key_populate, value_populate, simple_populate,\ complex_populate, complex_value_populate -from wtscenario import check_scenarios, multiply_scenarios, number_scenarios +from wtscenario import make_scenarios # Test truncation arguments. class test_truncate_arguments(wttest.WiredTigerTestCase): name = 'test_truncate' - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('file', dict(type='file:')), ('table', dict(type='table:')) ]) @@ -80,7 +80,7 @@ class test_truncate_arguments(wttest.WiredTigerTestCase): # Test truncation of an object using its URI. class test_truncate_uri(wttest.WiredTigerTestCase): name = 'test_truncate' - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('file', dict(type='file:')), ('table', dict(type='table:')) ]) @@ -115,7 +115,7 @@ class test_truncate_cursor_order(wttest.WiredTigerTestCase): ('recno', dict(keyfmt='r')), ('string', dict(keyfmt='S')), ] - scenarios = number_scenarios(multiply_scenarios('.', types, keyfmt)) + scenarios = make_scenarios(types, keyfmt) # Test an illegal order, then confirm that equal cursors works. def test_truncate_cursor_order(self): @@ -146,7 +146,7 @@ class test_truncate_cursor_end(wttest.WiredTigerTestCase): ('recno', dict(keyfmt='r')), ('string', dict(keyfmt='S')), ] - scenarios = number_scenarios(multiply_scenarios('.', types, keyfmt)) + scenarios = make_scenarios(types, keyfmt) # Test truncation of cursors past the end of the object. def test_truncate_cursor_order(self): @@ -205,8 +205,7 @@ class test_truncate_cursor(wttest.WiredTigerTestCase): ('big', dict(nentries=1000,skip=37)), ] - scenarios = number_scenarios( - multiply_scenarios('.', types, keyfmt, size, reopen)) + scenarios = make_scenarios(types, keyfmt, size, reopen) # Set a cursor key. def cursorKey(self, uri, key): diff --git a/test/suite/test_truncate02.py b/test/suite/test_truncate02.py index 6c11302787c..e57a65d2f97 100644 --- a/test/suite/test_truncate02.py +++ b/test/suite/test_truncate02.py @@ -32,7 +32,7 @@ import wiredtiger, wttest from helper import key_populate, value_populate, simple_populate -from wtscenario import multiply_scenarios, number_scenarios +from wtscenario import make_scenarios # test_truncate_fast_delete # When deleting leaf pages that aren't in memory, we set transactional @@ -86,8 +86,7 @@ class test_truncate_fast_delete(wttest.WiredTigerTestCase): ('txn2', dict(commit=False)), ] - scenarios = number_scenarios( - multiply_scenarios('.', types, keyfmt, overflow, reads, writes, txn)) + scenarios = make_scenarios(types, keyfmt, overflow, reads, writes, txn) # Return the number of records visible to the cursor; test both forward # and backward iteration, they are different code paths in this case. diff --git a/test/suite/test_txn01.py b/test/suite/test_txn01.py index eb6963791fd..1ba74461088 100644 --- a/test/suite/test_txn01.py +++ b/test/suite/test_txn01.py @@ -27,13 +27,13 @@ # OTHER DEALINGS IN THE SOFTWARE. import wiredtiger, wttest -from wtscenario import check_scenarios +from wtscenario import make_scenarios # test_txn01.py # Transactions: basic functionality class test_txn01(wttest.WiredTigerTestCase): nentries = 1000 - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('col-f', dict(uri='file:text_txn01',key_format='r',value_format='S')), ('col-t', dict(uri='table:text_txn01',key_format='r',value_format='S')), ('fix-f', dict(uri='file:text_txn01',key_format='r',value_format='8t')), diff --git a/test/suite/test_txn02.py b/test/suite/test_txn02.py index fccf123d3bc..a0c2c12a47c 100644 --- a/test/suite/test_txn02.py +++ b/test/suite/test_txn02.py @@ -32,7 +32,7 @@ import fnmatch, os, shutil, time from suite_subprocess import suite_subprocess -from wtscenario import multiply_scenarios, number_scenarios, prune_scenarios +from wtscenario import make_scenarios import wttest class test_txn02(wttest.WiredTigerTestCase, suite_subprocess): @@ -81,22 +81,18 @@ class test_txn02(wttest.WiredTigerTestCase, suite_subprocess): txn3s = [('t3c', dict(txn3='commit')), ('t3r', dict(txn3='rollback'))] txn4s = [('t4c', dict(txn4='commit')), ('t4r', dict(txn4='rollback'))] - all_scenarios = multiply_scenarios('.', types, - op1s, txn1s, op2s, txn2s, op3s, txn3s, op4s, txn4s) - # This test generates thousands of potential scenarios. # For default runs, we'll use a small subset of them, for # long runs (when --long is set) we'll set a much larger limit. - scenarios = number_scenarios(prune_scenarios(all_scenarios, 20, 5000)) + scenarios = make_scenarios(types, + op1s, txn1s, op2s, txn2s, op3s, txn3s, op4s, txn4s, + prune=20, prunelong=5000) # Each check_log() call takes a second, so we don't call it for # every scenario, we'll limit it to the value of checklog_calls. checklog_calls = 100 if wttest.islongtest() else 2 checklog_mod = (len(scenarios) / checklog_calls + 1) - # scenarios = number_scenarios(multiply_scenarios('.', types, - # op1s, txn1s, op2s, txn2s, op3s, txn3s, op4s, txn4s)) [:3] - # Overrides WiredTigerTestCase def setUpConnectionOpen(self, dir): self.home = dir # Cycle through the different transaction_sync values in a diff --git a/test/suite/test_txn03.py b/test/suite/test_txn03.py index 97180a75949..18a0e096767 100644 --- a/test/suite/test_txn03.py +++ b/test/suite/test_txn03.py @@ -31,7 +31,7 @@ # import wiredtiger, wttest -from wtscenario import check_scenarios +from wtscenario import make_scenarios class test_txn03(wttest.WiredTigerTestCase): tablename = 'test_txn03' @@ -42,7 +42,7 @@ class test_txn03(wttest.WiredTigerTestCase): data_str2 = "TEST_VAL1" nentries = 1000 - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('var', dict(create_params = "key_format=S,value_format=S")), ]) diff --git a/test/suite/test_txn04.py b/test/suite/test_txn04.py index 9d9d2db62c6..ade39272f84 100644 --- a/test/suite/test_txn04.py +++ b/test/suite/test_txn04.py @@ -32,7 +32,7 @@ import shutil, os from suite_subprocess import suite_subprocess -from wtscenario import multiply_scenarios, number_scenarios +from wtscenario import make_scenarios import wttest class test_txn04(wttest.WiredTigerTestCase, suite_subprocess): @@ -62,7 +62,7 @@ class test_txn04(wttest.WiredTigerTestCase, suite_subprocess): ] txn1s = [('t1c', dict(txn1='commit')), ('t1r', dict(txn1='rollback'))] - scenarios = number_scenarios(multiply_scenarios('.', types, op1s, txn1s)) + scenarios = make_scenarios(types, op1s, txn1s) # Overrides WiredTigerTestCase def setUpConnectionOpen(self, dir): self.home = dir diff --git a/test/suite/test_txn05.py b/test/suite/test_txn05.py index bb68034ca04..9e84fe7d3fe 100644 --- a/test/suite/test_txn05.py +++ b/test/suite/test_txn05.py @@ -32,7 +32,7 @@ import fnmatch, os, shutil, time from suite_subprocess import suite_subprocess -from wtscenario import multiply_scenarios, number_scenarios +from wtscenario import make_scenarios import wttest class test_txn05(wttest.WiredTigerTestCase, suite_subprocess): @@ -63,8 +63,7 @@ class test_txn05(wttest.WiredTigerTestCase, suite_subprocess): ] txn1s = [('t1c', dict(txn1='commit')), ('t1r', dict(txn1='rollback'))] - scenarios = number_scenarios(multiply_scenarios('.', types, op1s, txn1s)) - # scenarios = number_scenarios(multiply_scenarios('.', types, op1s, txn1s))[:3] + scenarios = make_scenarios(types, op1s, txn1s) # Overrides WiredTigerTestCase def setUpConnectionOpen(self, dir): self.home = dir diff --git a/test/suite/test_txn06.py b/test/suite/test_txn06.py index 9c1d0335d47..e4636e40e2e 100644 --- a/test/suite/test_txn06.py +++ b/test/suite/test_txn06.py @@ -30,7 +30,6 @@ # Transactions: test long-running snapshots from suite_subprocess import suite_subprocess -from wtscenario import multiply_scenarios, number_scenarios from helper import simple_populate import wiredtiger, wttest diff --git a/test/suite/test_txn07.py b/test/suite/test_txn07.py index f74120e3590..8dd8238343d 100644 --- a/test/suite/test_txn07.py +++ b/test/suite/test_txn07.py @@ -33,7 +33,7 @@ import fnmatch, os, shutil, run, time from suite_subprocess import suite_subprocess from wiredtiger import stat -from wtscenario import multiply_scenarios, number_scenarios +from wtscenario import make_scenarios import wttest class test_txn07(wttest.WiredTigerTestCase, suite_subprocess): @@ -70,8 +70,7 @@ class test_txn07(wttest.WiredTigerTestCase, suite_subprocess): ('none', dict(compress='')), ] - scenarios = number_scenarios(multiply_scenarios('.', types, op1s, txn1s, - compress)) + scenarios = make_scenarios(types, op1s, txn1s, compress) # Overrides WiredTigerTestCase def setUpConnectionOpen(self, dir): self.home = dir diff --git a/test/suite/test_txn08.py b/test/suite/test_txn08.py index 36253856285..f0cdf08df07 100644 --- a/test/suite/test_txn08.py +++ b/test/suite/test_txn08.py @@ -33,7 +33,6 @@ import fnmatch, os, shutil, run, time from suite_subprocess import suite_subprocess from wiredtiger import stat -from wtscenario import multiply_scenarios, number_scenarios import wttest class test_txn08(wttest.WiredTigerTestCase, suite_subprocess): diff --git a/test/suite/test_txn09.py b/test/suite/test_txn09.py index f536d65205d..cfad8270ab1 100644 --- a/test/suite/test_txn09.py +++ b/test/suite/test_txn09.py @@ -32,7 +32,7 @@ import fnmatch, os, shutil, time from suite_subprocess import suite_subprocess -from wtscenario import multiply_scenarios, number_scenarios, prune_scenarios +from wtscenario import make_scenarios import wttest class test_txn09(wttest.WiredTigerTestCase, suite_subprocess): @@ -73,13 +73,12 @@ class test_txn09(wttest.WiredTigerTestCase, suite_subprocess): txn3s = [('t3c', dict(txn3='commit')), ('t3r', dict(txn3='rollback'))] txn4s = [('t4c', dict(txn4='commit')), ('t4r', dict(txn4='rollback'))] - all_scenarios = multiply_scenarios('.', types, - op1s, txn1s, op2s, txn2s, op3s, txn3s, op4s, txn4s) - # This test generates thousands of potential scenarios. # For default runs, we'll use a small subset of them, for # long runs (when --long is set) we'll set a much larger limit. - scenarios = number_scenarios(prune_scenarios(all_scenarios, 20, 5000)) + scenarios = make_scenarios(types, + op1s, txn1s, op2s, txn2s, op3s, txn3s, op4s, txn4s, + prune=20, prunelong=5000) # Overrides WiredTigerTestCase def setUpConnectionOpen(self, dir): diff --git a/test/suite/test_txn10.py b/test/suite/test_txn10.py index cf9c11dd4ab..a4745e60066 100644 --- a/test/suite/test_txn10.py +++ b/test/suite/test_txn10.py @@ -32,7 +32,6 @@ import fnmatch, os, shutil, time from suite_subprocess import suite_subprocess -from wtscenario import multiply_scenarios, number_scenarios, prune_scenarios import wttest class test_txn10(wttest.WiredTigerTestCase, suite_subprocess): diff --git a/test/suite/test_txn12.py b/test/suite/test_txn12.py index 8ae9df33990..32c058bea85 100644 --- a/test/suite/test_txn12.py +++ b/test/suite/test_txn12.py @@ -29,7 +29,6 @@ import wiredtiger, wttest from suite_subprocess import suite_subprocess from wiredtiger import stat -from wtscenario import multiply_scenarios, number_scenarios # test_txn12.py # test of commit following failed op in a read only transaction. diff --git a/test/suite/test_txn13.py b/test/suite/test_txn13.py index dd6a6dbcd6d..ae0250c06e8 100644 --- a/test/suite/test_txn13.py +++ b/test/suite/test_txn13.py @@ -33,7 +33,7 @@ #import fnmatch, os, shutil, run, time from suite_subprocess import suite_subprocess -from wtscenario import check_scenarios +from wtscenario import make_scenarios import wiredtiger, wttest class test_txn13(wttest.WiredTigerTestCase, suite_subprocess): @@ -43,7 +43,7 @@ class test_txn13(wttest.WiredTigerTestCase, suite_subprocess): nops = 1024 create_params = 'key_format=i,value_format=S' - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('1gb', dict(expect_err=False, valuesize=1048576)), ('2gb', dict(expect_err=False, valuesize=2097152)), ('4gb', dict(expect_err=True, valuesize=4194304)) diff --git a/test/suite/test_txn14.py b/test/suite/test_txn14.py index 371f4402567..f9ccabaab8b 100644 --- a/test/suite/test_txn14.py +++ b/test/suite/test_txn14.py @@ -32,7 +32,7 @@ import fnmatch, os, shutil, time from suite_subprocess import suite_subprocess -from wtscenario import multiply_scenarios, number_scenarios, prune_scenarios +from wtscenario import make_scenarios import wttest class test_txn14(wttest.WiredTigerTestCase, suite_subprocess): @@ -47,7 +47,7 @@ class test_txn14(wttest.WiredTigerTestCase, suite_subprocess): ('sync', dict(sync='on')), ('bg', dict(sync='background')), ] - scenarios = multiply_scenarios('.', sync_list) + scenarios = make_scenarios(sync_list) def simulate_crash_restart(self, olddir, newdir): ''' Simulate a crash from olddir and restart in newdir. ''' diff --git a/test/suite/test_txn15.py b/test/suite/test_txn15.py index 809dce4ebfa..c061c093b02 100644 --- a/test/suite/test_txn15.py +++ b/test/suite/test_txn15.py @@ -33,7 +33,7 @@ import fnmatch, os, shutil, time from suite_subprocess import suite_subprocess from wiredtiger import stat -from wtscenario import multiply_scenarios, number_scenarios, prune_scenarios +from wtscenario import make_scenarios import wttest class test_txn15(wttest.WiredTigerTestCase, suite_subprocess): @@ -71,7 +71,7 @@ class test_txn15(wttest.WiredTigerTestCase, suite_subprocess): ('c_none', dict(commit_sync=None)), ('c_off', dict(commit_sync='sync=off')), ] - scenarios = multiply_scenarios('.', conn_sync_enabled, conn_sync_method, + scenarios = make_scenarios(conn_sync_enabled, conn_sync_method, begin_sync, commit_sync) # Given the different configuration settings determine if this group diff --git a/test/suite/test_upgrade.py b/test/suite/test_upgrade.py index 357e437f14d..e4f92f8f8d8 100644 --- a/test/suite/test_upgrade.py +++ b/test/suite/test_upgrade.py @@ -29,14 +29,14 @@ import os, time import wiredtiger, wttest from helper import complex_populate, simple_populate -from wtscenario import check_scenarios +from wtscenario import make_scenarios # test_upgrade.py # session level upgrade operation class test_upgrade(wttest.WiredTigerTestCase): name = 'test_upgrade' - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('file', dict(uri='file:')), ('table', dict(uri='table:')) ]) diff --git a/test/suite/test_util02.py b/test/suite/test_util02.py index 475e856052a..421b0104484 100644 --- a/test/suite/test_util02.py +++ b/test/suite/test_util02.py @@ -29,7 +29,7 @@ import string, os import wiredtiger, wttest from suite_subprocess import suite_subprocess -from wtscenario import check_scenarios +from wtscenario import make_scenarios from helper import complex_populate # test_util02.py @@ -44,7 +44,7 @@ class test_util02(wttest.WiredTigerTestCase, suite_subprocess): nentries = 1000 stringclass = ''.__class__ - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('SS', dict(key_format='S',value_format='S')), ('rS', dict(key_format='r',value_format='S')), ('ri', dict(key_format='r',value_format='i')), diff --git a/test/suite/test_util03.py b/test/suite/test_util03.py index c3ea48b8f5e..e341c79ff9e 100644 --- a/test/suite/test_util03.py +++ b/test/suite/test_util03.py @@ -28,7 +28,7 @@ from suite_subprocess import suite_subprocess import wiredtiger, wttest -from wtscenario import check_scenarios +from wtscenario import make_scenarios # test_util03.py # Utilities: wt create @@ -36,7 +36,7 @@ class test_util03(wttest.WiredTigerTestCase, suite_subprocess): tablename = 'test_util03.a' nentries = 1000 - scenarios = check_scenarios([ + scenarios = make_scenarios([ ('none', dict(key_format=None,value_format=None)), ('SS', dict(key_format='S',value_format='S')), ('rS', dict(key_format='r',value_format='S')), diff --git a/test/suite/test_util13.py b/test/suite/test_util13.py index 222f42cd7f1..9804dc700ba 100644 --- a/test/suite/test_util13.py +++ b/test/suite/test_util13.py @@ -33,7 +33,7 @@ import itertools, wiredtiger, wttest from helper import complex_populate_cgconfig, complex_populate_cgconfig_lsm from helper import simple_populate from helper import complex_populate_check, simple_populate_check -from wtscenario import multiply_scenarios, number_scenarios +from wtscenario import make_scenarios # test_util13.py # Utilities: wt dump, as well as the dump cursor @@ -73,7 +73,7 @@ class test_util13(wttest.WiredTigerTestCase, suite_subprocess): cfg='merge_max=5')), ] - scenarios = number_scenarios(multiply_scenarios('.', types)) + scenarios = make_scenarios(types) def compare_config(self, expected_cfg, actual_cfg): # Replace '(' characters so configuration groups don't break parsing. diff --git a/test/suite/wtscenario.py b/test/suite/wtscenario.py index 750a7bcfd00..8576b3ac876 100644 --- a/test/suite/wtscenario.py +++ b/test/suite/wtscenario.py @@ -64,6 +64,32 @@ def log2chr(val): megabyte = 1024 * 1024 +def make_scenarios(*args, **kwargs): + """ + The standard way to create scenarios for WT tests. + Scenarios can be combined by listing them all as arguments. + A final prune= and/or prunelong= argument may be given that + forces the list of entries in the scenario to be pruned. + The result is a (combined) scenario that has been checked + for name duplicates and has been given names and numbers. + """ + scenes = multiply_scenarios('.', *args) + pruneval = None + prunelong = None + for key in kwargs: + if key == 'prune': + pruneval = kwargs[key] + elif key == 'prunelong': + prunelong = kwargs[key] + else: + raise AssertionError( + 'make_scenarios: unexpected named arg: ' + key) + if pruneval != None or prunelong != None: + pruneval = pruneval if pruneval != None else -1 + prunelong = prunelong if prunelong != None else -1 + scenes = prune_scenarios(scenes, pruneval, prunelong) + return number_scenarios(scenes) + def check_scenarios(scenes): """ Make sure all scenarios have unique case insensitive names @@ -235,7 +261,7 @@ class wtscenario: scen.lmax = lmax scen.cache_size = cache s.append((scen.shortName(), dict(session_create_scenario=scen))) - return s + return make_scenarios(s) def shortName(self): """ |