Skip to content

Commit

Permalink
Make tests independent of the default value for --experimental_ui
Browse files Browse the repository at this point in the history
In preparation of experimental UI becoming the default UI for bazel,
change some tests that depend on specifics of the current UI to explicitly
specify the UI to use.

Change-Id: If976c3eccd19c4a523c7eb1b4c4355ab2e5f9371
PiperOrigin-RevId: 172340189
  • Loading branch information
aehlig authored and buchgr committed Oct 18, 2017
1 parent 30f219b commit 044bc6d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/test/py/bazel/action_temp_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,11 @@ def _CreateWorkspace(self, build_flags=None):

def _SpawnStrategies(self):
"""Returns the list of supported --spawn_strategy values."""
exit_code, _, stderr = self.RunBazel(
['build', '--color=no', '--curses=no', '--spawn_strategy=foo'])
# TODO(b/37617303): make test UI-independent
exit_code, _, stderr = self.RunBazel([
'build', '--color=no', '--curses=no', '--spawn_strategy=foo',
'--noexperimental_ui'
])
self.AssertExitCode(exit_code, 2, stderr)
pattern = re.compile(
r'^ERROR:.*is an invalid value for.*Valid values are: (.*)\.$')
Expand All @@ -141,8 +144,9 @@ def _ReadFile(path):
self.AssertExitCode(exit_code, 0, stderr)
bazel_bin = stdout[0]

# TODO(b/37617303): make test UI-independent
exit_code, _, stderr = self.RunBazel([
'build', '--verbose_failures',
'build', '--verbose_failures', '--noexperimental_ui',
'--spawn_strategy=%s' % strategy, '//foo:genrule', '//foo:skylark'
])
self.AssertExitCode(exit_code, 0, stderr)
Expand Down

0 comments on commit 044bc6d

Please sign in to comment.