-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SERVER-59012: Calculate FCV constants in resmoke
- Loading branch information
Showing
26 changed files
with
325 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
buildscripts/resmokelib/generate_fcv_constants/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
"""Generate FCV constants for consumption by non-C++ integration tests.""" | ||
import argparse | ||
|
||
from buildscripts.resmokelib.plugin import PluginInterface, Subcommand | ||
|
||
_COMMAND = "generate-fcv-constants" | ||
|
||
|
||
class GenerateFCVConstants(Subcommand): | ||
"""Interact with generating FCV constants.""" | ||
|
||
def __init__(self): | ||
"""Constructor.""" | ||
|
||
def execute(self) -> None: | ||
""" | ||
Work your magic. | ||
:return: None | ||
""" | ||
# This will cause multiversion constants to be generated. | ||
import buildscripts.resmokelib.multiversionconstants # pylint: disable=unused-import | ||
pass | ||
|
||
|
||
class GenerateFCVConstantsPlugin(PluginInterface): | ||
"""Interact with generating FCV constants.""" | ||
|
||
def add_subcommand(self, subparsers): | ||
""" | ||
Add 'generate-fcv-constants' subcommand. | ||
:param subparsers: argparse parser to add to | ||
:return: None | ||
""" | ||
# Can't hide this subcommand due to a Python bug. https://bugs.python.org/issue22848. | ||
subparsers.add_parser(_COMMAND, help=argparse.SUPPRESS) | ||
|
||
def parse(self, subcommand, parser, parsed_args, **kwargs): | ||
""" | ||
Return the FCV constants subcommand for execution. | ||
:param subcommand: equivalent to parsed_args.command | ||
:param parser: parser used | ||
:param parsed_args: output of parsing | ||
:param kwargs: additional args | ||
:return: None or a Subcommand | ||
""" | ||
if subcommand != _COMMAND: | ||
return None | ||
|
||
return GenerateFCVConstants() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.