This is an automated email from the ASF dual-hosted git repository.

areusch pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new 5287d8f11e [ci] Move non-task CI scripts into ci/ folder (#12609)
5287d8f11e is described below

commit 5287d8f11e28cf4953ca3b5638880397e7ceb48e
Author: driazati <[email protected]>
AuthorDate: Tue Aug 30 11:51:12 2022 -0700

    [ci] Move non-task CI scripts into ci/ folder (#12609)
    
    [CI] Update Hexagon image to install boost (#12613)
    
    The new image has xgboost installed, which I need for 
https://github.com/apache/tvm/pull/12587
    
    Validated in 
https://ci.tlcpack.ai/blue/organizations/jenkins/tvm/detail/ci-docker-staging/279/pipeline
    
    Co-authored-by: masahi <[email protected]>
---
 .github/ISSUE_TEMPLATE/flaky-test.md               |  2 +-
 .github/workflows/cc_bot.yml                       |  2 +-
 .github/workflows/docs_bot.yml                     |  2 +-
 .github/workflows/nightly_docker_update.yml        |  2 +-
 .github/workflows/ping_reviewers.yml               |  2 +-
 .github/workflows/tag_teams.yml                    |  2 +-
 .github/workflows/tests_bot.yml                    |  2 +-
 .github/workflows/tvmbot.yml                       |  2 +-
 .../workflows/update_last_successful_branch.yml    |  2 +-
 Jenkinsfile                                        | 14 +++++++-------
 ci/README.md                                       |  1 +
 ci/jenkins/Prepare.groovy.j2                       | 12 ++++++------
 {tests => ci}/scripts/cmd_utils.py                 |  0
 {tests => ci}/scripts/determine_docker_images.py   |  0
 {tests => ci}/scripts/git_change_docker.sh         |  0
 {tests => ci}/scripts/git_change_docs.sh           |  0
 {tests => ci}/scripts/git_skip_ci.py               |  0
 {tests => ci}/scripts/git_skip_ci_globs.py         |  0
 {tests => ci}/scripts/git_utils.py                 |  0
 {tests => ci}/scripts/github_cc_reviewers.py       |  0
 {tests => ci}/scripts/github_docs_comment.py       |  0
 .../scripts/github_skipped_tests_comment.py        |  0
 {tests => ci}/scripts/github_tag_teams.py          |  0
 {tests => ci}/scripts/github_tvmbot.py             |  0
 {tests => ci}/scripts/http_utils.py                |  0
 {tests => ci}/scripts/open_docker_update_pr.py     |  0
 {tests => ci}/scripts/ping_reviewers.py            |  0
 {tests => ci}/scripts/pytest_ids.py                |  0
 {tests => ci}/scripts/pytest_wrapper.py            |  0
 {tests => ci}/scripts/should_rebuild_docker.py     |  0
 {tests => ci}/scripts/should_run_slow_tests.py     |  0
 {tests => ci}/scripts/update_branch.py             |  0
 docker/bash.sh                                     |  2 +-
 tests/python/ci/test_ci.py                         | 22 +++++++++++-----------
 tests/python/ci/test_tvmbot.py                     |  2 +-
 tests/scripts/setup-pytest-env.sh                  |  2 +-
 tests/scripts/task_build.py                        |  5 +++++
 tests/scripts/task_python_frontend.sh              |  2 +-
 38 files changed, 43 insertions(+), 37 deletions(-)

diff --git a/.github/ISSUE_TEMPLATE/flaky-test.md 
b/.github/ISSUE_TEMPLATE/flaky-test.md
index 1d61bbb632..1e8d267f8e 100644
--- a/.github/ISSUE_TEMPLATE/flaky-test.md
+++ b/.github/ISSUE_TEMPLATE/flaky-test.md
@@ -7,7 +7,7 @@ labels: "test: flaky"
 
 Thanks for participating in the TVM community! We use https://discuss.tvm.ai 
for any general usage questions and discussions. The issue tracker is used for 
actionable items such as feature proposals discussion, roadmaps, and bug 
tracking. You are always welcomed to post on the forum first :smile_cat:
 
-These tests were found to be flaky (intermittently failing on `main` or failed 
in a PR with unrelated changes). As per [the 
docs](https://github.com/apache/tvm/blob/main/docs/contribute/ci.rst#handling-flaky-failures,
 these failures will be disabled in a PR that references this issue until the 
test owners can fix the source of the flakiness.
+These tests were found to be flaky (intermittently failing on `main` or failed 
in a PR with unrelated changes). As per [the 
docs](https://github.com/apache/tvm/blob/main/docs/contribute/ci.rst#handling-flaky-failures),
 these failures will be disabled in a PR that references this issue until the 
test owners can fix the source of the flakiness.
 
 ### Test(s)
 
diff --git a/.github/workflows/cc_bot.yml b/.github/workflows/cc_bot.yml
index ac0baa4902..95aa964262 100644
--- a/.github/workflows/cc_bot.yml
+++ b/.github/workflows/cc_bot.yml
@@ -44,4 +44,4 @@ jobs:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         run: |
           set -eux
-          python tests/scripts/github_cc_reviewers.py || echo step failed
+          python ci/scripts/github_cc_reviewers.py || echo step failed
diff --git a/.github/workflows/docs_bot.yml b/.github/workflows/docs_bot.yml
index 9480a1176f..73c12a8d7d 100644
--- a/.github/workflows/docs_bot.yml
+++ b/.github/workflows/docs_bot.yml
@@ -15,4 +15,4 @@ jobs:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         run: |
           set -eux
-          python tests/scripts/github_docs_comment.py
\ No newline at end of file
+          python ci/scripts/github_docs_comment.py
\ No newline at end of file
diff --git a/.github/workflows/nightly_docker_update.yml 
b/.github/workflows/nightly_docker_update.yml
index 08945555af..c244180743 100644
--- a/.github/workflows/nightly_docker_update.yml
+++ b/.github/workflows/nightly_docker_update.yml
@@ -28,4 +28,4 @@ jobs:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         run: |
           set -eux
-          python tests/scripts/open_docker_update_pr.py
+          python ci/scripts/open_docker_update_pr.py
diff --git a/.github/workflows/ping_reviewers.yml 
b/.github/workflows/ping_reviewers.yml
index 96c20434d9..a2e3e996a0 100644
--- a/.github/workflows/ping_reviewers.yml
+++ b/.github/workflows/ping_reviewers.yml
@@ -20,4 +20,4 @@ jobs:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         run: |
           set -eux
-          python tests/scripts/ping_reviewers.py --wait-time-minutes 10080 || 
echo failed
+          python ci/scripts/ping_reviewers.py --wait-time-minutes 10080 || 
echo failed
diff --git a/.github/workflows/tag_teams.yml b/.github/workflows/tag_teams.yml
index 2518cf87db..7c10f9c33d 100644
--- a/.github/workflows/tag_teams.yml
+++ b/.github/workflows/tag_teams.yml
@@ -45,4 +45,4 @@ jobs:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         run: |
           set -eux
-          python tests/scripts/github_tag_teams.py || echo failed
+          python ci/scripts/github_tag_teams.py || echo failed
diff --git a/.github/workflows/tests_bot.yml b/.github/workflows/tests_bot.yml
index e9d7d81375..0ddae2afb7 100644
--- a/.github/workflows/tests_bot.yml
+++ b/.github/workflows/tests_bot.yml
@@ -18,4 +18,4 @@ jobs:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         run: |
           set -eux
-          python tests/scripts/github_skipped_tests_comment.py
\ No newline at end of file
+          python ci/scripts/github_skipped_tests_comment.py
\ No newline at end of file
diff --git a/.github/workflows/tvmbot.yml b/.github/workflows/tvmbot.yml
index 87292ec211..23e90aed53 100644
--- a/.github/workflows/tvmbot.yml
+++ b/.github/workflows/tvmbot.yml
@@ -34,4 +34,4 @@ jobs:
           RUN_URL: ${{ github.server_url }}/${{ github.repository 
}}/actions/runs/${{ github.run_id }}
         run: |
           set -eux
-          python tests/scripts/github_tvmbot.py --pr "$PR_NUMBER" --run-url 
"$RUN_URL" --trigger-comment-json "$ISSUE_COMMENT"
+          python ci/scripts/github_tvmbot.py --pr "$PR_NUMBER" --run-url 
"$RUN_URL" --trigger-comment-json "$ISSUE_COMMENT"
diff --git a/.github/workflows/update_last_successful_branch.yml 
b/.github/workflows/update_last_successful_branch.yml
index fc2f2d0d4f..6635b9ef4c 100644
--- a/.github/workflows/update_last_successful_branch.yml
+++ b/.github/workflows/update_last_successful_branch.yml
@@ -41,4 +41,4 @@ jobs:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         run: |
           set -eux
-          python tests/scripts/update_branch.py || echo step failed
+          python ci/scripts/update_branch.py || echo step failed
diff --git a/Jenkinsfile b/Jenkinsfile
index 3278e83098..1b615e3830 100755
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -45,7 +45,7 @@
 // 'python3 jenkins/generate.py'
 // Note: This timestamp is here to ensure that updates to the Jenkinsfile are
 // always rebased on main before merging:
-// Generated at 2022-08-26T15:09:39.104767
+// Generated at 2022-08-26T15:48:19.597592
 
 import org.jenkinsci.plugins.pipeline.modeldefinition.Utils
 // NOTE: these lines are scanned by docker/dev_common.sh. Please update the 
regex as needed. -->
@@ -230,7 +230,7 @@ def should_skip_slow_tests(pr_number) {
     // Exit code of 1 means run slow tests, exit code of 0 means skip slow 
tests
     result = sh (
       returnStatus: true,
-      script: "./tests/scripts/should_run_slow_tests.py --pr '${pr_number}'",
+      script: "./ci/scripts/should_run_slow_tests.py --pr '${pr_number}'",
       label: 'Check if CI should run slow tests',
     )
   }
@@ -255,7 +255,7 @@ def should_skip_ci(pr_number) {
   }
   glob_skip_ci_code = sh (
     returnStatus: true,
-    script: "./tests/scripts/git_skip_ci_globs.py",
+    script: "./ci/scripts/git_skip_ci_globs.py",
     label: 'Check if CI should be skipped due to changed files',
   )
   if (glob_skip_ci_code == 0) {
@@ -269,7 +269,7 @@ def should_skip_ci(pr_number) {
     // full CI just in case). Exit code of 0 means skip CI.
     git_skip_ci_code = sh (
       returnStatus: true,
-      script: "./tests/scripts/git_skip_ci.py --pr '${pr_number}'",
+      script: "./ci/scripts/git_skip_ci.py --pr '${pr_number}'",
       label: 'Check if CI should be skipped',
     )
   }
@@ -284,7 +284,7 @@ def prepare() {
 
         if (env.DETERMINE_DOCKER_IMAGES == 'yes') {
           sh(
-            script: "./tests/scripts/determine_docker_images.py 
ci_arm=${ci_arm} ci_cortexm=${ci_cortexm} ci_cpu=${ci_cpu} ci_gpu=${ci_gpu} 
ci_hexagon=${ci_hexagon} ci_i386=${ci_i386} ci_lint=${ci_lint} 
ci_minimal=${ci_minimal} ci_riscv=${ci_riscv} ci_wasm=${ci_wasm} ",
+            script: "./ci/scripts/determine_docker_images.py ci_arm=${ci_arm} 
ci_cortexm=${ci_cortexm} ci_cpu=${ci_cpu} ci_gpu=${ci_gpu} 
ci_hexagon=${ci_hexagon} ci_i386=${ci_i386} ci_lint=${ci_lint} 
ci_minimal=${ci_minimal} ci_riscv=${ci_riscv} ci_wasm=${ci_wasm} ",
             label: 'Decide whether to use tlcpack or tlcpackstaging for Docker 
images',
           )
           // Pull image names from the results of should_rebuild_docker.py
@@ -367,14 +367,14 @@ def prepare() {
 
         is_docs_only_build = sh (
           returnStatus: true,
-          script: './tests/scripts/git_change_docs.sh',
+          script: './ci/scripts/git_change_docs.sh',
           label: 'Check for docs only changes',
         )
         skip_ci = should_skip_ci(env.CHANGE_ID)
         skip_slow_tests = should_skip_slow_tests(env.CHANGE_ID)
         rebuild_docker_images = sh (
           returnStatus: true,
-          script: './tests/scripts/git_change_docker.sh',
+          script: './ci/scripts/git_change_docker.sh',
           label: 'Check for any docker changes',
         )
 
diff --git a/ci/README.md b/ci/README.md
index 3899554923..2cb915e702 100644
--- a/ci/README.md
+++ b/ci/README.md
@@ -26,6 +26,7 @@ TVM project in a healthy state and preventing breakages. CI 
in TVM is broken int
  - The tests themselves, all of which live underneath [`tests`](../tests).
  - Definitions of test suites, with each suite defined as a separate `task_` 
script in
    [`tests/scripts`](../tests/scripts).
+ - Scripts and automation [`ci/scripts`](../ci/scripts).
  - The linux test sequence (in [`Jenkinsfile`](../Jenkinsfile)), which lints 
and builds TVM and runs test
    suites using Docker on Linux.
  - The Windows and Mac test sequences (in 
[`.github/actions`](../.github/actions)).
diff --git a/ci/jenkins/Prepare.groovy.j2 b/ci/jenkins/Prepare.groovy.j2
index 7115d39ffc..404d2870c9 100644
--- a/ci/jenkins/Prepare.groovy.j2
+++ b/ci/jenkins/Prepare.groovy.j2
@@ -80,7 +80,7 @@ def should_skip_slow_tests(pr_number) {
     // Exit code of 1 means run slow tests, exit code of 0 means skip slow 
tests
     result = sh (
       returnStatus: true,
-      script: "./tests/scripts/should_run_slow_tests.py --pr '${pr_number}'",
+      script: "./ci/scripts/should_run_slow_tests.py --pr '${pr_number}'",
       label: 'Check if CI should run slow tests',
     )
   }
@@ -105,7 +105,7 @@ def should_skip_ci(pr_number) {
   }
   glob_skip_ci_code = sh (
     returnStatus: true,
-    script: "./tests/scripts/git_skip_ci_globs.py",
+    script: "./ci/scripts/git_skip_ci_globs.py",
     label: 'Check if CI should be skipped due to changed files',
   )
   if (glob_skip_ci_code == 0) {
@@ -119,7 +119,7 @@ def should_skip_ci(pr_number) {
     // full CI just in case). Exit code of 0 means skip CI.
     git_skip_ci_code = sh (
       returnStatus: true,
-      script: "./tests/scripts/git_skip_ci.py --pr '${pr_number}'",
+      script: "./ci/scripts/git_skip_ci.py --pr '${pr_number}'",
       label: 'Check if CI should be skipped',
     )
   }
@@ -134,7 +134,7 @@ def prepare() {
 
         if (env.DETERMINE_DOCKER_IMAGES == 'yes') {
           sh(
-            script: "./tests/scripts/determine_docker_images.py {% for image 
in images %}{{ image.name }}={% raw %}${{% endraw %}{{ image.name }}{% raw 
%}}{% endraw %} {% endfor %}",
+            script: "./ci/scripts/determine_docker_images.py {% for image in 
images %}{{ image.name }}={% raw %}${{% endraw %}{{ image.name }}{% raw %}}{% 
endraw %} {% endfor %}",
             label: 'Decide whether to use tlcpack or tlcpackstaging for Docker 
images',
           )
           // Pull image names from the results of should_rebuild_docker.py
@@ -160,14 +160,14 @@ def prepare() {
 
         is_docs_only_build = sh (
           returnStatus: true,
-          script: './tests/scripts/git_change_docs.sh',
+          script: './ci/scripts/git_change_docs.sh',
           label: 'Check for docs only changes',
         )
         skip_ci = should_skip_ci(env.CHANGE_ID)
         skip_slow_tests = should_skip_slow_tests(env.CHANGE_ID)
         rebuild_docker_images = sh (
           returnStatus: true,
-          script: './tests/scripts/git_change_docker.sh',
+          script: './ci/scripts/git_change_docker.sh',
           label: 'Check for any docker changes',
         )
 
diff --git a/tests/scripts/cmd_utils.py b/ci/scripts/cmd_utils.py
similarity index 100%
rename from tests/scripts/cmd_utils.py
rename to ci/scripts/cmd_utils.py
diff --git a/tests/scripts/determine_docker_images.py 
b/ci/scripts/determine_docker_images.py
similarity index 100%
rename from tests/scripts/determine_docker_images.py
rename to ci/scripts/determine_docker_images.py
diff --git a/tests/scripts/git_change_docker.sh 
b/ci/scripts/git_change_docker.sh
similarity index 100%
rename from tests/scripts/git_change_docker.sh
rename to ci/scripts/git_change_docker.sh
diff --git a/tests/scripts/git_change_docs.sh b/ci/scripts/git_change_docs.sh
similarity index 100%
rename from tests/scripts/git_change_docs.sh
rename to ci/scripts/git_change_docs.sh
diff --git a/tests/scripts/git_skip_ci.py b/ci/scripts/git_skip_ci.py
similarity index 100%
rename from tests/scripts/git_skip_ci.py
rename to ci/scripts/git_skip_ci.py
diff --git a/tests/scripts/git_skip_ci_globs.py 
b/ci/scripts/git_skip_ci_globs.py
similarity index 100%
rename from tests/scripts/git_skip_ci_globs.py
rename to ci/scripts/git_skip_ci_globs.py
diff --git a/tests/scripts/git_utils.py b/ci/scripts/git_utils.py
similarity index 100%
rename from tests/scripts/git_utils.py
rename to ci/scripts/git_utils.py
diff --git a/tests/scripts/github_cc_reviewers.py 
b/ci/scripts/github_cc_reviewers.py
similarity index 100%
rename from tests/scripts/github_cc_reviewers.py
rename to ci/scripts/github_cc_reviewers.py
diff --git a/tests/scripts/github_docs_comment.py 
b/ci/scripts/github_docs_comment.py
similarity index 100%
rename from tests/scripts/github_docs_comment.py
rename to ci/scripts/github_docs_comment.py
diff --git a/tests/scripts/github_skipped_tests_comment.py 
b/ci/scripts/github_skipped_tests_comment.py
similarity index 100%
rename from tests/scripts/github_skipped_tests_comment.py
rename to ci/scripts/github_skipped_tests_comment.py
diff --git a/tests/scripts/github_tag_teams.py b/ci/scripts/github_tag_teams.py
similarity index 100%
rename from tests/scripts/github_tag_teams.py
rename to ci/scripts/github_tag_teams.py
diff --git a/tests/scripts/github_tvmbot.py b/ci/scripts/github_tvmbot.py
similarity index 100%
rename from tests/scripts/github_tvmbot.py
rename to ci/scripts/github_tvmbot.py
diff --git a/tests/scripts/http_utils.py b/ci/scripts/http_utils.py
similarity index 100%
rename from tests/scripts/http_utils.py
rename to ci/scripts/http_utils.py
diff --git a/tests/scripts/open_docker_update_pr.py 
b/ci/scripts/open_docker_update_pr.py
similarity index 100%
rename from tests/scripts/open_docker_update_pr.py
rename to ci/scripts/open_docker_update_pr.py
diff --git a/tests/scripts/ping_reviewers.py b/ci/scripts/ping_reviewers.py
similarity index 100%
rename from tests/scripts/ping_reviewers.py
rename to ci/scripts/ping_reviewers.py
diff --git a/tests/scripts/pytest_ids.py b/ci/scripts/pytest_ids.py
similarity index 100%
rename from tests/scripts/pytest_ids.py
rename to ci/scripts/pytest_ids.py
diff --git a/tests/scripts/pytest_wrapper.py b/ci/scripts/pytest_wrapper.py
similarity index 100%
rename from tests/scripts/pytest_wrapper.py
rename to ci/scripts/pytest_wrapper.py
diff --git a/tests/scripts/should_rebuild_docker.py 
b/ci/scripts/should_rebuild_docker.py
similarity index 100%
rename from tests/scripts/should_rebuild_docker.py
rename to ci/scripts/should_rebuild_docker.py
diff --git a/tests/scripts/should_run_slow_tests.py 
b/ci/scripts/should_run_slow_tests.py
similarity index 100%
rename from tests/scripts/should_run_slow_tests.py
rename to ci/scripts/should_run_slow_tests.py
diff --git a/tests/scripts/update_branch.py b/ci/scripts/update_branch.py
similarity index 100%
rename from tests/scripts/update_branch.py
rename to ci/scripts/update_branch.py
diff --git a/docker/bash.sh b/docker/bash.sh
index 62b71ba353..10d80478d3 100755
--- a/docker/bash.sh
+++ b/docker/bash.sh
@@ -295,7 +295,7 @@ if [ -n "${EXPANDED_SHORTCUT}" ]; then
     if [ "${CI+x}" == "x" ]; then
         DOCKER_IMAGE_NAME="${EXPANDED_SHORTCUT}"
     else
-        python3 tests/scripts/determine_docker_images.py 
"$DOCKER_IMAGE_NAME=$EXPANDED_SHORTCUT" 2> /dev/null
+        python3 ci/scripts/determine_docker_images.py 
"$DOCKER_IMAGE_NAME=$EXPANDED_SHORTCUT" 2> /dev/null
         DOCKER_IMAGE_NAME=$(cat ".docker-image-names/$DOCKER_IMAGE_NAME")
         if [[ "$DOCKER_IMAGE_NAME" == *"tlcpackstaging"* ]]; then
             echo "WARNING: resolved docker image to fallback tag in 
tlcpackstaging" >&2
diff --git a/tests/python/ci/test_ci.py b/tests/python/ci/test_ci.py
index c45a0d8d8e..0939aae10a 100644
--- a/tests/python/ci/test_ci.py
+++ b/tests/python/ci/test_ci.py
@@ -172,7 +172,7 @@ def test_skipped_tests_comment(
     """
     Test that a comment with a link to the docs is successfully left on PRs
     """
-    skipped_tests_script = REPO_ROOT / "tests" / "scripts" / 
"github_skipped_tests_comment.py"
+    skipped_tests_script = REPO_ROOT / "ci" / "scripts" / 
"github_skipped_tests_comment.py"
 
     def write_xml_file(root_dir, xml_file, xml_content):
         shutil.rmtree(root_dir, ignore_errors=True)
@@ -232,7 +232,7 @@ def test_docs_comment(
     """
     Test that a comment with a link to the docs is successfully left on PRs
     """
-    docs_comment_script = REPO_ROOT / "tests" / "scripts" / 
"github_docs_comment.py"
+    docs_comment_script = REPO_ROOT / "ci" / "scripts" / 
"github_docs_comment.py"
 
     git = TempGit(tmpdir_factory.mktemp("tmp_git_dir"))
     git.run("init")
@@ -258,7 +258,7 @@ def test_cc_reviewers(tmpdir_factory):
     """
     Test that reviewers are added from 'cc @someone' messages in PRs
     """
-    reviewers_script = REPO_ROOT / "tests" / "scripts" / 
"github_cc_reviewers.py"
+    reviewers_script = REPO_ROOT / "ci" / "scripts" / "github_cc_reviewers.py"
 
     def run(pr_body, requested_reviewers, existing_review_users, 
expected_reviewers):
         git = TempGit(tmpdir_factory.mktemp("tmp_git_dir"))
@@ -335,7 +335,7 @@ def test_update_branch(tmpdir_factory):
     """
     Test that the last-successful branch script updates successfully
     """
-    update_script = REPO_ROOT / "tests" / "scripts" / "update_branch.py"
+    update_script = REPO_ROOT / "ci" / "scripts" / "update_branch.py"
 
     def run(statuses, expected_rc, expected_output):
         git = TempGit(tmpdir_factory.mktemp("tmp_git_dir"))
@@ -515,7 +515,7 @@ def test_skip_ci(tmpdir_factory, commands, should_skip, 
pr_title, why):
     """
     Test that CI is skipped when it should be
     """
-    skip_ci_script = REPO_ROOT / "tests" / "scripts" / "git_skip_ci.py"
+    skip_ci_script = REPO_ROOT / "ci" / "scripts" / "git_skip_ci.py"
 
     git = TempGit(tmpdir_factory.mktemp("tmp_git_dir"))
     # Jenkins git is too old and doesn't have 'git init --initial-branch'
@@ -548,7 +548,7 @@ def test_skip_globs(tmpdir_factory):
     """
     Test that CI is skipped if only certain files are edited
     """
-    script = REPO_ROOT / "tests" / "scripts" / "git_skip_ci_globs.py"
+    script = REPO_ROOT / "ci" / "scripts" / "git_skip_ci_globs.py"
 
     def run(files, should_skip):
         git = TempGit(tmpdir_factory.mktemp("tmp_git_dir"))
@@ -587,7 +587,7 @@ def test_ping_reviewers(tmpdir_factory):
     """
     Test that reviewers are messaged after a time period of inactivity
     """
-    reviewers_script = REPO_ROOT / "tests" / "scripts" / "ping_reviewers.py"
+    reviewers_script = REPO_ROOT / "ci" / "scripts" / "ping_reviewers.py"
 
     def run(pull_request, check):
         git = TempGit(tmpdir_factory.mktemp("tmp_git_dir"))
@@ -744,7 +744,7 @@ def test_github_tag_teams(tmpdir_factory):
     """
     Check that individuals are tagged from team headers
     """
-    tag_script = REPO_ROOT / "tests" / "scripts" / "github_tag_teams.py"
+    tag_script = REPO_ROOT / "ci" / "scripts" / "github_tag_teams.py"
 
     def run(source_type, data, check):
         git = TempGit(tmpdir_factory.mktemp("tmp_git_dir"))
@@ -1081,7 +1081,7 @@ def test_open_docker_update_pr(
     tmpdir_factory, tlcpackstaging_body, tlcpack_body, expected, 
expected_images
 ):
     """Test workflow to open a PR to update Docker images"""
-    tag_script = REPO_ROOT / "tests" / "scripts" / "open_docker_update_pr.py"
+    tag_script = REPO_ROOT / "ci" / "scripts" / "open_docker_update_pr.py"
 
     git = TempGit(tmpdir_factory.mktemp("tmp_git_dir"))
     git.run("init")
@@ -1152,7 +1152,7 @@ def test_open_docker_update_pr(
 )
 def test_determine_docker_images(tmpdir_factory, images, expected):
     """Test script to decide whether to use tlcpack or tlcpackstaging for 
images"""
-    tag_script = REPO_ROOT / "tests" / "scripts" / "determine_docker_images.py"
+    tag_script = REPO_ROOT / "ci" / "scripts" / "determine_docker_images.py"
 
     git_dir = tmpdir_factory.mktemp("tmp_git_dir")
 
@@ -1219,7 +1219,7 @@ def test_should_rebuild_docker(tmpdir_factory, 
changed_files, name, check, expec
     """
     Check that the Docker images are built when necessary
     """
-    tag_script = REPO_ROOT / "tests" / "scripts" / "should_rebuild_docker.py"
+    tag_script = REPO_ROOT / "ci" / "scripts" / "should_rebuild_docker.py"
 
     git = TempGit(tmpdir_factory.mktemp("tmp_git_dir"))
     git.run("init")
diff --git a/tests/python/ci/test_tvmbot.py b/tests/python/ci/test_tvmbot.py
index 9568a0469b..2c7a0eaec0 100644
--- a/tests/python/ci/test_tvmbot.py
+++ b/tests/python/ci/test_tvmbot.py
@@ -147,7 +147,7 @@ def test_tvmbot(tmpdir_factory, number, filename, expected, 
comment, user, detai
     """
     Test the mergebot test cases
     """
-    mergebot_script = REPO_ROOT / "tests" / "scripts" / "github_tvmbot.py"
+    mergebot_script = REPO_ROOT / "ci" / "scripts" / "github_tvmbot.py"
     test_json_dir = Path(__file__).resolve().parent / "sample_prs"
 
     git = TempGit(tmpdir_factory.mktemp("tmp_git_dir"))
diff --git a/tests/scripts/setup-pytest-env.sh 
b/tests/scripts/setup-pytest-env.sh
index d6c49a4281..8959792931 100755
--- a/tests/scripts/setup-pytest-env.sh
+++ b/tests/scripts/setup-pytest-env.sh
@@ -39,7 +39,7 @@ function cleanup() {
     set +x
     if [ "${#pytest_errors[@]}" -gt 0 ]; then
         echo "These pytest invocations failed, the results can be found in the 
Jenkins 'Tests' tab or by scrolling up through the raw logs here."
-        python3 tests/scripts/pytest_wrapper.py "${pytest_errors[@]}"
+        python3 ci/scripts/pytest_wrapper.py "${pytest_errors[@]}"
         exit 1
     fi
     set -x
diff --git a/tests/scripts/task_build.py b/tests/scripts/task_build.py
index e4583fe6af..1a8a1d112f 100755
--- a/tests/scripts/task_build.py
+++ b/tests/scripts/task_build.py
@@ -19,9 +19,14 @@ import argparse
 import shutil
 import os
 import logging
+import sys
 import multiprocessing
 
 from pathlib import Path
+
+# Hackery to enable importing of utils from ci/scripts
+REPO_ROOT = Path(__file__).resolve().parent.parent.parent
+sys.path.append(str(REPO_ROOT / "ci" / "scripts"))
 from cmd_utils import Sh, init_log, REPO_ROOT
 
 
diff --git a/tests/scripts/task_python_frontend.sh 
b/tests/scripts/task_python_frontend.sh
index 2c7e34fac5..61d7238a59 100755
--- a/tests/scripts/task_python_frontend.sh
+++ b/tests/scripts/task_python_frontend.sh
@@ -42,7 +42,7 @@ run_pytest cython python-frontend-pytorch 
tests/python/frontend/pytorch
 
 echo "Running relay Tensorflow frontend test..."
 # Note: Tensorflow tests often have memory issues, so invoke each one 
separately
-TENSORFLOW_TESTS=$(./tests/scripts/pytest_ids.py --folder 
tests/python/frontend/tensorflow)
+TENSORFLOW_TESTS=$(./ci/scripts/pytest_ids.py --folder 
tests/python/frontend/tensorflow)
 i=0
 for node_id in $TENSORFLOW_TESTS; do
     echo "$node_id"

Reply via email to