From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: mikko.rapeli@linaro.org, openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH v2 2/6] oeqa runtime apt.py: check errors and fix quoting
Date: Wed, 02 Jul 2025 10:42:26 +0100 [thread overview]
Message-ID: <e4c3d114eeec55e27d5da82569916332934381da.camel@linuxfoundation.org> (raw)
In-Reply-To: <20250701073359.979368-2-mikko.rapeli@linaro.org>
On Tue, 2025-07-01 at 10:33 +0300, Mikko Rapeli via lists.openembedded.org wrote:
> Check that shell commands succeeded and fix quoting
> warning:
>
> core-image-minimal/lib/oeqa/runtime/cases/apt.py:44: SyntaxWarning: invalid escape sequence '\['
> self.target.run("cd %s; cp sources.list sources.list.bak; sed -i 's|\[trusted=yes\] http://bogus_ip:bogus_port|%s|g' sources.list" % (apt_get_sourceslist_dir, apt_get_source_server))
>
> Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
> ---
> meta/lib/oeqa/runtime/cases/apt.py | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/meta/lib/oeqa/runtime/cases/apt.py b/meta/lib/oeqa/runtime/cases/apt.py
> index 8000645843aa..b7cda0095394 100644
> --- a/meta/lib/oeqa/runtime/cases/apt.py
> +++ b/meta/lib/oeqa/runtime/cases/apt.py
> @@ -36,12 +36,12 @@ class AptRepoTest(AptTest):
> def setup_source_config_for_package_install(self):
> apt_get_source_server = 'http://%s:%s/' % (self.tc.target.server_ip, self.repo_server.port)
> apt_get_sourceslist_dir = '/etc/apt/'
> - self.target.run('cd %s; echo deb [ allow-insecure=yes ] %s/all ./ > sources.list' % (apt_get_sourceslist_dir, apt_get_source_server))
> + self.target.run('cd %s && echo "deb [ allow-insecure=yes ] %s/all ./" > sources.list' % (apt_get_sourceslist_dir, apt_get_source_server))
>
> def setup_source_config_for_package_install_signed(self):
> apt_get_source_server = 'http://%s:%s' % (self.tc.target.server_ip, self.repo_server.port)
> apt_get_sourceslist_dir = '/etc/apt/'
> - self.target.run("cd %s; cp sources.list sources.list.bak; sed -i 's|\[trusted=yes\] http://bogus_ip:bogus_port|%s|g' sources.list" % (apt_get_sourceslist_dir, apt_get_source_server))
> + self.target.run("cd %s && cp sources.list sources.list.bak && sed -i 's|[trusted=yes] http://bogus_ip:bogus_port|%s|g' sources.list" % (apt_get_sourceslist_dir, apt_get_source_server))
>
> def cleanup_source_config_for_package_install(self):
> apt_get_sourceslist_dir = '/etc/apt/'
> @@ -49,12 +49,12 @@ class AptRepoTest(AptTest):
>
> def cleanup_source_config_for_package_install_signed(self):
> apt_get_sourceslist_dir = '/etc/apt/'
> - self.target.run('cd %s; mv sources.list.bak sources.list' % (apt_get_sourceslist_dir))
> + self.target.run('cd %s && mv sources.list.bak sources.list' % (apt_get_sourceslist_dir))
>
> def setup_key(self):
> # the key is found on the target /etc/pki/packagefeed-gpg/
> # named PACKAGEFEED-GPG-KEY-poky-branch
> - self.target.run('cd %s; apt-key add P*' % ('/etc/pki/packagefeed-gpg'))
> + self.target.run('cd %s && apt-key add P*' % ('/etc/pki/packagefeed-gpg'))
>
> @skipIfNotFeature('package-management',
> 'Test requires package-management to be in IMAGE_FEATURES')
>
This breaks the test on the autobuilder:
https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/1885
(or it was broken and hiding an error)
Either way, we need to fix this before it can merge.
Cheers,
Richard
next prev parent reply other threads:[~2025-07-02 9:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-01 7:33 [PATCH v2 1/6] oeqa runtime: set self.runner and handle None Mikko Rapeli
2025-07-01 7:33 ` [PATCH v2 2/6] oeqa runtime apt.py: check errors and fix quoting Mikko Rapeli
2025-07-02 9:42 ` Richard Purdie [this message]
2025-07-02 9:50 ` [OE-core] " Mikko Rapeli
2025-07-01 7:33 ` [PATCH v2 3/6] oeqa context.py: use TEST_SUITES if set Mikko Rapeli
2025-07-01 7:33 ` [PATCH v2 4/6] testexport.bbclass oe-test: capture all tests and data from all layers Mikko Rapeli
2025-07-01 7:33 ` [PATCH v2 5/6] testexport.bbclass: use image suffix in testexport tar ball name Mikko Rapeli
2025-07-02 6:30 ` [OE-core] [PATCH v2 1/6] oeqa runtime: set self.runner and handle None Antonin Godard
2025-07-02 7:24 ` Mikko Rapeli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e4c3d114eeec55e27d5da82569916332934381da.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=mikko.rapeli@linaro.org \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox