Skip to content
This repository has been archived by the owner on Dec 15, 2018. It is now read-only.

Commit

Permalink
added mandatory bazel test flag: --keep_going
Browse files Browse the repository at this point in the history
Summary: This will cause tests to be run even when a subset of files failed to build.

Reviewers: anupc

Reviewed By: anupc

Subscribers: changesbot, anupc, kylec, wwu

Differential Revision: https://tails.corp.dropbox.com/D229817
  • Loading branch information
Naphat Sanguansin committed Sep 19, 2016
1 parent 8a989e3 commit 23d6bce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion changes/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,8 @@ def create_app(_read_config=True, **config):
# List of mandatory flags to be passed to `bazel test`
app.config['BAZEL_MANDATORY_TEST_FLAGS'] = [
'--spawn_strategy=sandboxed',
'--genrule_strategy=sandboxed'
'--genrule_strategy=sandboxed',
'--keep_going',
]

# Jobsteps go from 'pending_allocation' to 'allocated' once an external scheduler claims them, and
Expand Down
4 changes: 2 additions & 2 deletions tests/changes/models/test_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def test_autogenerated_commands(self, get_config):
VCS_CHECKOUT_PARENT_REVISION="git checkout master^"
VCS_GET_CHANGED_FILES="git diff --name-only master^..master"
"/var/changes/input/collect-targets" --output-user-root="/bazel/root/path" --target-patterns=//aa/bb/cc/... --target-patterns=//aa/abc/... --test-flags=--spawn_strategy=sandboxed --test-flags=--genrule_strategy=sandboxed --jobs="8" 2> /dev/null
"/var/changes/input/collect-targets" --output-user-root="/bazel/root/path" --target-patterns=//aa/bb/cc/... --target-patterns=//aa/abc/... --test-flags=--spawn_strategy=sandboxed --test-flags=--genrule_strategy=sandboxed --test-flags=--keep_going --jobs="8" 2> /dev/null
""".strip()

assert len(implementation.commands) == 3
Expand Down Expand Up @@ -139,7 +139,7 @@ def test_autogenerated_commands_with_exclusions(self, get_config):
VCS_CHECKOUT_PARENT_REVISION="git checkout master^"
VCS_GET_CHANGED_FILES="git diff --name-only master^..master"
"/var/changes/input/collect-targets" --output-user-root="/bazel/root/path" --target-patterns=//foo/bar/baz/... --target-patterns=//bar/bax/... --exclude-tags=flaky --exclude-tags=another_tag --test-flags=--spawn_strategy=sandboxed --test-flags=--genrule_strategy=sandboxed --jobs="4" 2> /dev/null
"/var/changes/input/collect-targets" --output-user-root="/bazel/root/path" --target-patterns=//foo/bar/baz/... --target-patterns=//bar/bax/... --exclude-tags=flaky --exclude-tags=another_tag --test-flags=--spawn_strategy=sandboxed --test-flags=--genrule_strategy=sandboxed --test-flags=--keep_going --jobs="4" 2> /dev/null
""".strip()

mock_vcs = mock.Mock(spec=Vcs)
Expand Down

0 comments on commit 23d6bce

Please sign in to comment.