Browse Source

Nokia RX-51: Add automated test for running RX-51 build in qemu

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@kernel.org>
Pali Rohár 4 years ago
parent
commit
6cfd09d4ed
5 changed files with 87 additions and 0 deletions
  1. 13 0
      .azure-pipelines.yml
  2. 8 0
      .gitlab-ci.yml
  3. 7 0
      .travis.yml
  4. 1 0
      board/nokia/rx51/MAINTAINERS
  5. 58 0
      test/nokia_rx51_test.sh

+ 13 - 0
.azure-pipelines.yml

@@ -151,6 +151,19 @@ 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)
+    container:
+      image: $(ci_runner_image)
+      options: $(container_option)
+    steps:
+      - script: |
+          ./tools/buildman/buildman --fetch-arch arm
+          export PATH=~/.buildman-toolchains/gcc-9.2.0-nolibc/arm-linux-gnueabi/bin/:$PATH
+          test/nokia_rx51_test.sh
+
   - job: test_py
     displayName: 'test.py'
     pool:

+ 8 - 0
.gitlab-ci.yml

@@ -170,6 +170,14 @@ 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:
+    - ./tools/buildman/buildman --fetch-arch arm;
+      export PATH=~/.buildman-toolchains/gcc-9.2.0-nolibc/arm-linux-gnueabi/bin/:$PATH;
+      test/nokia_rx51_test.sh
+
 # Test sandbox with test.py
 sandbox test.py:
   tags: [ 'all' ]

+ 7 - 0
.travis.yml

@@ -50,6 +50,8 @@ addons:
     - mtools
     - openssl
     - sbsigntool
+    - fakeroot
+    - mtd-utils
 
 install:
  # Clone uboot-test-hooks
@@ -492,6 +494,11 @@ matrix:
       script:
         - make tools-only_config envtools -j$(nproc)
 
+    - name: "Run tests for Nokia RX-51 (aka N900)"
+      script:
+        - export PATH=~/.buildman-toolchains/gcc-9.2.0-nolibc/arm-linux-gnueabi/bin/:$PATH
+        - test/nokia_rx51_test.sh
+
     # test/py
     - name: "test/py sandbox"
       env:

+ 1 - 0
board/nokia/rx51/MAINTAINERS

@@ -5,3 +5,4 @@ F:	board/nokia/rx51/
 F:	include/configs/nokia_rx51.h
 F:	configs/nokia_rx51_defconfig
 F:	doc/README.nokia_rx51
+F:	test/nokia_rx51_test.sh

File diff suppressed because it is too large
+ 58 - 0
test/nokia_rx51_test.sh


Some files were not shown because too many files changed in this diff