@@ -43,14 +43,8 @@ def as_cmd_arg(self) -> list[str]:
4343done
4444"""
4545 else :
46- # apt-get/apt's dependency resolver can silently refuse to add a
47- # local .deb to its changeset when the filename contains a ":"
48- # (as ours does, from the Debian epoch) -- dpkg -i installs the
49- # file directly with no such ambiguity, then apt -f pulls in
50- # anything it couldn't resolve on its own.
5146 script = """
52- dpkg -i ./*.deb || true
53- apt-get install -f -y
47+ apt-get install -y ./*.deb
5448for f in ./*.deb; do
5549 pkg=$(dpkg-deb -f "$f" Package)
5650 dpkg -s "$pkg" >/dev/null 2>&1 || { echo "Package $pkg from $f was not installed" >&2; exit 1; }
@@ -60,18 +54,18 @@ def as_cmd_arg(self) -> list[str]:
6054
6155
6256class RunPluginMTRSuite (Command ):
63- # MARIADB_ADD_PLUGIN's INSTALL_MYSQL_TEST (cmake/plugin.cmake) always
64- # installs a plugin's mysql-test/ contents -- suite/ included -- under
65- # <mtr_base_dir>/ plugin/<X>/, so the suite ends up at
66- # plugin/<X>/suite/<name>, not plugin/<X>/<name>. <X> is the plugin's own
67- # CMake project/target name, which isn't always the same as the Foundry
57+ # MARIADB_ADD_PLUGIN's INSTALL_MYSQL_TEST (cmake/plugin.cmake) installs
58+ # a plugin's mysql-test suite(s) under <mtr_base_dir>/plugin/<X>/<name>/,
59+ # e.g. plugin/rocksdb/rocksdb/ suite.pm or
60+ # plugin/columnstore/columnstore/suite.pm. <X> is the plugin's own CMake
61+ # project/target name, which isn't always the same as the Foundry
6862 # "plugin" property (e.g. tidesql's CMake target is actually "tidesdb"),
6963 # so rather than guess it, discover whatever actually landed under
70- # plugin/*/suite/* -- exactly one plugin gets installed per build.
71- # mtr_cases.pm's short-name lookup for `-- suite=NAME` doesn't account for
72- # the extra suite/ level either way , so we pass MTR the full relative
73- # path instead, which it accepts directly . A plugin with no suite/ dir
74- # at all is skipped rather than failing the build.
64+ # plugin/*/*/suite.pm -- exactly one plugin gets installed per build.
65+ # mtr_cases.pm resolves a bare suite name (e.g. "rocksdb") by searching
66+ # under plugin/*/ itself , so passing just the suite's short name is
67+ # enough -- no need to spell out the plugin/<X>/ prefix . A plugin with no
68+ # suite.pm anywhere under it is skipped rather than failing the build.
7569 def __init__ (self , package_type : str , workdir : PurePath = PurePath ("." )):
7670 self .package_type = package_type
7771 super ().__init__ (name = "Run plugin MTR suite" , workdir = workdir , user = "root" )
@@ -101,14 +95,10 @@ def as_cmd_arg(self) -> list[str]:
10195mtr_base_dir=$(dirname "$mtr_script")
10296
10397suites=""
104- for suite_dir in "$mtr_base_dir"/plugin/*/suite; do
105- [ -d "$suite_dir" ] || continue
106- plugin_dir=$(basename "$(dirname "$suite_dir")")
107- for d in "$suite_dir"/*/; do
108- [ -d "$d" ] || continue
109- name=$(basename "$d")
110- suites="$suites,plugin/$plugin_dir/suite/$name"
111- done
98+ for suite_pm in "$mtr_base_dir"/plugin/*/*/suite.pm; do
99+ [ -f "$suite_pm" ] || continue
100+ name=$(basename "$(dirname "$suite_pm")")
101+ suites="$suites,$name"
112102done
113103suites=$(echo "$suites" | sed 's/^,//')
114104
0 commit comments