[PATCH v2] Nokia RX-51: Add automated test for running RX-51 build in qemu
Tom Rini
trini at konsulko.com
Mon Apr 27 20:00:47 CEST 2020
On Sat, Apr 25, 2020 at 11:00:06AM +0200, Pali Rohár wrote:
> This patch contains test/nokia_rx51_test.sh script which automatically
> download and compile all needed tools in local temporary directory to
> generate a simple MTD images for booting Maemo kernel image by U-Boot from
> RAM, eMMC and OneNAND. MTD images are then run in virtual n900 machine
> provided by qemu-linaro project.
>
> This script does not need any special privileges, so it can be run as
> non-root nobody user.
>
> It can be used to check that U-Boot for Nokia N900 is not broken and can be
> successfully booted in emulator.
>
> Script is registered to .azure-pipelines.yml, .gitlab-ci.yml and
> .travis.yml so it would be automatically run on those CI services.
>
> Signed-off-by: Pali Rohár <pali at kernel.org>
> ---
> Changes in v2:
> * Fix apt dependences for Travis CI
> * Move definition of Travis job into own section
> * Add definition for Azure and Gitlab CI services
> * Add script to MAINTAINERS file
> * Build U-Boot binary in test script too
> * Show error message when some dependency for script is missing
> * Fix addresses for booting kernel from OneNAND
> * Do all stuff in nokia_rx51_tmp temporary directory
> * Use upstream mformat (from mtools) for generating FAT32 MBR filesystems
> (instead of mkfs.fat from dosfstools with custom patches)
> * Show more verbose log messages
> * Do not use sudo, instead run parts of script under fakeroot
> (fakeroot just run binary with own LD_PRELOAD library which emulates
> mknod() function for later usage by stat() function)
> * So script can be now run as non-root nobody user and it put all stuff
> in nokia_rx51_tmp temporary directory, so can be run locally without
> any issue.
> ---
> .azure-pipelines.yml | 7 +
> .gitlab-ci.yml | 6 +
> .travis.yml | 7 +
> board/nokia/rx51/MAINTAINERS | 1 +
> test/nokia_rx51_test.sh | 262 +++++++++++++++++++++++++++++++++++
> 5 files changed, 283 insertions(+)
> create mode 100755 test/nokia_rx51_test.sh
>
> diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
> index d3e7b4dd02..a812f7f906 100644
> --- a/.azure-pipelines.yml
> +++ b/.azure-pipelines.yml
> @@ -151,6 +151,13 @@ jobs:
> # seems to hang forever with pre-configured "container" environment
> docker run -v $PWD:$(work_dir) $(ci_runner_image) /bin/bash $(work_dir)/build.sh
>
> + - job: nokia_rx51_test
> + displayName: 'Run tests for Nokia RX-51 (aka N900)'
> + pool:
> + vmImage: $(ubuntu_vm)
> + steps:
> + - script: test/nokia_rx51_test.sh
> +
> - job: test_py
> displayName: 'test.py'
> pool:
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> index 08bdf81e74..678f4323a0 100644
> --- a/.gitlab-ci.yml
> +++ b/.gitlab-ci.yml
> @@ -170,6 +170,12 @@ Run binman, buildman, dtoc, Kconfig and patman testsuites:
> ./tools/patman/patman --test;
> make testconfig
>
> +Run tests for Nokia RX-51 (aka N900):
> + tags: [ 'all' ]
> + stage: testsuites
> + script:
> + - test/nokia_rx51_test.sh
> +
> # Test sandbox with test.py
> sandbox test.py:
> tags: [ 'all' ]
> diff --git a/.travis.yml b/.travis.yml
> index 82e3b91523..b32555d89f 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -49,6 +49,8 @@ addons:
> - mtools
> - openssl
> - sbsigntool
> + - fakeroot
> + - mtd-utils
So the Docker container for Azure/GitLab will need an update too. I'll
take care of that shortly. Otherwise:
Reviewed-by: Tom Rini <trini at konsulko.com>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200427/0ac37bc8/attachment.sig>
More information about the U-Boot
mailing list