diff options
-rw-r--r-- | buildscripts/idl/run_tests.py | 9 | ||||
-rw-r--r-- | buildscripts/idl/tests/test_binder.py | 2 | ||||
-rw-r--r-- | buildscripts/idl/tests/test_parser.py | 2 | ||||
-rw-r--r-- | etc/evergreen.yml | 22 |
4 files changed, 7 insertions, 28 deletions
diff --git a/buildscripts/idl/run_tests.py b/buildscripts/idl/run_tests.py index 9f1aaa11f92..cf04f7fee5a 100644 --- a/buildscripts/idl/run_tests.py +++ b/buildscripts/idl/run_tests.py @@ -14,11 +14,10 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # """ -IDL Unit Test runner. +IDL Unit Test runner Generates a file called results.xml in the XUnit format. """ -from __future__ import absolute_import, print_function import sys import unittest @@ -33,8 +32,10 @@ def run_tests(): # my-py type information. all_tests = unittest.defaultTestLoader.discover(start_dir="tests") # type: ignore - runner = XMLTestRunner(verbosity=2, failfast=False, output='results') - result = runner.run(all_tests) + with open("results.xml", "wb") as output: + + runner = XMLTestRunner(verbosity=2, failfast=False, output=output) + result = runner.run(all_tests) sys.exit(not result.wasSuccessful()) diff --git a/buildscripts/idl/tests/test_binder.py b/buildscripts/idl/tests/test_binder.py index 6b13e3598b9..6048f136a20 100644 --- a/buildscripts/idl/tests/test_binder.py +++ b/buildscripts/idl/tests/test_binder.py @@ -24,7 +24,7 @@ import unittest if __package__ is None: import sys from os import path - sys.path.append(path.dirname(path.abspath(__file__))) + sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) from context import idl import testcase else: diff --git a/buildscripts/idl/tests/test_parser.py b/buildscripts/idl/tests/test_parser.py index 9faf7ce589b..9a3af5c5747 100644 --- a/buildscripts/idl/tests/test_parser.py +++ b/buildscripts/idl/tests/test_parser.py @@ -24,7 +24,7 @@ import unittest if __package__ is None: import sys from os import path - sys.path.append(path.dirname(path.abspath(__file__))) + sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) from context import idl import testcase else: diff --git a/etc/evergreen.yml b/etc/evergreen.yml index 3f0c4218ebf..488c70a2ad0 100644 --- a/etc/evergreen.yml +++ b/etc/evergreen.yml @@ -727,17 +727,6 @@ functions: content_type: ${content_type|application/x-gzip} display_name: Generated Tests - Execution ${execution} - "run idl tests" : - - command: shell.exec - type: test - params: - working_dir: src - script: | - set -o verbose - set -o errexit - - ${python|/opt/mongodbtoolchain/v2/bin/python2} buildscripts/idl/run_tests.py - "do multiversion setup" : command: shell.exec params: @@ -928,9 +917,6 @@ post: - command: attach.results params: file_location: src/report.json - - command: attach.xunit_results - params: - file: "src/results/*.xml" - func: "kill processes" # Print out any Out of Memory killed process messages. - command: shell.exec @@ -2990,13 +2976,6 @@ tasks: resmoke_args: --suites=read_only_sharded --storageEngine=wiredTiger run_multiple_jobs: true -- name: idl_tests - depends_on: - - name: compile - commands: - - func: "do setup" - - func: "run idl tests" - - name: package depends_on: - name: compile @@ -5608,7 +5587,6 @@ buildvariants: - name: gle_auth_write_cmd - name: gle_auth_write_cmd_WT - name: httpinterface - - name: idl_tests - name: integration_tests_replset - name: integration_tests_sharded - name: integration_tests_standalone |