コード例 #1
0
 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'])
コード例 #2
0
 def test_apostrophe_in_message(self):
     "apostrophe does not break parsing"
     parameters = {'try_options': parse_message('Increase spammy log\'s log level. try: -b do')}
     tos = TryOptionSyntax(parameters, graph_with_jobs, GRAPH_CONFIG)
     self.assertEqual(sorted(tos.build_types), ['debug', 'opt'])
コード例 #3
0
 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'])
コード例 #4
0
 def test_setenv(self):
     "--setenv VAR=value adds a environment variables setting to env"
     parameters = {'try_options': parse_message(
         'try: --setenv VAR1=value1 --setenv VAR2=value2')}
     tos = TryOptionSyntax(parameters, graph_with_jobs, GRAPH_CONFIG)
     self.assertEqual(tos.env, ['VAR1=value1', 'VAR2=value2'])
コード例 #5
0
 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')
コード例 #6
0
 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)
コード例 #7
0
 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')
コード例 #8
0
 def test_j_all(self):
     "-j all sets jobs=None"
     parameters = parse_message('try: -j all')
     tos = TryOptionSyntax(parameters, graph_with_jobs, GRAPH_CONFIG)
     self.assertEqual(tos.jobs, None)
コード例 #9
0
 def test_j_twice(self):
     "-j job1 -j job2 sets jobs=job1, job2"
     parameters = parse_message('try: -j job1 -j job2')
     tos = TryOptionSyntax(parameters, graph_with_jobs, GRAPH_CONFIG)
     self.assertEqual(sorted(tos.jobs), sorted(['job1', 'job2']))
コード例 #10
0
 def test_b_d(self):
     "-b d should produce build_types=['debug']"
     parameters = parse_message('try: -b d')
     tos = TryOptionSyntax(parameters, graph_with_jobs, GRAPH_CONFIG)
     self.assertEqual(sorted(tos.build_types), ['debug'])
コード例 #11
0
 def test_j_job(self):
     "-j somejob sets jobs=['somejob']"
     parameters = parse_message('try: -j somejob')
     tos = TryOptionSyntax(parameters, graph_with_jobs, GRAPH_CONFIG)
     self.assertEqual(sorted(tos.jobs), ['somejob'])
コード例 #12
0
 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)
コード例 #13
0
 def test_tag(self):
     "--tag TAG sets tag to TAG value"
     tos = TryOptionSyntax('try: --tag tagName', graph_with_jobs)
     self.assertEqual(tos.tag, 'tagName')
コード例 #14
0
 def test_profile(self):
     "--geckoProfile sets profile to true"
     tos = TryOptionSyntax('try: --geckoProfile', graph_with_jobs)
     self.assertTrue(tos.profile)
コード例 #15
0
 def test_t_all(self):
     "-t all sets talos=[..whole list..]"
     parameters = {'try_options': parse_message('try: -t all')}
     tos = TryOptionSyntax(parameters, graph_with_jobs, GRAPH_CONFIG)
     self.assertEqual(sorted(tos.talos), sorted([{'test': t} for t in talos_tasks]))
コード例 #16
0
 def test_p_linux(self):
     "-p linux sets platforms=['linux', 'linux-ridealong']"
     parameters = parse_message('try: -p linux')
     tos = TryOptionSyntax(parameters, graph_with_jobs, GRAPH_CONFIG)
     self.assertEqual(tos.platforms, ['linux', 'linux-ridealong'])
コード例 #17
0
 def test_t_single(self):
     "-t mochitest-webgl sets talos=[mochitest-webgl]"
     parameters = {'try_options': parse_message('try: -t mochitest-webgl')}
     tos = TryOptionSyntax(parameters, graph_with_jobs, GRAPH_CONFIG)
     self.assertEqual(sorted(tos.talos), sorted([{'test': 'mochitest-webgl'}]))
コード例 #18
0
 def test_u_none(self):
     "-u none sets unittests=[]"
     parameters = parse_message('try: -u none')
     tos = TryOptionSyntax(parameters, graph_with_jobs, GRAPH_CONFIG)
     self.assertEqual(sorted(tos.unittests), [])
コード例 #19
0
 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)
コード例 #20
0
 def test_all_email(self):
     "--all-emails sets notifications"
     parameters = parse_message('try: --all-emails')
     tos = TryOptionSyntax(parameters, graph_with_jobs, GRAPH_CONFIG)
     self.assertEqual(tos.notifications, 'all')
コード例 #21
0
 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)
コード例 #22
0
 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)
コード例 #23
0
 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)
コード例 #24
0
 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'])
コード例 #25
0
 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)
コード例 #26
0
 def test_u_single(self):
     "-u mochitest-webgl1-core sets unittests=[mochitest-webgl1-core]"
     parameters = {'try_options': parse_message('try: -u mochitest-webgl1-core')}
     tos = TryOptionSyntax(parameters, graph_with_jobs, GRAPH_CONFIG)
     self.assertEqual(sorted(tos.unittests), sorted([{'test': 'mochitest-webgl1-core'}]))
コード例 #27
0
 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'])
コード例 #28
0
 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), [])
コード例 #29
0
 def test_j_jobs(self):
     "-j job1,job2 sets jobs=['job1', 'job2']"
     parameters = {'try_options': parse_message('try: -j job1,job2')}
     tos = TryOptionSyntax(parameters, graph_with_jobs, GRAPH_CONFIG)
     self.assertEqual(sorted(tos.jobs), ['job1', 'job2'])
コード例 #30
0
 def test_no_email(self):
     "no email settings don't set notifications"
     tos = TryOptionSyntax('try:', graph_with_jobs)
     self.assertEqual(tos.notifications, None)