def test_u_commas(self):
     "-u mochitest-webgl,gtest sets unittests=both"
     tos = TryOptionSyntax('try: -u mochitest-webgl,gtest', graph_with_jobs)
     self.assertEqual(
         sorted(tos.unittests),
         sorted([
             {
                 'test': 'mochitest-webgl'
             },
             {
                 'test': 'gtest'
             },
         ]))
Exemple #2
0
 def test_u_chunks_platforms(self):
     "-u gtest-1[linux,win32] selects the linux and win32 platforms for chunk 1 of gtest"
     parameters = parse_message('try: -u gtest-1[linux,win32]')
     tos = TryOptionSyntax(parameters, graph_with_jobs, GRAPH_CONFIG)
     self.assertEqual(
         sorted(tos.unittests),
         sorted([
             {
                 'test': 'gtest',
                 'platforms': ['linux', 'win32'],
                 'only_chunks': set('1')
             },
         ]))
Exemple #3
0
 def test_u_alias(self):
     "-u mochitest-gl sets unittests=[mochitest-webgl*]"
     parameters = parse_message('try: -u mochitest-gl')
     tos = TryOptionSyntax(parameters, graph_with_jobs, GRAPH_CONFIG)
     self.assertEqual(tos.unittests, [{
         'test': t
     } for t in [
         'mochitest-webgl1-core',
         'mochitest-webgl1-ext',
         'mochitest-webgl2-core',
         'mochitest-webgl2-deqp',
         'mochitest-webgl2-ext',
     ]])
Exemple #4
0
 def test_u_commas(self):
     "-u mochitest-webgl1-core,gtest sets unittests=both"
     parameters = parse_message('try: -u mochitest-webgl1-core,gtest')
     tos = TryOptionSyntax(parameters, graph_with_jobs, GRAPH_CONFIG)
     self.assertEqual(
         sorted(tos.unittests),
         sorted([
             {
                 'test': 'mochitest-webgl1-core'
             },
             {
                 'test': 'gtest'
             },
         ]))
 def test_message_without_try(self):
     "Given a non-try message, it should return an empty value"
     tos = TryOptionSyntax('Bug 1234: frobnicte the foo', graph_with_jobs)
     self.assertEqual(tos.build_types, [])
     self.assertEqual(tos.jobs, [])
     self.assertEqual(tos.unittests, [])
     self.assertEqual(tos.talos, [])
     self.assertEqual(tos.platforms, [])
     self.assertEqual(tos.trigger_tests, 0)
     self.assertEqual(tos.talos_trigger_tests, 0)
     self.assertEqual(tos.env, [])
     self.assertFalse(tos.profile)
     self.assertIsNone(tos.tag)
     self.assertFalse(tos.no_retry)
 def test_u_platforms_negated_pretty(self):
     "-u gtest[Ubuntu,-x64] selects just linux for gtest"
     parameters = {
         'try_options': parse_message('try: -u gtest[Ubuntu,-x64]')
     }
     tos = TryOptionSyntax(parameters, graph_with_jobs, GRAPH_CONFIG)
     self.assertEqual(
         sorted(tos.unittests),
         sorted([
             {
                 'test': 'gtest',
                 'platforms': ['linux32']
             },
         ]))
 def test_u_platforms(self):
     "-u gtest[linux,win32] selects the linux and win32 platforms for gtest"
     parameters = {
         'try_options': parse_message('try: -u gtest[linux,win32]')
     }
     tos = TryOptionSyntax(parameters, graph_with_jobs, GRAPH_CONFIG)
     self.assertEqual(
         sorted(tos.unittests),
         sorted([
             {
                 'test': 'gtest',
                 'platforms': ['linux', 'win32']
             },
         ]))
 def test_u_platforms_pretty(self):
     """-u gtest[Ubuntu] selects the linux, linux64, linux64-asan, linux64-stylo-disabled,
     and linux64-stylo-sequential platforms for gtest"""
     tos = TryOptionSyntax('try: -u gtest[Ubuntu]', graph_with_jobs)
     self.assertEqual(
         sorted(tos.unittests),
         sorted([
             {
                 'test':
                 'gtest',
                 'platforms': [
                     'linux32', 'linux64', 'linux64-asan',
                     'linux64-stylo-disabled', 'linux64-stylo-sequential'
                 ]
             },
         ]))
 def test_u_commas(self):
     "-u mochitest-webgl,gtest sets unittests=both"
     parameters = {
         'try_options': parse_message('try: -u mochitest-webgl,gtest')
     }
     tos = TryOptionSyntax(parameters, graph_with_jobs)
     self.assertEqual(
         sorted(tos.unittests),
         sorted([
             {
                 'test': 'mochitest-webgl'
             },
             {
                 'test': 'gtest'
             },
         ]))
Exemple #10
0
 def test_u_platforms_pretty(self):
     """-u gtest[Ubuntu] selects the linux, linux64 and linux64-asan
     platforms for gtest"""
     parameters = parse_message('try: -u gtest[Ubuntu]')
     tos = TryOptionSyntax(parameters, graph_with_jobs, GRAPH_CONFIG)
     self.assertEqual(
         sorted(tos.unittests),
         sorted([
             {
                 'test':
                 'gtest',
                 'platforms': [
                     'linux32', 'linux64', 'linux64-asan', 'linux1804-64',
                     'linux1804-64-asan'
                 ]
             },
         ]))
 def test_p_linux_win32(self):
     "-p linux,win32 sets platforms=['linux', 'linux-ridealong', 'win32']"
     parameters = {'try_options': parse_message('try: -p linux,win32')}
     tos = TryOptionSyntax(parameters, graph_with_jobs, GRAPH_CONFIG)
     self.assertEqual(sorted(tos.platforms),
                      ['linux', 'linux-ridealong', 'win32'])
 def test_p_all(self):
     "-p all sets platforms=None"
     parameters = {'try_options': parse_message('try: -p all')}
     tos = TryOptionSyntax(parameters, graph_with_jobs, GRAPH_CONFIG)
     self.assertEqual(tos.platforms, None)
 def test_j_twice(self):
     "-j job1 -j job2 sets jobs=job1, job2"
     parameters = {'try_options': parse_message('try: -j job1 -j job2')}
     tos = TryOptionSyntax(parameters, graph_with_jobs, GRAPH_CONFIG)
     self.assertEqual(sorted(tos.jobs), sorted(['job1', 'job2']))
 def test_talos_trigger_tests(self):
     "--rebuild-talos 10 sets talos_trigger_tests"
     parameters = {'try_options': parse_message('try: --rebuild-talos 10')}
     tos = TryOptionSyntax(parameters, graph_with_jobs, GRAPH_CONFIG)
     self.assertEqual(tos.talos_trigger_tests, 10)
 def test_fail_email(self):
     "--failure-emails sets notifications"
     parameters = {'try_options': parse_message('try: --failure-emails')}
     tos = TryOptionSyntax(parameters, graph_with_jobs, GRAPH_CONFIG)
     self.assertEqual(tos.notifications, 'failure')
 def test_no_retry(self):
     "--no-retry sets no_retry to true"
     tos = TryOptionSyntax('try: --no-retry', graph_with_jobs)
     self.assertTrue(tos.no_retry)
 def test_tag(self):
     "--tag TAG sets tag to TAG value"
     tos = TryOptionSyntax('try: --tag tagName', graph_with_jobs)
     self.assertEqual(tos.tag, 'tagName')
 def test_profile(self):
     "--geckoProfile sets profile to true"
     tos = TryOptionSyntax('try: --geckoProfile', graph_with_jobs)
     self.assertTrue(tos.profile)
 def test_setenv(self):
     "--setenv VAR=value adds a environment variables setting to env"
     tos = TryOptionSyntax('try: --setenv VAR1=value1 --setenv VAR2=value2',
                           graph_with_jobs)
     self.assertEqual(tos.env, ['VAR1=value1', 'VAR2=value2'])
 def test_no_email(self):
     "no email settings don't set notifications"
     tos = TryOptionSyntax('try:', graph_with_jobs)
     self.assertEqual(tos.notifications, None)
 def test_t_none(self):
     "-t none sets talos=[]"
     parameters = {'try_options': parse_message('try: -t none')}
     tos = TryOptionSyntax(parameters, graph_with_jobs, GRAPH_CONFIG)
     self.assertEqual(sorted(tos.talos), [])
 def test_profile(self):
     "--geckoProfile sets profile to true"
     parameters = {'try_options': parse_message('try: --geckoProfile')}
     tos = TryOptionSyntax(parameters, graph_with_jobs, GRAPH_CONFIG)
     self.assertTrue(tos.profile)
 def test_interactive(self):
     "--interactive sets interactive"
     parameters = {'try_options': parse_message('try: --interactive')}
     tos = TryOptionSyntax(parameters, graph_with_jobs, GRAPH_CONFIG)
     self.assertEqual(tos.interactive, True)
 def test_no_retry(self):
     "--no-retry sets no_retry to true"
     parameters = {'try_options': parse_message('try: --no-retry')}
     tos = TryOptionSyntax(parameters, graph_with_jobs, GRAPH_CONFIG)
     self.assertTrue(tos.no_retry)
 def test_no_email(self):
     "no email settings don't set notifications"
     parameters = {'try_options': parse_message('try:')}
     tos = TryOptionSyntax(parameters, graph_with_jobs, GRAPH_CONFIG)
     self.assertEqual(tos.notifications, None)
 def test_build_o(self):
     "--build o should produce build_types=['opt']"
     parameters = {'try_options': parse_message('try: --build o')}
     tos = TryOptionSyntax(parameters, graph_with_jobs, GRAPH_CONFIG)
     self.assertEqual(sorted(tos.build_types), ['opt'])
 def test_tag(self):
     "--tag TAG sets tag to TAG value"
     parameters = {'try_options': parse_message('try: --tag tagName')}
     tos = TryOptionSyntax(parameters, graph_with_jobs, GRAPH_CONFIG)
     self.assertEqual(tos.tag, 'tagName')
 def test_b_dx(self):
     "-b dx should produce build_types=['debug'], silently ignoring the x"
     parameters = {'try_options': parse_message('try: -b dx')}
     tos = TryOptionSyntax(parameters, graph_with_jobs, GRAPH_CONFIG)
     self.assertEqual(sorted(tos.build_types), ['debug'])
 def test_artifact(self):
     "--artifact sets artifact to true"
     parameters = {'try_options': parse_message('try: --artifact')}
     tos = TryOptionSyntax(parameters, graph_with_jobs, GRAPH_CONFIG)
     self.assertTrue(tos.artifact)
 def test_j_job(self):
     "-j somejob sets jobs=['somejob']"
     parameters = {'try_options': parse_message('try: -j somejob')}
     tos = TryOptionSyntax(parameters, graph_with_jobs, GRAPH_CONFIG)
     self.assertEqual(sorted(tos.jobs), ['somejob'])