diff options
| author | Chen Qi <Qi.Chen@windriver.com> | 2023-06-05 02:00:02 -0700 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2023-06-30 04:07:59 -1000 |
| commit | efa26ceb510bac843cbb9f870aaac54bef71dc08 (patch) | |
| tree | 53c5a8bc92d09823f010eaac4b4be3abfc4366df | |
| parent | c6a776870da1c973dec56a8dc2492b6715d6cd3e (diff) | |
| download | poky-efa26ceb510bac843cbb9f870aaac54bef71dc08.tar.gz | |
qemurunner.py: fix error message about qmp
The error message is a little misleading as the qmp module is a
directory with __init__.py file, not qmp.py file. Also, put the
path where we try to import it from in the error message to make
the message more indicative.
(From OE-Core rev: 60466c8ee5c055bdc01582f3809c7b36bb646a1d)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 08bacbf797f6a50ae8abe8fc3455b3a15a0a94b3)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
| -rw-r--r-- | meta/lib/oeqa/utils/qemurunner.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index 8bb35f5a8b..49c70727a2 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py | |||
| @@ -188,7 +188,7 @@ class QemuRunner: | |||
| 188 | def launch(self, launch_cmd, get_ip = True, qemuparams = None, extra_bootparams = None, env = None): | 188 | def launch(self, launch_cmd, get_ip = True, qemuparams = None, extra_bootparams = None, env = None): |
| 189 | # use logfile to determine the recipe-sysroot-native path and | 189 | # use logfile to determine the recipe-sysroot-native path and |
| 190 | # then add in the site-packages path components and add that | 190 | # then add in the site-packages path components and add that |
| 191 | # to the python sys.path so qmp.py can be found. | 191 | # to the python sys.path so the qmp module can be found. |
| 192 | python_path = os.path.dirname(os.path.dirname(self.logfile)) | 192 | python_path = os.path.dirname(os.path.dirname(self.logfile)) |
| 193 | python_path += "/recipe-sysroot-native/usr/lib/qemu-python" | 193 | python_path += "/recipe-sysroot-native/usr/lib/qemu-python" |
| 194 | sys.path.append(python_path) | 194 | sys.path.append(python_path) |
| @@ -196,7 +196,7 @@ class QemuRunner: | |||
| 196 | try: | 196 | try: |
| 197 | qmp = importlib.import_module("qmp") | 197 | qmp = importlib.import_module("qmp") |
| 198 | except Exception as e: | 198 | except Exception as e: |
| 199 | self.logger.error("qemurunner: qmp.py missing, please ensure it's installed (%s)" % str(e)) | 199 | self.logger.error("qemurunner: qmp module missing, please ensure it's installed in %s (%s)" % (python_path, str(e))) |
| 200 | return False | 200 | return False |
| 201 | # Path relative to tmpdir used as cwd for qemu below to avoid unix socket path length issues | 201 | # Path relative to tmpdir used as cwd for qemu below to avoid unix socket path length issues |
| 202 | qmp_file = "." + next(tempfile._get_candidate_names()) | 202 | qmp_file = "." + next(tempfile._get_candidate_names()) |
