summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Abrahams <jonathan@mongodb.com>2019-01-30 14:30:55 -0500
committerJonathan Abrahams <jonathan@mongodb.com>2019-01-30 16:06:06 -0500
commit7a6d64aa652987fc6bbbc60ead1b753008847c3b (patch)
tree8c7d91fa01bb89f714c863e4816e767936e219f3
parentac3f2f46c776d844e44d2cd31629ebc1eacf1638 (diff)
downloadmongo-7a6d64aa652987fc6bbbc60ead1b753008847c3b.tar.gz
SERVER-37373 Fully qualified files in suite YML do not run in Burn_in tests on Windows
-rw-r--r--buildscripts/resmokelib/selector.py2
-rw-r--r--buildscripts/tests/resmokelib/test_selector.py11
2 files changed, 11 insertions, 2 deletions
diff --git a/buildscripts/resmokelib/selector.py b/buildscripts/resmokelib/selector.py
index 68fa18a0324..b9f5686df8b 100644
--- a/buildscripts/resmokelib/selector.py
+++ b/buildscripts/resmokelib/selector.py
@@ -165,7 +165,7 @@ class _TestList(object):
else:
if not self._test_file_explorer.isfile(test):
raise ValueError("Unrecognized test file: {}".format(test))
- expanded_tests.append(test)
+ expanded_tests.append(os.path.normpath(test))
return expanded_tests
def include_files(self, include_files, force=False):
diff --git a/buildscripts/tests/resmokelib/test_selector.py b/buildscripts/tests/resmokelib/test_selector.py
index 852272aecee..639d6f74ea6 100644
--- a/buildscripts/tests/resmokelib/test_selector.py
+++ b/buildscripts/tests/resmokelib/test_selector.py
@@ -3,6 +3,7 @@
from __future__ import absolute_import
import fnmatch
+import os.path
import unittest
import buildscripts.resmokelib.parser as parser
@@ -168,6 +169,14 @@ class TestTestList(unittest.TestCase):
self.assertEqual(roots, selected)
self.assertEqual([], excluded)
+ def test_roots_normpath(self):
+ roots = ["dir/a/abc.js", "dir/b/xyz.js"]
+ test_list = selector._TestList(self.test_file_explorer, roots, tests_are_files=False)
+ selected, excluded = test_list.get_tests()
+ for root_file, selected_file in zip(roots, selected):
+ self.assertEqual(os.path.normpath(root_file), selected_file)
+ self.assertEqual([], excluded)
+
def test_roots_with_glob(self):
glob_roots = ["dir/subdir1/*.js"]
expected_roots = ["dir/subdir1/test11.js", "dir/subdir1/test12.js"]
@@ -563,7 +572,7 @@ class TestFilterTests(unittest.TestCase):
selected)
self.assertEqual(["dir/subdir2/test21.js"], excluded)
- def test_json_shcema_include_files(self):
+ def test_json_schema_include_files(self):
config = {
"roots": ["dir/subdir1/*.js", "dir/subdir2/*.js", "dir/subdir3/a/*.js"],
"include_files": ["dir/subdir2/test21.js"]