summaryrefslogtreecommitdiff
path: root/buildscripts/tests
diff options
context:
space:
mode:
authorYves Duhem <yves.duhem@mongodb.com>2017-08-02 17:25:19 -0400
committerYves Duhem <yves.duhem@mongodb.com>2017-08-02 17:25:19 -0400
commitd773e7419f3c66ce0d8c1ab2b6c8e8cf9fdb7b17 (patch)
tree1ca9d20d90885db4bbb6efaaaec1e03345713275 /buildscripts/tests
parent0334cb2bf602ec0123594b59504b9b3e0a099899 (diff)
downloadmongo-d773e7419f3c66ce0d8c1ab2b6c8e8cf9fdb7b17.tar.gz
SERVER-30308 Handle absent test_flags in combined_resmoke_args
Diffstat (limited to 'buildscripts/tests')
-rw-r--r--buildscripts/tests/ciconfig/evergreen.yml6
-rw-r--r--buildscripts/tests/ciconfig/test_evergreen.py19
2 files changed, 22 insertions, 3 deletions
diff --git a/buildscripts/tests/ciconfig/evergreen.yml b/buildscripts/tests/ciconfig/evergreen.yml
index 9777fb5ef46..7931bf7a586 100644
--- a/buildscripts/tests/ciconfig/evergreen.yml
+++ b/buildscripts/tests/ciconfig/evergreen.yml
@@ -148,3 +148,9 @@ buildvariants:
- name: resmoke_task
distros:
- pdp-11
+- name: debian
+ display_name: Debian
+ run_on:
+ - debian-stretch
+ tasks:
+ - name: resmoke_task
diff --git a/buildscripts/tests/ciconfig/test_evergreen.py b/buildscripts/tests/ciconfig/test_evergreen.py
index 56de9bca3d3..294c313c447 100644
--- a/buildscripts/tests/ciconfig/test_evergreen.py
+++ b/buildscripts/tests/ciconfig/test_evergreen.py
@@ -43,10 +43,11 @@ class TestEvergreenProjectConfig(unittest.TestCase):
self.assertIn("resmoke_task", self.conf.task_names)
def test_list_variants(self):
- self.assertEqual(2, len(self.conf.variants))
- self.assertEqual(2, len(self.conf.variant_names))
+ self.assertEqual(3, len(self.conf.variants))
+ self.assertEqual(3, len(self.conf.variant_names))
self.assertIn("osx-108", self.conf.variant_names)
self.assertIn("ubuntu", self.conf.variant_names)
+ self.assertIn("debian", self.conf.variant_names)
def test_get_variant(self):
variant = self.conf.get_variant("osx-108")
@@ -55,10 +56,11 @@ class TestEvergreenProjectConfig(unittest.TestCase):
self.assertEqual("osx-108", variant.name)
def test_list_distro_names(self):
- self.assertEqual(3, len(self.conf.distro_names))
+ self.assertEqual(4, len(self.conf.distro_names))
self.assertIn("localtestdistro", self.conf.distro_names)
self.assertIn("ubuntu1404-test", self.conf.distro_names)
self.assertIn("pdp-11", self.conf.distro_names)
+ self.assertIn("debian-stretch", self.conf.distro_names)
class TestTask(unittest.TestCase):
@@ -177,9 +179,20 @@ class TestVariant(unittest.TestCase):
self.assertEqual(variant_ubuntu, task.variant)
self.assertIn(task_name, variant_ubuntu.task_names)
+ # Check combined_resmoke_args when test_flags is set on the variant.
resmoke_task = variant_ubuntu.get_task("resmoke_task")
self.assertEqual("--suites=somesuite --storageEngine=mmapv1 --param=value --ubuntu",
resmoke_task.combined_resmoke_args)
+ # Check combined_resmoke_args when the task doesn't have resmoke_args.
+ passing_task = variant_ubuntu.get_task("passing_test")
+ self.assertIsNone(passing_task.combined_resmoke_args)
+
+ # Check combined_resmoke_args when test_flags is not set on the variant.
+ variant_debian = self.conf.get_variant("debian")
+ resmoke_task = variant_debian.get_task("resmoke_task")
+ self.assertEqual("--suites=somesuite --storageEngine=mmapv1",
+ resmoke_task.combined_resmoke_args)
+
if __name__ == "__main__":
unittest.main()