Exemplo n.º 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'])
Exemplo n.º 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'])
Exemplo n.º 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'])
Exemplo n.º 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'])
Exemplo n.º 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')
Exemplo n.º 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)
Exemplo n.º 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')
 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)
 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']))
Exemplo n.º 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'])
Exemplo n.º 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'])
Exemplo n.º 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)
Exemplo n.º 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')
Exemplo n.º 14
0
 def test_profile(self):
     "--geckoProfile sets profile to true"
     tos = TryOptionSyntax('try: --geckoProfile', graph_with_jobs)
     self.assertTrue(tos.profile)
Exemplo n.º 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]))
Exemplo n.º 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'])
Exemplo n.º 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'}]))
Exemplo n.º 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), [])
Exemplo n.º 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)
Exemplo n.º 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')
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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'])
Exemplo n.º 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)
Exemplo n.º 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'}]))
Exemplo n.º 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'])
Exemplo n.º 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), [])
Exemplo n.º 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'])
Exemplo n.º 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)