From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [next] support/testing: new opkg test case
Date: Mon, 3 Feb 2020 22:25:56 +0100 [thread overview]
Message-ID: <20200203222556.6bea81d9@windsurf> (raw)
In-Reply-To: <20191126065746.39951-1-matthew.weber@rockwellcollins.com>
Hello,
On Tue, 26 Nov 2019 00:57:46 -0600
Matt Weber <matthew.weber@rockwellcollins.com> wrote:
> - Validates an archive can be installed and removed
> - Builds an archives that uses postinst and prerm scripts
>
> Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
> ---
> DEVELOPERS | 1 +
> support/testing/tests/package/test_opkg.py | 63 +++++++++++++++++++
> .../tests/package/test_opkg/post-build.sh | 47 ++++++++++++++
> 3 files changed, 111 insertions(+)
> create mode 100644 support/testing/tests/package/test_opkg.py
> create mode 100755 support/testing/tests/package/test_opkg/post-build.sh
I've applied, with a few changes. See below.
> diff --git a/DEVELOPERS b/DEVELOPERS
> index 544e3ac1c3..541029ab0e 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -1625,6 +1625,7 @@ F: package/wireless_tools/
> F: package/xen/
> F: support/testing/tests/package/br2-external/openjdk/
> F: support/testing/tests/package/test_openjdk.py
> +F: support/testing/tests/package/test_opkg.py
I've added the test_opkg/ folder as well here.
> + # If successful, the prerm script ran to stop the service prior to
> + # the removal of the service scripting and files
> + cmd = "opkg remove example-snmpd-package"
> + _, exit_code = self.emulator.run(cmd)
> + self.assertEqual(exit_code, 0)
> +
> + # Verify after package removal that the services is not running
> + cmd = "ps aux | grep [s]nmpd"
Here a sleep 1 was needed before the ps, because a stray [snmpd]
process stays for a short period of time. I was able to see it even by
testing manually.
> diff --git a/support/testing/tests/package/test_opkg/post-build.sh b/support/testing/tests/package/test_opkg/post-build.sh
> new file mode 100755
> index 0000000000..1b85aa002a
> --- /dev/null
> +++ b/support/testing/tests/package/test_opkg/post-build.sh
> @@ -0,0 +1,47 @@
> +#!/usr/bin/env bash
> +
> +IPK_BUILD=${TARGET_DIR}/root/ipk-build
I changed this to:
IPK_BUILD=${BUILD_DIR}/ipk-build
Because it feels weird to do all of this stuff in ${TARGET_DIR}.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
prev parent reply other threads:[~2020-02-03 21:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-26 6:57 [Buildroot] [next] support/testing: new opkg test case Matt Weber
2020-02-03 21:25 ` Thomas Petazzoni [this message]
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=20200203222556.6bea81d9@windsurf \
--to=thomas.petazzoni@bootlin.com \
--cc=buildroot@busybox.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.