[SERVER-26897] resmoke - add support for prepending scripts to mongo eval list Created: 03/Nov/16  Updated: 06/Dec/17  Resolved: 27/Mar/17

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 3.5.6

Type: New Feature Priority: Major - P3
Reporter: Mark Benvenuto Assignee: Eddie Louie
Resolution: Done Votes: 0
Labels: tig-resmoke
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: TIG 2017-04-17
Participants:

 Description   

When resmoke.py creates the string for the --eval argument for mongo, it builds the string in the following order.

  1. List of global variables
  2. The "eval" field from YAML config

In the mongo-tools project, there is a need to override servers.js and servers_misc.js. In order to do this though, the loads for these files must proceed the global variable setting in the eval argument.

The tools do this via a new field called "eval_prepend":
See https://github.com/mongodb/mongo-tools/blob/a8800cf352f1efd5f442764a151586d1701dc9a2/test/qa-tests/buildscripts/resmokelib/core/programs.py#L162-L163

An example suite that uses this is the core suite: https://github.com/mongodb/mongo-tools/blob/a8800cf352f1efd5f442764a151586d1701dc9a2/test/qa-tests/buildscripts/resmokeconfig/suites/core.yml#L18



 Comments   
Comment by Githook User [ 27/Mar/17 ]

Author:

{u'username': u'elouie99', u'name': u'Eddie Louie', u'email': u'eddie.louie@mongodb.com'}

Message: SERVER-26897 Add resmoke.py support for prepending scripts to mongo eval list
Branch: master
https://github.com/mongodb/mongo/commit/9178a39893d993eadf70ce9be25374a506052999

Comment by Mark Benvenuto [ 07/Nov/16 ]

This ticket is about adding the one feature that mongo-tools needs in resmoke.py so it does not need to maintain a divergent fork of resmoke.py. Currently, mongo-tools as a copy of resmoke.py so that it can run its tests against the 3.2 and 3.4 branches. This change would make it easier to update the copy of resmoke.py that mongo-tools has in the future.

Comment by Max Hirschhorn [ 05/Nov/16 ]

mark.benvenuto, acm, what is the purpose of this ticket? Is it really about adding an eval_prepend field to the shell_options? If so, I think we need to have a larger conversation about trying to have the mongodb/mongo-tools repository not maintain a divergent fork of resmoke.py.

Generated at Thu Feb 08 04:13:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.