From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pali =?utf-8?B?Um9ow6Fy?= Date: Tue, 28 Apr 2020 09:37:21 +0200 Subject: [PATCH v2] Nokia RX-51: Add automated test for running RX-51 build in qemu In-Reply-To: <20200427180047.GZ4555@bill-the-cat> References: <20200423174803.bpijlgxdd7ysoull@pali> <20200425090006.30889-1-pali@kernel.org> <20200427180047.GZ4555@bill-the-cat> Message-ID: <20200428073721.sk5ouystcj3p7xwb@pali> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Monday 27 April 2020 14:00:47 Tom Rini wrote: > 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 > > --- > > 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. Do not forget to put arm-linux-gnueabi-gcc into PATH for rx51 test script. > I'll take care of that shortly. Otherwise: > > Reviewed-by: Tom Rini Ok, thank you!