diff options
author | Henrik Edin <henrik.edin@mongodb.com> | 2020-03-16 15:27:52 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-03-20 14:00:53 +0000 |
commit | 560f40b2bfcccd731708be9ed49676a2ca72a146 (patch) | |
tree | d665395f91d806632f2e62141ecb3633bc579905 | |
parent | aadfd71fcbc2ccb6bd6406a19fc9c33291774d2e (diff) | |
download | mongo-560f40b2bfcccd731708be9ed49676a2ca72a146.tar.gz |
SERVER-46364 Move errorcodes check to lint phase.
-rw-r--r-- | SConstruct | 18 | ||||
-rw-r--r-- | etc/evergreen.yml | 12 |
2 files changed, 20 insertions, 10 deletions
diff --git a/SConstruct b/SConstruct index e6a4f911790..a94374a1d40 100644 --- a/SConstruct +++ b/SConstruct @@ -4134,13 +4134,6 @@ incremental_link = Tool('incremental_link') if incremental_link.exists(env): incremental_link(env) -def checkErrorCodes(): - import buildscripts.errorcodes as x - if x.check_error_codes() == False: - env.FatalError("next id to use: {0}", x.get_next_code()) - -checkErrorCodes() - # Resource Files are Windows specific def env_windows_resource_file(env, path): if env.TargetOSIs('windows'): @@ -4219,12 +4212,17 @@ lint_py = env.Command( action="$PYTHON ${SOURCES[0]} lint", ) -env.Alias( "lint" , [ lint_py, eslint, clang_format, pylinters ] ) -env.Alias( "lint-fast" , [ eslint, clang_format, pylinters ] ) +lint_errorcodes = env.Command( + target="#lint-errorcodes", + source=["buildscripts/errorcodes.py"], + action="$PYTHON ${SOURCES[0]} --quiet", +) + +env.Alias( "lint" , [ lint_py, eslint, clang_format, pylinters, lint_errorcodes ] ) +env.Alias( "lint-fast" , [ eslint, clang_format, pylinters, lint_errorcodes ] ) env.AlwaysBuild( "lint" ) env.AlwaysBuild( "lint-fast" ) - # ---- INSTALL ------- def getSystemInstallName(): diff --git a/etc/evergreen.yml b/etc/evergreen.yml index 4c2ccf59f78..0841b2c9109 100644 --- a/etc/evergreen.yml +++ b/etc/evergreen.yml @@ -4487,6 +4487,17 @@ tasks: ${activate_virtualenv} find buildscripts etc jstests -name '*.y*ml' -exec yamllint -c etc/yamllint_config.yml {} + +- name: lint_errorcodes + commands: + - command: manifest.load + - func: "git get project" + - func: "set task expansion macros" + - func: "set up virtualenv" + - func: "upload pip requirements" + - func: "scons lint" + vars: + targets: lint-errorcodes + - name: burn_in_tests_gen commands: - command: manifest.load @@ -9900,6 +9911,7 @@ buildvariants: - name: lint_cpplint - name: lint_fuzzer_sanity_patch - name: lint_yaml + - name: lint_errorcodes - name: burn_in_tests_gen - name: burn_in_tests_multiversion_gen - name: .aggfuzzer |