diff options
author | Greg Studer <greg@10gen.com> | 2014-09-12 13:41:12 -0400 |
---|---|---|
committer | Greg Studer <greg@10gen.com> | 2014-09-15 19:05:15 -0400 |
commit | fac5571f67e23a1339e20e0621bab0ba2a6b7163 (patch) | |
tree | 8a9691206676a8fac71c62fcc457961f0ab442e2 /buildscripts/smoke_config | |
parent | f526e7e49b63644456b3bc29a4a4e33406ce4b88 (diff) | |
download | mongo-fac5571f67e23a1339e20e0621bab0ba2a6b7163.tar.gz |
SERVER-1424 (re)smoke tag parsing and new test library, v0
Includes:
- Smoke.py options for filtering by jstest tags
- New resmoke.py test utility in v0 alpha
- Lots of example resmoke configurations
- SCons integration for unittests
- Sample tagged jstests
Diffstat (limited to 'buildscripts/smoke_config')
-rw-r--r-- | buildscripts/smoke_config/__init__.py | 26 | ||||
-rw-r--r-- | buildscripts/smoke_config/auth.yaml | 27 | ||||
-rw-r--r-- | buildscripts/smoke_config/auth_shell.yaml | 21 | ||||
-rw-r--r-- | buildscripts/smoke_config/disk.yaml | 11 | ||||
-rw-r--r-- | buildscripts/smoke_config/executor_default.yaml | 9 | ||||
-rw-r--r-- | buildscripts/smoke_config/jscore.yaml | 21 | ||||
-rw-r--r-- | buildscripts/smoke_config/log_console.yaml | 16 | ||||
-rw-r--r-- | buildscripts/smoke_config/log_default.yaml | 39 | ||||
-rw-r--r-- | buildscripts/smoke_config/log_file.yaml | 39 | ||||
-rw-r--r-- | buildscripts/smoke_config/log_suppress.yaml | 20 | ||||
-rw-r--r-- | buildscripts/smoke_config/master_slave.yaml | 8 | ||||
-rw-r--r-- | buildscripts/smoke_config/no_server.yaml | 9 | ||||
-rw-r--r-- | buildscripts/smoke_config/replicasets.yaml | 11 | ||||
-rw-r--r-- | buildscripts/smoke_config/sharding.yaml | 11 | ||||
-rw-r--r-- | buildscripts/smoke_config/unittests.yaml | 7 | ||||
-rw-r--r-- | buildscripts/smoke_config/with_server.yaml | 15 |
16 files changed, 290 insertions, 0 deletions
diff --git a/buildscripts/smoke_config/__init__.py b/buildscripts/smoke_config/__init__.py new file mode 100644 index 00000000000..07736e7be49 --- /dev/null +++ b/buildscripts/smoke_config/__init__.py @@ -0,0 +1,26 @@ + +import os + +USER_CONFIG_DIRS = (os.path.split(__file__)[0], "~/.smoke_config") + + +def get_named_configs(search_paths=USER_CONFIG_DIRS): + """Extract named JSON configurations from specified paths.""" + named_configs = {} + for search_path in search_paths: + + search_path = os.path.expanduser(search_path) + if not os.path.isdir(search_path): + continue + + for path, dirnames, filenames in os.walk(search_path): + + for filename in filenames: + + filebase, ext = os.path.splitext(filename) + if ext != ".json" and ext != ".yaml" and ext != ".yml": + continue + + named_configs[filebase] = os.path.abspath(os.path.join(path, filename)) + + return named_configs diff --git a/buildscripts/smoke_config/auth.yaml b/buildscripts/smoke_config/auth.yaml new file mode 100644 index 00000000000..102c8721b3f --- /dev/null +++ b/buildscripts/smoke_config/auth.yaml @@ -0,0 +1,27 @@ +# Options to set for authorization with a mongod host +suite: + exclude_tags: + - ^auth_internal$ + +executor: + fixtures: + mongodb_server: + mongod_options: + auth: '' + keyFile: ./jstests/libs/authTestsKey + set_parameters: + enableLocalhostAuthBypass: false + shell_globals: + TestData: + auth: true + authMechanism: MONGODB-CR + keyFile: ./jstests/lib/authTestsKey + keyFileData: Thiskeyisonlyforrunningthesuitewithauthenticationdontuseitinanytestsdirectly + testers: + js_test: + shell_options: + authenticationDatabase: local + authenticationMechanism: MONGODB-CR + password: Thiskeyisonlyforrunningthesuitewithauthenticationdontuseitinanytestsdirectly + username: __system + diff --git a/buildscripts/smoke_config/auth_shell.yaml b/buildscripts/smoke_config/auth_shell.yaml new file mode 100644 index 00000000000..56388ebb555 --- /dev/null +++ b/buildscripts/smoke_config/auth_shell.yaml @@ -0,0 +1,21 @@ +# Options to set for authorization with a mongod host +suite: + exclude_tags: + - ^auth_internal$ + +executor: + fixtures: + shell_globals: + TestData: + auth: true + authMechanism: MONGODB-CR + keyFile: ./jstests/lib/authTestsKey + keyFileData: Thiskeyisonlyforrunningthesuitewithauthenticationdontuseitinanytestsdirectly + testers: + js_test: + shell_options: + authenticationDatabase: local + authenticationMechanism: MONGODB-CR + password: Thiskeyisonlyforrunningthesuitewithauthenticationdontuseitinanytestsdirectly + username: __system + diff --git a/buildscripts/smoke_config/disk.yaml b/buildscripts/smoke_config/disk.yaml new file mode 100644 index 00000000000..cec6897d03c --- /dev/null +++ b/buildscripts/smoke_config/disk.yaml @@ -0,0 +1,11 @@ +# Disk tests +tests: + roots: + - ./jstests/disk/*.js +executor: + fixtures: + shell_globals: + fixture_class: smoke.GlobalShellFixture + testers: + jstest: {} + diff --git a/buildscripts/smoke_config/executor_default.yaml b/buildscripts/smoke_config/executor_default.yaml new file mode 100644 index 00000000000..bb4b80b484e --- /dev/null +++ b/buildscripts/smoke_config/executor_default.yaml @@ -0,0 +1,9 @@ +executor: + fixtures: {} + + testers: + # Test runners for the suite + + js_test: {} + db_test: {} + exe_test: {} diff --git a/buildscripts/smoke_config/jscore.yaml b/buildscripts/smoke_config/jscore.yaml new file mode 100644 index 00000000000..c34e9bc6608 --- /dev/null +++ b/buildscripts/smoke_config/jscore.yaml @@ -0,0 +1,21 @@ +tests: + # JSCore root + roots: + - ./jstests/core/*.js + +executor: + + fixtures: + + # Single MongoD running in background + mongodb_server: + fixture_class: smoke.SingleMongoDFixture + mongod_options: + nopreallocj: '' + + # Global shell context + shell_globals: + fixture_class: smoke.GlobalShellFixture + + testers: + js_test: {} diff --git a/buildscripts/smoke_config/log_console.yaml b/buildscripts/smoke_config/log_console.yaml new file mode 100644 index 00000000000..2f7ea9deca1 --- /dev/null +++ b/buildscripts/smoke_config/log_console.yaml @@ -0,0 +1,16 @@ +logging: + version: 1 + + handlers: + default: + level: INFO + class: logging.StreamHandler + + loggers: + "": + handlers: + - default + level: INFO + propagate: True + +
\ No newline at end of file diff --git a/buildscripts/smoke_config/log_default.yaml b/buildscripts/smoke_config/log_default.yaml new file mode 100644 index 00000000000..4165954c075 --- /dev/null +++ b/buildscripts/smoke_config/log_default.yaml @@ -0,0 +1,39 @@ +suite: {} +executor: + fail_fast: false + fixtures: + shell_globals: + fixture_class: smoke.GlobalShellFixture + testers: + db_test: {} + exe_test: {} + js_test: {} +logging: + disable_existing_loggers: true + formatters: + standard: + format: '%(asctime)s [%(levelname)s] %(name)s: %(message)s' + handlers: + fixtures: + class: logging.FileHandler + filename: ./fixtures.log + level: INFO + mode: w + testers: + class: logging.FileHandler + filename: ./tests.log + level: INFO + mode: w + loggers: + executor.fixtures: + handlers: + - fixtures + level: INFO + propagate: false + executor.testers: + handlers: + - testers + level: INFO + propagate: false + version: 1 + diff --git a/buildscripts/smoke_config/log_file.yaml b/buildscripts/smoke_config/log_file.yaml new file mode 100644 index 00000000000..a5e8b089596 --- /dev/null +++ b/buildscripts/smoke_config/log_file.yaml @@ -0,0 +1,39 @@ +suite: {} +executor: + fail_fast: false + fixtures: + shell_globals: + fixture_class: smoke.GlobalShellFixture + testers: + db_test: {} + exe_test: {} + js_test: {} +logging: + disable_existing_loggers: true + formatters: + standard: + format: '%(asctime)s [%(levelname)s] %(name)s: %(message)s' + handlers: + fixtures: + class: logging.FileHandler + filename: ./fixtures.log + level: INFO + mode: w + testers: + class: logging.FileHandler + filename: ./testers.log + level: INFO + mode: w + loggers: + executor.fixtures: + handlers: + - fixtures + level: INFO + propagate: false + executor.testers: + handlers: + - testers + level: INFO + propagate: false + version: 1 + diff --git a/buildscripts/smoke_config/log_suppress.yaml b/buildscripts/smoke_config/log_suppress.yaml new file mode 100644 index 00000000000..668912bfefb --- /dev/null +++ b/buildscripts/smoke_config/log_suppress.yaml @@ -0,0 +1,20 @@ +suite: {} +executor: + fail_fast: false + fixtures: + shell_globals: + fixture_class: smoke.GlobalShellFixture + testers: + db_test: {} + exe_test: {} + js_test: {} +logging: + handlers: + default: + class: logging.NullHandler + loggers: + ? '' + : handlers: + - default + version: 1 + diff --git a/buildscripts/smoke_config/master_slave.yaml b/buildscripts/smoke_config/master_slave.yaml new file mode 100644 index 00000000000..362f300ef75 --- /dev/null +++ b/buildscripts/smoke_config/master_slave.yaml @@ -0,0 +1,8 @@ +# Options for master/slave (small oplog) tests +executor: + fixtures: + mongodb_server: + fixture_class: smoke.MasterSlaveFixture + master_options: + oplogSize: 100 + slave_options: {} diff --git a/buildscripts/smoke_config/no_server.yaml b/buildscripts/smoke_config/no_server.yaml new file mode 100644 index 00000000000..3075d45a05b --- /dev/null +++ b/buildscripts/smoke_config/no_server.yaml @@ -0,0 +1,9 @@ +executor: + fixtures: + + # Global shell context + shell_globals: + fixture_class: smoke.GlobalShellFixture + + testers: + js_test: {} diff --git a/buildscripts/smoke_config/replicasets.yaml b/buildscripts/smoke_config/replicasets.yaml new file mode 100644 index 00000000000..316b5e47ac3 --- /dev/null +++ b/buildscripts/smoke_config/replicasets.yaml @@ -0,0 +1,11 @@ +# Replica set tests +tests: + roots: + - ./jstests/replsets/*.js +executor: + fixtures: + shell_globals: + fixture_class: smoke.GlobalShellFixture + testers: + jstest: {} + diff --git a/buildscripts/smoke_config/sharding.yaml b/buildscripts/smoke_config/sharding.yaml new file mode 100644 index 00000000000..1ca5f31a5e2 --- /dev/null +++ b/buildscripts/smoke_config/sharding.yaml @@ -0,0 +1,11 @@ +# Sharding tests +tests: + roots: + - ./jstests/sharding/*.js +executor: + fixtures: + shell_globals: + fixture_class: smoke.GlobalShellFixture + testers: + jstest: {} + diff --git a/buildscripts/smoke_config/unittests.yaml b/buildscripts/smoke_config/unittests.yaml new file mode 100644 index 00000000000..b127a79bdf9 --- /dev/null +++ b/buildscripts/smoke_config/unittests.yaml @@ -0,0 +1,7 @@ +tests: + # Generated by SCons + roots: + - build/unittests.json +executor: + testers: + exe_test: {} diff --git a/buildscripts/smoke_config/with_server.yaml b/buildscripts/smoke_config/with_server.yaml new file mode 100644 index 00000000000..4ea65b57f55 --- /dev/null +++ b/buildscripts/smoke_config/with_server.yaml @@ -0,0 +1,15 @@ +executor: + fixtures: + + # Single MongoD running in background + mongodb_server: + fixture_class: smoke.SingleMongoDFixture + mongod_options: + nopreallocj: '' + + # Global shell context + shell_globals: + fixture_class: smoke.GlobalShellFixture + + testers: + js_test: {} |