|
78 | 78 | _BUILD_STAGES_REPORT = "report"
|
79 | 79 | _BUILD_STAGES = [_BUILD_STAGES_START, _BUILD_STAGES_PROGRESS, _BUILD_STAGES_END, _BUILD_STAGES_REPORT]
|
80 | 80 |
|
81 |
| -_BUILD_AGAINST_SDK = "sdk" |
82 |
| -_BUILD_AGAINST_REPO = "repo" |
83 |
| - |
84 | 81 | FLAGS = flags.FLAGS
|
85 | 82 |
|
86 | 83 | flags.DEFINE_string(
|
|
112 | 109 | "Use a different token to remove the \"in-progress\" label,"
|
113 | 110 | "to allow the removal to trigger the \"Check Labels\" workflow.")
|
114 | 111 |
|
115 |
| -flags.DEFINE_string( |
116 |
| - "build_against", None, |
117 |
| - "Integration testapps could either build against packaged SDK or repo") |
118 |
| - |
119 | 112 |
|
120 | 113 | def test_start(token, issue_number, actor, commit, run_id):
|
121 | 114 | """In PR, when start testing, add comment and label \"tests: in-progress\""""
|
@@ -181,29 +174,26 @@ def test_end(token, issue_number, actor, commit, run_id, new_token):
|
181 | 174 | github.delete_label(new_token, issue_number, _LABEL_PROGRESS)
|
182 | 175 |
|
183 | 176 |
|
184 |
| -def test_report(token, actor, commit, run_id, build_against): |
| 177 | +def test_report(token, actor, commit, run_id): |
185 | 178 | """Update (create if not exist) a Daily Report in Issue.
|
186 | 179 | The Issue with title _REPORT_TITLE and label _REPORT_LABEL:
|
187 | 180 | https://github.com/firebase/firebase-unity-sdk/issues?q=is%3Aissue+label%3Anightly-testing
|
188 | 181 | """
|
189 | 182 | issue_number = _get_issue_number(token, _REPORT_TITLE, _REPORT_LABEL)
|
190 |
| - previous_comment = github.get_issue_body(token, issue_number) |
191 |
| - [previous_comment_repo, previous_comment_sdk] = previous_comment.split(_COMMENT_SUFFIX) |
192 | 183 | success_or_only_flakiness, log_summary = _get_summary_table(token, run_id)
|
193 |
| - if success_or_only_flakiness and not log_summary: |
194 |
| - # succeeded (without flakiness) |
195 |
| - title = _COMMENT_TITLE_SUCCEED |
196 |
| - comment = title + _get_description(actor, commit, run_id) |
| 184 | + if success_or_only_flakiness: |
| 185 | + if not log_summary: |
| 186 | + # succeeded (without flakiness) |
| 187 | + title = _COMMENT_TITLE_SUCCEED |
| 188 | + comment = title + _get_description(actor, commit, run_id) |
| 189 | + else: |
| 190 | + title = _COMMENT_TITLE_FLAKY |
| 191 | + comment = title + _get_description(actor, commit, run_id) + log_summary |
197 | 192 | else:
|
198 |
| - title = _COMMENT_TITLE_FLAKY |
| 193 | + title = _COMMENT_TITLE_FAIL |
199 | 194 | comment = title + _get_description(actor, commit, run_id) + log_summary
|
200 |
| - |
201 |
| - if build_against==_BUILD_AGAINST_REPO: |
202 |
| - comment = comment + _COMMENT_SUFFIX + previous_comment_sdk |
203 |
| - else: |
204 |
| - comment = previous_comment_repo + _COMMENT_SUFFIX + comment |
205 | 195 |
|
206 |
| - if _COMMENT_TITLE_SUCCEED: |
| 196 | + if title == _COMMENT_TITLE_SUCCEED: |
207 | 197 | github.close_issue(token, issue_number)
|
208 | 198 | else:
|
209 | 199 | github.open_issue(token, issue_number)
|
@@ -272,7 +262,7 @@ def main(argv):
|
272 | 262 | elif FLAGS.stage == _BUILD_STAGES_END:
|
273 | 263 | test_end(FLAGS.token, FLAGS.issue_number, FLAGS.actor, FLAGS.commit, FLAGS.run_id, FLAGS.new_token)
|
274 | 264 | elif FLAGS.stage == _BUILD_STAGES_REPORT:
|
275 |
| - test_report(FLAGS.token, FLAGS.actor, FLAGS.commit, FLAGS.run_id, FLAGS.build_against) |
| 265 | + test_report(FLAGS.token, FLAGS.actor, FLAGS.commit, FLAGS.run_id) |
276 | 266 | else:
|
277 | 267 | print("Invalid stage value. Valid value: " + ",".join(_BUILD_STAGES))
|
278 | 268 |
|
|
0 commit comments