tools: move make-bots, git-utils.sh to test/common

This will allow our subprojects to benefit from the "full strength"
implementation of 'get me bots/' with symlink and caching support.
This commit is contained in:
Allison Karlitskaya 2023-05-26 10:17:05 +02:00
parent 235a6124f0
commit 89db1c68a9
9 changed files with 10 additions and 11 deletions

View File

@ -18,7 +18,7 @@ jobs:
- name: Run npm-update bot
run: |
tools/make-bots
test/common/make-bots
git config --global user.name "GitHub Workflow"
git config --global user.email "cockpituous@cockpit-project.org"
mkdir -p ~/.config/cockpit-dev

View File

@ -18,7 +18,7 @@ jobs:
- name: Run npm-update bot
run: |
tools/make-bots
test/common/make-bots
git config --global user.name "GitHub Workflow"
git config --global user.email "cockpituous@cockpit-project.org"
mkdir -p ~/.config/cockpit-dev

View File

@ -18,5 +18,4 @@ jobs:
- name: Run urls-check action
run: |
tools/make-bots
tools/urls-check

View File

@ -122,7 +122,7 @@ recheck-memory:
# must be from main, as only that has current and existing images; but testvm.py API is stable
# support CI testing against a bots change
bots:
tools/make-bots
test/common/make-bots
.PHONY: rsync
RSYNC_HOST ?= c

View File

@ -9,8 +9,8 @@ SUBDIR='bots'
V="${V-0}" # default to friendly messages
set -eu
cd "${0%/*}/.."
. tools/git-utils.sh
cd "${0%/*}/../.."
. test/common/git-utils.sh
if [ ! -e bots ]; then
[ -n "${quiet}" ] || set -x

View File

@ -14,5 +14,5 @@ sys.path.append(f'{BOTS_DIR}/machine')
def ensure_bots():
if not os.path.isdir(BOTS_DIR):
subprocess.check_call([f'{BASE_DIR}/tools/make-bots'])
subprocess.check_call([f'{BASE_DIR}/test/common/make-bots'])
importlib.invalidate_caches()

View File

@ -5,7 +5,7 @@
set -eu
tools/make-bots
test/common/make-bots
test/common/pixel-tests pull
TEST_SCENARIO="${TEST_SCENARIO:-verify}"

View File

@ -7,7 +7,7 @@ V="${V-0}" # default to friendly messages
set -eu
cd "${0%/*}/.."
. tools/git-utils.sh
. test/common/git-utils.sh
cmd_remove() {
# if we did this for ourselves the rm is enough, but it might be the case
@ -57,7 +57,7 @@ EOF
}
cmd_install() {
test -e bots || tools/make-bots
test -e bots || test/common/make-bots
# We first read the result directly into the cache, then we unpack it.
tree="$(bots/npm download < package.json | tar_to_cache)"
@ -82,7 +82,7 @@ cmd_push() {
}
cmd_verify() {
test -e bots || tools/make-bots
test -e bots || test/common/make-bots
# Verifies that the package.json and node_modules of the given commit match.
commit="$(git rev-parse "$1:node_modules")"