Laurence Urhegyi pushed to branch laurence/update-readme at BuildStream / buildstream
Commits:
-
e0238689
by Tristan Van Berkom at 2019-02-22T09:06:03Z
-
1170f18c
by Tristan Van Berkom at 2019-02-22T10:05:35Z
-
e03c7726
by Laurence Urhegyi at 2019-02-22T12:49:12Z
9 changed files:
- + .gitlab/merge_request_templates/stale_MR_message
- CONTRIBUTING.rst
- tests/frontend/overlaps.py
- + tests/frontend/overlaps/sub-collect.bst
- + tests/frontend/overlaps/sub-project/a-sub.bst
- + tests/frontend/overlaps/sub-project/files/a/file3
- + tests/frontend/overlaps/sub-project/files/z/file1
- + tests/frontend/overlaps/sub-project/files/z/file2
- + tests/frontend/overlaps/sub-project/z-sub.bst
Changes:
| 1 |
+ The below is simply some boilerplate to text for use when commenting on
|
|
| 2 |
+ MRs that have not seen enough recent activity.
|
|
| 3 |
+
|
|
| 4 |
+ Hi, thanks for your contribution! Unfortunately this MR is now over
|
|
| 5 |
+ a month without an update from the author, as per our policy I'm WIP'ing
|
|
| 6 |
+ this to keep our queue tidy. Please do clear the WIP status if you come
|
|
| 7 |
+ back to work on it. Cheers!
|
|
| 8 |
+ |
|
| 9 |
+ Hi! Since another month has gone by on this MR without an update from the
|
|
| 10 |
+ author, as per our policy I'm going to close this to keep our queue tidy.
|
|
| 11 |
+ Please do re-open the MR if you come back to work on it. Cheers!
|
|
| \ No newline at end of file |
| ... | ... | @@ -105,6 +105,15 @@ Consider marking a merge request as WIP again if you are taking a while to |
| 105 | 105 |
address a review point. This signals that the next action is on you, and it
|
| 106 | 106 |
won't appear in a reviewer's search for non-WIP merge requests to review.
|
| 107 | 107 |
|
| 108 |
+As a general rule of thumb, after a month of no activity from the submitter of
|
|
| 109 |
+a non-WIP MR, we'll put it back into WIP with a polite note. Then after another
|
|
| 110 |
+month with no activity we'll close the MR off entirely with another note.
|
|
| 111 |
+In this way we are trying to ensure all of the MRs in our backlog are relevant
|
|
| 112 |
+and up to date. We have some `boilerplate text
|
|
| 113 |
+<https://gitlab.com/BuildStream/buildstream/blob/master/.gitlab/merge_request_templates/stale_MR_message.md>`_,
|
|
| 114 |
+to help us when writing these notes.
|
|
| 115 |
+ |
|
| 116 |
+ |
|
| 108 | 117 |
|
| 109 | 118 |
Organized commits
|
| 110 | 119 |
~~~~~~~~~~~~~~~~~
|
| ... | ... | @@ -4,6 +4,7 @@ from buildstream.plugintestutils.runcli import cli |
| 4 | 4 |
from buildstream._exceptions import ErrorDomain
|
| 5 | 5 |
from buildstream import _yaml
|
| 6 | 6 |
from buildstream.plugin import CoreWarnings
|
| 7 |
+from tests.testutils import generate_junction
|
|
| 7 | 8 |
|
| 8 | 9 |
# Project directory
|
| 9 | 10 |
DATA_DIR = os.path.join(
|
| ... | ... | @@ -11,14 +12,11 @@ DATA_DIR = os.path.join( |
| 11 | 12 |
"overlaps"
|
| 12 | 13 |
)
|
| 13 | 14 |
|
| 14 |
-project_template = {
|
|
| 15 |
- "name": "test",
|
|
| 16 |
- "element-path": "."
|
|
| 17 |
-}
|
|
| 18 | 15 |
|
| 19 |
- |
|
| 20 |
-def gen_project(project_dir, fail_on_overlap, use_fatal_warnings=True):
|
|
| 21 |
- template = dict(project_template)
|
|
| 16 |
+def gen_project(project_dir, fail_on_overlap, use_fatal_warnings=True, project_name="test"):
|
|
| 17 |
+ template = {
|
|
| 18 |
+ "name": project_name
|
|
| 19 |
+ }
|
|
| 22 | 20 |
if use_fatal_warnings:
|
| 23 | 21 |
template["fatal-warnings"] = [CoreWarnings.OVERLAPS] if fail_on_overlap else []
|
| 24 | 22 |
else:
|
| ... | ... | @@ -89,3 +87,30 @@ def test_overlaps_script(cli, datafiles, use_fatal_warnings): |
| 89 | 87 |
result = cli.run(project=project_dir, silent=True, args=[
|
| 90 | 88 |
'build', 'script.bst'])
|
| 91 | 89 |
result.assert_success()
|
| 90 |
+ |
|
| 91 |
+ |
|
| 92 |
+@pytest.mark.datafiles(DATA_DIR)
|
|
| 93 |
+@pytest.mark.parametrize("project_policy", [('fail'), ('warn')])
|
|
| 94 |
+@pytest.mark.parametrize("subproject_policy", [('fail'), ('warn')])
|
|
| 95 |
+def test_overlap_subproject(cli, tmpdir, datafiles, project_policy, subproject_policy):
|
|
| 96 |
+ project_dir = str(datafiles)
|
|
| 97 |
+ subproject_dir = os.path.join(project_dir, 'sub-project')
|
|
| 98 |
+ junction_path = os.path.join(project_dir, 'sub-project.bst')
|
|
| 99 |
+ |
|
| 100 |
+ gen_project(project_dir, bool(project_policy == 'fail'), project_name='test')
|
|
| 101 |
+ gen_project(subproject_dir, bool(subproject_policy == 'fail'), project_name='subtest')
|
|
| 102 |
+ generate_junction(tmpdir, subproject_dir, junction_path)
|
|
| 103 |
+ |
|
| 104 |
+ # Here we have a dependency chain where the project element
|
|
| 105 |
+ # always overlaps with the subproject element.
|
|
| 106 |
+ #
|
|
| 107 |
+ # Test that overlap error vs warning policy for this overlap
|
|
| 108 |
+ # is always controlled by the project and not the subproject.
|
|
| 109 |
+ #
|
|
| 110 |
+ result = cli.run(project=project_dir, silent=True, args=['build', 'sub-collect.bst'])
|
|
| 111 |
+ if project_policy == 'fail':
|
|
| 112 |
+ result.assert_main_error(ErrorDomain.STREAM, None)
|
|
| 113 |
+ result.assert_task_error(ErrorDomain.PLUGIN, CoreWarnings.OVERLAPS)
|
|
| 114 |
+ else:
|
|
| 115 |
+ result.assert_success()
|
|
| 116 |
+ assert "WARNING [overlaps]" in result.stderr
|
| 1 |
+kind: compose
|
|
| 2 |
+ |
|
| 3 |
+depends:
|
|
| 4 |
+- filename: c.bst
|
|
| 5 |
+ type: build
|
|
| 6 |
+- filename: a-sub.bst
|
|
| 7 |
+ junction: sub-project.bst
|
|
| 8 |
+ type: build
|
|
| 9 |
+- filename: z-sub.bst
|
|
| 10 |
+ junction: sub-project.bst
|
|
| 11 |
+ type: build
|
| 1 |
+kind: import
|
|
| 2 |
+config:
|
|
| 3 |
+ source: /
|
|
| 4 |
+ target: /
|
|
| 5 |
+sources:
|
|
| 6 |
+- kind: local
|
|
| 7 |
+ path: "files/a"
|
| 1 |
+barny
|
| 1 |
+foo
|
| 1 |
+bar
|
| 1 |
+kind: import
|
|
| 2 |
+config:
|
|
| 3 |
+ source: /
|
|
| 4 |
+ target: /
|
|
| 5 |
+sources:
|
|
| 6 |
+- kind: local
|
|
| 7 |
+ path: "files/z"
|
