diff options
author | Robert Guo <robert.guo@10gen.com> | 2015-07-13 11:00:02 -0400 |
---|---|---|
committer | Robert Guo <robert.guo@10gen.com> | 2015-07-24 11:07:06 -0400 |
commit | e4aa8caf29e77efccd488a602e6b98fc69b65b5a (patch) | |
tree | 60c73e172c07794b5ac3fb377d26427e0df41ba6 /buildscripts | |
parent | 2019fad68b7ff397af2d810af3e4a08bd122f713 (diff) | |
download | mongo-e4aa8caf29e77efccd488a602e6b98fc69b65b5a.tar.gz |
SERVER-19336 Add ESE tasks to Evergreen
Diffstat (limited to 'buildscripts')
-rw-r--r-- | buildscripts/resmokeconfig/suites/core_ese.yml | 22 | ||||
-rw-r--r-- | buildscripts/resmokeconfig/suites/ese.yml | 11 | ||||
-rw-r--r-- | buildscripts/resmokeconfig/suites/replica_sets_ese.yml | 18 | ||||
-rw-r--r-- | buildscripts/resmokeconfig/suites/sharding_ese.yml | 19 | ||||
-rw-r--r-- | buildscripts/resmokelib/core/programs.py | 25 |
5 files changed, 84 insertions, 11 deletions
diff --git a/buildscripts/resmokeconfig/suites/core_ese.yml b/buildscripts/resmokeconfig/suites/core_ese.yml new file mode 100644 index 00000000000..4bdcab894c2 --- /dev/null +++ b/buildscripts/resmokeconfig/suites/core_ese.yml @@ -0,0 +1,22 @@ +# Section that is ignored by resmoke.py. +config_variables: +- &keyFile src/mongo/db/modules/enterprise/jstests/libs/ekf2 + +selector: + js_test: + roots: + - jstests/core/*.js + +executor: + js_test: + hooks: + - class: CleanEveryN + n: 20 + fixture: + class: MongoDFixture + mongod_options: + enableEncryption: '' + encryptionKeyFile: *keyFile + nopreallocj: '' + set_parameters: + enableTestCommands: 1 diff --git a/buildscripts/resmokeconfig/suites/ese.yml b/buildscripts/resmokeconfig/suites/ese.yml new file mode 100644 index 00000000000..965bff860a8 --- /dev/null +++ b/buildscripts/resmokeconfig/suites/ese.yml @@ -0,0 +1,11 @@ +selector: + js_test: + roots: + - src/mongo/db/modules/*/jstests/encryptdb/*.js + +# Encrypted storage engine tests start their own mongod processes +executor: + js_test: + config: + shell_options: + nodb: '' diff --git a/buildscripts/resmokeconfig/suites/replica_sets_ese.yml b/buildscripts/resmokeconfig/suites/replica_sets_ese.yml new file mode 100644 index 00000000000..c828451cdbf --- /dev/null +++ b/buildscripts/resmokeconfig/suites/replica_sets_ese.yml @@ -0,0 +1,18 @@ +# Section that is ignored by resmoke.py. +config_variables: +- &keyFile src/mongo/db/modules/enterprise/jstests/libs/ekf2 + +selector: + js_test: + roots: + - jstests/replsets/*.js + +executor: + js_test: + config: + shell_options: + nodb: '' + global_vars: + TestData: + enableEncryption: '' + encryptionKeyFile: *keyFile diff --git a/buildscripts/resmokeconfig/suites/sharding_ese.yml b/buildscripts/resmokeconfig/suites/sharding_ese.yml new file mode 100644 index 00000000000..8494a898a6b --- /dev/null +++ b/buildscripts/resmokeconfig/suites/sharding_ese.yml @@ -0,0 +1,19 @@ +# Section that is ignored by resmoke.py. +config_variables: +- &keyFile src/mongo/db/modules/enterprise/jstests/libs/ekf2 + +selector: + js_test: + roots: + - jstests/sharding/*.js + - jstests/sharding/replset_config/*.js + +executor: + js_test: + config: + shell_options: + nodb: '' + global_vars: + TestData: + enableEncryption: '' + encryptionKeyFile: *keyFile diff --git a/buildscripts/resmokelib/core/programs.py b/buildscripts/resmokelib/core/programs.py index 51c4b92f202..bd3716e805d 100644 --- a/buildscripts/resmokelib/core/programs.py +++ b/buildscripts/resmokelib/core/programs.py @@ -61,8 +61,7 @@ def mongod_program(logger, executable=None, process_kwargs=None, **kwargs): # Apply the rest of the command line arguments. _apply_kwargs(args, kwargs) - if "keyFile" in kwargs: - _set_keyfile_permissions(kwargs["keyFile"]) + _set_keyfile_permissions(kwargs) process_kwargs = utils.default_if_none(process_kwargs, {}) return _process.Process(logger, args, **process_kwargs) @@ -89,8 +88,7 @@ def mongos_program(logger, executable=None, process_kwargs=None, **kwargs): # Apply the rest of the command line arguments. _apply_kwargs(args, kwargs) - if "keyFile" in kwargs: - _set_keyfile_permissions(kwargs["keyFile"]) + _set_keyfile_permissions(kwargs) process_kwargs = utils.default_if_none(process_kwargs, {}) return _process.Process(logger, args, **process_kwargs) @@ -147,8 +145,7 @@ def mongo_shell_program(logger, executable=None, filename=None, process_kwargs=N # Have the mongos shell run the specified file. args.append(filename) - if "keyFile" in global_vars["TestData"]: - _set_keyfile_permissions(global_vars["TestData"]["keyFile"]) + _set_keyfile_permissions(global_vars["TestData"]) process_kwargs = utils.default_if_none(process_kwargs, {}) return _process.Process(logger, args, **process_kwargs) @@ -230,12 +227,18 @@ def _apply_kwargs(args, kwargs): args.append(arg_value) -def _set_keyfile_permissions(keyfile_path): +def _set_keyfile_permissions(opts): """ - Change the permissions on 'keyfile_path' to 600, i.e. only the user - can read and write the file. + Change the permissions of keyfiles in 'opts' to 600, i.e. only the + user can read and write the file. This necessary to avoid having the mongod/mongos fail to start up - because "permissions on 'keyfile_path' are too open". + because "permissions on the keyfiles are too open". + + We can't permanently set the keyfile permissions because git is not + aware of them. """ - os.chmod(keyfile_path, stat.S_IRUSR | stat.S_IWUSR) + if "keyFile" in opts: + os.chmod(opts["keyFile"], stat.S_IRUSR | stat.S_IWUSR) + if "encryptionKeyFile" in opts: + os.chmod(opts["encryptionKeyFile"], stat.S_IRUSR | stat.S_IWUSR) |