driazati commented on code in PR #12915:
URL: https://github.com/apache/tvm/pull/12915#discussion_r1014431148


##########
ci/scripts/github_skipped_tests_comment.py:
##########
@@ -114,18 +137,20 @@ def build_comment(
     if common_main_build["state"] != "success":
         return f"Unable to run tests bot because main failed to pass CI at 
{common_commit_sha}."
 
-    if len(skipped_list) == 0:
-        return f"No additional skipped tests found in this branch for commit 
{commit_sha}."
+    text = build_diff_comment_with_main(common_commit_sha, skipped_list, 
commit_sha)
+
+    if len(additional_skipped_list) != 0:
+        text += "\n"
+        text += (
+            f"Additional tests that were skipped in the CI build and present 
in the `required_tests_to_run` file:"

Review Comment:
   ```suggestion
               f"Additional tests that were skipped in the CI build and present 
in the 
[`required_tests_to_run`](https://github.com/apache/tvm/blob/main/ci/scripts/required_tests_to_run.json)
 file:"
   ```



##########
ci/scripts/github_skipped_tests_comment.py:
##########
@@ -195,10 +221,43 @@ def get_skipped_tests_comment(
     if len(skipped_list) == 0:
         logging.info("No skipped tests found.")
 
+    if not is_dry_run:
+        current_file = abspath(inspect.getsourcefile(lambda: 0))

Review Comment:
   is this different from `pathlib.Path(__file__).resolve()`?



##########
ci/scripts/github_skipped_tests_comment.py:
##########
@@ -195,10 +221,43 @@ def get_skipped_tests_comment(
     if len(skipped_list) == 0:
         logging.info("No skipped tests found.")
 
+    if not is_dry_run:
+        current_file = abspath(inspect.getsourcefile(lambda: 0))
+        additional_tests_to_check_file = (

Review Comment:
   nit: use pathlib to clean stuff up, e.g. `Path(current_file).parent / 
"required_tests_to_run.json"`



##########
tests/python/ci/test_ci.py:
##########
@@ -176,6 +276,10 @@ def write_xml_file(root_dir, xml_file, xml_content):
     write_xml_file(pr_test_report_dir, pr_xml_file, pr_xml_content)
     main_test_report_dir = Path(git.cwd) / "main-reports"
     write_xml_file(main_test_report_dir, main_xml_file, main_xml_content)
+    if os.path.exists("required_tests_to_run.json"):
+        os.remove("required_tests_to_run.json")
+    with open("required_tests_to_run.json", "w") as f:
+        f.write(additional_tests_to_check)

Review Comment:
   this should all happen inside a temp dir to not pollute the repo checkout



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to