Commit Graph

50 Commits

Author SHA1 Message Date
Simon Glass 7ec1255cea travis/gitlab/azure: Drop repeated buildman call with test.py
It does not seem to be necessary to run buildman again to show errors,
since any errors can be shown by the first invocation and there is only
a single board being built. Update this to simplify the code, using the
-e flag to make sure errors are shown.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2020-04-10 21:36:36 -04:00
Simon Glass cec1e856d3 travis/gitlab/azure: Simplify the exit code for test.py
It seems unnecessary to read the exit code and then check it again. Drop
this and just let the test.py provide the exit code directly.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2020-04-10 21:33:09 -04:00
Simon Glass e28e9db69c travis/gitlab/azure: Enable test_handoff
Ensure that this SPL test runs on gitlab.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2020-04-10 21:33:09 -04:00
Simon Glass dd5c954e91 travis/gitlab/azure: Use -W to avoid warnings check
We can use the -W flag to tell buildman to ignore warnings. Since we also
have -E defined, compiler warnings are promoted to errors, so they will
still cause a failure. But migration warnings of the form:

    ===================== WARNING ======================
    This board does not use CONFIG_DM. CONFIG_DM will be
    compulsory starting with the v2020.01 release.
    Failure to update may result in board removal.
    See doc/driver-model/migration.rst for more info.

will now be ignored.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 329f5ef51d (travis.yml: run buildman with option -E)
Reviewed-by: Tom Rini <trini@konsulko.com>
2020-04-10 21:33:09 -04:00
Simon Glass 4080d0970d travis/gitlab/azure: Use bash to avoid a_test_which_does_not_exist
Bash allows for variables to expand only if non-empty:

	$ var=test
	$ echo ${var:+"$var"}
	test
	$ echo ${var:+"-k $var"}
	-k test
	$ var=
	$ echo ${var:+"-k $var"}

Use this feature to avoid the workaround.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2020-04-10 21:32:53 -04:00
Simon Glass 4e32fed4d3 gitlab/azure: Use -w flag for all test.py builds
Avoid needing to know about the internal .bm-work directory, by passing
the -w flag to buildman.

This is not needed on travis since the -w flag is already used (from a
previous patch).

Drop the -P flag since this has no effect if -w is used.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2020-04-10 21:32:53 -04:00
Simon Glass 5bd95d63d1 gitlab/azure: Drop unnecessary if..fi when using test.py
Since TEST_PY_BD is always defined we can drop this check.

This does not affect travis since it has a single, unified script.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2020-04-10 21:32:41 -04:00
Simon Glass b52f5a1958 travis/gitlab/azure: Drop the buildman -d flag
This has no effect since -S is not given also. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2020-04-10 21:32:09 -04:00
Simon Glass 573605d441 travis/gitlab/azure: Drop BUILDMAN variable with test.py
This is not needed in the test.py part of the config, now since we use the
same name as the pytests.

Drop BUILDMAN, retaining it only for the 'build' parts of the config, i.e.
where we build multiple boards and don't run any tests.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2020-04-10 21:32:09 -04:00
Simon Glass 38806650fe travis/gitlab/azure: Use --board buildman flag with test.py
The current method of selecting the board to build with test.py is a bit
error-prone, e.g. with "^sandbox$" it actually builds 5 boards (all of
those in the sandbox architecture).

Use the (newish) --board flag instead, to get the same result.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2020-04-10 21:28:57 -04:00
Simon Glass bf0a81330d gitlab/azure: Use the -w option for sandbox_spl
Avoid needing to know about the internal .bm-work directory, by passing
the -w flag to buildman.

This does not affect travis since the previous commit already used the -w
flag.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2020-04-10 21:24:41 -04:00
Bin Meng 49fb28a4b2 azure/gitlab/travis: Add RISC-V SPL testing
This adds QEMU RISC-V 32/64 SPL testing. Unlike QEMU RISC-V 32/64,
we test SPL running in M-mode and U-Boot proper running in S-mode,
with a 4-core SMP configuration.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2020-04-10 15:54:16 -04:00
Bin Meng a379d330a9 azure/gitlab/travis: Add qemu-riscv32 testing
This adds the qemu-riscv32_defconfig test configuration.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2020-04-10 15:54:15 -04:00
Tom Rini 20bc19abb7 Azure/GitLab: Move to latest Docker images
- Based on newer 'bionic' snapshot
- GCC 9.0
- RISCV GRUB binaries

Signed-off-by: Tom Rini <trini@konsulko.com>
2020-04-10 15:53:01 -04:00
Tom Rini 1f47e2aca4 Xilinx changes for v2020.07
common:
 - Align ENV_FAT_INTERFACE
 - Fix MAC address source print log
 - Improve based autodetection code
 
 xilinx:
 - Enable netconsole
 
 Microblaze:
 - Setup default ENV_OFFSET/ENV_SECT_SIZE
 
 Zynq:
 - Multiple DT updates/fixes
 - Use DEVICE_TREE environment variable for DTB selection
 - Switch to single zynq configuration
 - Enable NOR flash via DM
 - Minor SPL print removal
 - Enable i2c mux driver
 
 ZynqMP:
 - Print multiboot register
 - Enable cache commands in mini mtest
 - Multiple DT updates/fixes
 - Fix firmware probing when driver is not enabled
 - Specify 3rd backup RAM boot mode in SPL
 - Add SPL support for zcu102 v1.1 and zcu111 revA
 - Redesign debug uart enabling and psu_init delay
 - Enable full u-boot run from EL3
 - Enable u-boot.itb generation without ATF with U-Boot in EL3
 
 Versal:
 - Enable distro default
 - Enable others SPI flashes
 - Enable systems without DDR
 
 Drivers:
 - Gem:
   - Flush memory after freeing
   - Handle mdio bus separately
 - Watchdog:
   - Get rid of unused global data pointer
   - Enable window watchdog timer
 - Serial:
   - Change reinitialization logic in zynq serial driver
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQQbPNTMvXmYlBPRwx7KSWXLKUoMIQUCXoxw9wAKCRDKSWXLKUoM
 IbQxAKCK23yTy4FoN8oTGTYsbmLOA9kVUQCbBx8lg4nBeA8ihSaAnY+HMDF37YI=
 =Lg54
 -----END PGP SIGNATURE-----

Merge tag 'xilinx-for-v2020.07' of https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze into next

Xilinx changes for v2020.07

common:
- Align ENV_FAT_INTERFACE
- Fix MAC address source print log
- Improve based autodetection code

xilinx:
- Enable netconsole

Microblaze:
- Setup default ENV_OFFSET/ENV_SECT_SIZE

Zynq:
- Multiple DT updates/fixes
- Use DEVICE_TREE environment variable for DTB selection
- Switch to single zynq configuration
- Enable NOR flash via DM
- Minor SPL print removal
- Enable i2c mux driver

ZynqMP:
- Print multiboot register
- Enable cache commands in mini mtest
- Multiple DT updates/fixes
- Fix firmware probing when driver is not enabled
- Specify 3rd backup RAM boot mode in SPL
- Add SPL support for zcu102 v1.1 and zcu111 revA
- Redesign debug uart enabling and psu_init delay
- Enable full u-boot run from EL3
- Enable u-boot.itb generation without ATF with U-Boot in EL3

Versal:
- Enable distro default
- Enable others SPI flashes
- Enable systems without DDR

Drivers:
- Gem:
  - Flush memory after freeing
  - Handle mdio bus separately
- Watchdog:
  - Get rid of unused global data pointer
  - Enable window watchdog timer
- Serial:
  - Change reinitialization logic in zynq serial driver

Signed-off-by: Tom Rini <trini@konsulko.com>
2020-04-07 17:13:35 -04:00
Michal Simek f7c6ee7fe7 ARM: zynq: Switch to single zynq configurations
There are a lot of zynq configurations which can be merged together and use
only one for all. The similar change has been done for ZynqMP by commit
be1b6c32d9 ("arm64: zynqmp: Use zynqmp_virt platform")

Build SPL with u-boot.img for zc706 like this.
export DEVICE_TREE=zynq-zc706 && make xilinx_zynq_virt_defconfig && make -j8
u-boot.img is generic for all boards.

Tested on Zybo, zc702, zc706, zc770-xm011-x16, cc108 and microzed.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-04-06 12:51:31 +02:00
Tom Rini 7261833f36 Azure / GitLab / Travis: Add Kconfig unit tests to a job
The Kconfig language provides a unit test that can be run.  As these
require pytest to be installed and run very quickly, bundle them in to
an existing CI job.

Signed-off-by: Tom Rini <trini@konsulko.com>
2020-03-16 18:54:18 -04:00
Heinrich Schuchardt 3eb7b78b42 gitlab: build HTML documentation
Several patches delivered incorrect restructured text as documentation. We
should be able to discover this in Gitlab CI.

Provide a build step for 'make htmldocs'.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-25 09:06:40 -05:00
Tom Rini 15ae500026 Azure / GitLab: Update Docker image
Bring in a newer Docker image to build on that has everything required
for running 'make htmldocs'.

Signed-off-by: Tom Rini <trini@konsulko.com>
2020-02-24 11:04:29 -05:00
Tom Rini 26a426a100 travis/gitlab/azure: Ensure we use python3 always
When running our tests there are some cases where as part of the Python
2.7 to Python 3.6 migration we didn't force Python 3.6 to be used as
everything wasn't yet migrated.  Now that everything is, make sure to
tell virtualenv to use python3.  In the case of Travis this is best done
by making the tools test happen after the main tests so that it will
already have been run in all cases, TEST_PY_TOOLS is a subset of
TEST_PY_BD.

Signed-off-by: Tom Rini <trini@konsulko.com>
2020-02-13 10:10:50 -05:00
Simon Glass 26d4d77035 Revert "gitlab: Disable SDL when building sandbox"
This is not needed now that we have SDL2 in the docker image. It causes
test failures for tests which need video to work.

This reverts commit af800722eb.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-12 08:05:54 -05:00
Tom Rini 9a8942b53d sandbox conversion to SDL2
TPM TEE driver
 Various minor sandbox video enhancements
 New driver model core utility functions
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEslwAIq+Gp8wWVbYnfxc6PpAIreYFAl48iogACgkQfxc6PpAI
 reaVzAf/an3/yKe6r3CVWlcRV6H/dVg1ApnnLpX7jS0p0b++oCVvOiy7z1WPXj3k
 b1SSgENDeeZ/8EHio+Gf7ZidH/TGEj7L6YEFwd1t60GMkZiWEkNf4Z53tw482YG+
 96hoPD+ySTW+ddIdVHWAFG2I4aEiKHANJAp/ItNdD+rLbrEwNQy+eiK5JTOk80B6
 /X8AJCLZeAC1s7vs+2+WolgjT78QGzA9HHalMiublcqh0ivKKk0QeQiOKKPe8JYJ
 om5YY1TxayQ60Xmo5f39/SBfzEEklxw83sU9o1tBeYzyVUpu7fQdkxiDbWdsij77
 DgwLdeYQJGbN+hdSWE0gjTqyhW+lWA==
 =KRoA
 -----END PGP SIGNATURE-----

Merge tag 'dm-pull-6feb20' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm

sandbox conversion to SDL2
TPM TEE driver
Various minor sandbox video enhancements
New driver model core utility functions
2020-02-11 10:58:41 -05:00
Tom Rini 96ff825d31 azure/gitlab: Update to Docker to have SDL2 available
Update to a newer Docker image that contains SDL2 libraries as required
by recent Sandbox changes.

Signed-off-by: Tom Rini <trini@konsulko.com>
2020-02-07 11:47:28 -05:00
Heinrich Schuchardt 24df1b14f3 gitlab: use our own GRUB
Up to now we have been relying on openSUSE repositories for GRUB on arm and
arm64 though we have included GRUB in our Docker image.

Use the GRUB included in our Docker image.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-02-07 11:16:28 -05:00
Simon Glass af800722eb gitlab: Disable SDL when building sandbox
I am not sure how to add libsdl2-dev to the gitlab image, so disable
building sandbox with SDL for now.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-05 19:33:46 -07:00
Tom Rini c8a1198665 gitlab/azure: Update to latest container tag
- Based on bionic-20200112 tag from Ubuntu
- Add graphviz (Heinrich)

Signed-off-by: Tom Rini <trini@konsulko.com>
2020-01-20 12:23:18 -05:00
Tom Rini 12183df6cd gitlab/azure: Update to latest container
- Updated base snapshot
- QEMU v4.2.0

Signed-off-by: Tom Rini <trini@konsulko.com>
2020-01-10 17:07:27 -05:00
Tom Rini 0219d014a7 gitlab/azure: Enable LLVM tests
Now that we have again fixed the problems that building with clang
exposes, enable these tests on Azure and GitLab-CI as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
2019-11-06 22:54:28 -05:00
Tom Rini 085b8978b9 gitlab/travis: Rework how and when we use virtualenv in order to use python3
As things stand today, we have tools that CI requires where "python"
must be "python2".  We need to use a virtualenv and pip in order to
ensure that our pytest tests can be run.  Rework things slightly so
that:
- On Travis-CI, we install python-pyelftools for the platforms that
  require pyelftools to be installed.
- On GitLab-CI, we move to a newer base image that includes python3-pip
  and continue to use a virtualenv per job that needs it, for the
  correct set of packages.

Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Simon Glass <sjg@chromium.org> [on sandbox]
Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-30 17:48:47 -04:00
Marek Vasut 3c941e048c test/py: Fix pytest4 deprecation warnings
Fix the following spit from pytest:

u-boot/test/py/conftest.py:438: RemovedInPytest4Warning: MarkInfo objects are deprecated as they contain merged marks which are hard to deal with correctly.
  Please use node.get_closest_marker(name) or node.iter_markers(name).
  Docs: https://docs.pytest.org/en/latest/mark.html#updating-code
    for board in mark.args:

In both cases, the later suggestion is applicable.

Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Igor Opaniuk <igor.opaniuk@gmail.com>
[trini: Update for current file with a few more cases, un-pin pytest in CI]
Tested-by: Simon Glass <sjg@chromium.org> [on sandbox]
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-30 17:48:47 -04:00
Tom Rini 90d3d78a1c gitlab-ci: Prepend to PATH rather than replace it
Currently we set the entire PATH rather than prepend the new paths that
we need to have searched.  This however breaks parts of the "virtualenv"
that was have set up and need to use as that also will be modifying
PATH.  To fix this, prepend our new locations instead.

Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-30 17:48:46 -04:00
Tom Rini 4c749971be gitlab-ci: Fix indentation in some stanzas
In a number of our stanzas we had multi-line commands that were one
space short of alignment, correct this.

Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-30 17:48:46 -04:00
Tom Rini 28a5123417 gitlab-ci: Switch to Ubuntu 18.04 image
In order to run all filesystem tests we need to have newer ext4 tools,
move up to Ubuntu 18.04 'bionic' for our base.  We need to change
slightly how we invoke the provided grub-mkimage.  This will also make
future python3 work easier.

Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-08 12:10:38 -04:00
Tom Rini db7b860281 gitlab-ci: Have buildman use /tmp for output
When running as another user we might not be able to use '..' for
certain directories and this is the default for buildman.  Specify an
output directory instead.

Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-08 12:10:38 -04:00
Heinrich Schuchardt a11cb57def gitlab-ci: fix typo 'plaforms'
%s/plaforms/platforms/g

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-06 15:20:52 -04:00
Pierre-Jean Texier 1f3910da6e ci: add envtools support
This commit add envtools suppport to CI to verify if there
is no build issues.

Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
Acked-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2019-09-24 17:46:13 -04:00
Tom Rini d7ae932152 gitlab-ci: Consolidate some testsuite jobs
We do not need to split binman, buildman, dtoc and patman test suite
runs into 3 jobs.  Instead, run them as a single job.

Signed-off-by: Tom Rini <trini@konsulko.com>
2019-08-12 15:19:18 -04:00
Tom Rini edbe0d5664 gitlab-ci: Add USER environment variable to buildman/patman tests
The way that some of the tests here are designed, they expect USER to be
set in the environment.  This is not the case in the docker images, so
set a reasonable value.

Signed-off-by: Tom Rini <trini@konsulko.com>
2019-08-12 15:19:18 -04:00
Tom Rini 7298d82d91 gitlab-ci: Add qemu-riscv64 testing
Mirror the qemu-riscv64 testing we do on Travis.  Update to a newer
Docker image that contains riscv64-softmmu for QEMU.

Signed-off-by: Tom Rini <trini@konsulko.com>
2019-08-02 11:32:37 -04:00
Tom Rini 1013233a08 gitlab-ci: Remove unused TOOLCHAIN environment variable
As part of copying the logic from Travis to GitLab I kept the TOOLCHAIN
variable.  However we don't use that now as the Docker container already
has all toolchains so we don't need to do any downloading.  Remove this
variable.

Signed-off-by: Tom Rini <trini@konsulko.com>
2019-08-02 11:31:42 -04:00
Tom Rini b29cb0588c gitlab-ci: Switch to a Docker image that contains a QEMU we build
Rather than buiding QEMU for each test.py build it once in our
Dockerfile and re-use it as needed.

Signed-off-by: Tom Rini <trini@konsulko.com>
2019-07-29 08:19:02 -04:00
Tom Rini bfe9abe711 gitlab-ci: Update Docker image to xenial-20190720-24Jul2019 tag
- Add in lzma-alone for current binman tests
- Update to Ubuntu's xenial-20190720 tag (latest).

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2019-07-24 16:26:15 -04:00
Tom Rini 8481217467 gitlab-ci: Add pyelftools to the binman testsuite section
We need pyelftools here to run rather than skip some tests.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2019-07-24 16:26:15 -04:00
Simon Glass 53cd5d921d binman: Convert to use ArgumentParser
This class is the new way to handle arguments in Python. Convert binman
over to use it. At the same time, introduce commands so that we can
separate out the different parts of binman functionality.

Signed-off-by: Simon Glass <sjg@chromium.org>
2019-07-24 12:54:07 -07:00
Simon Glass 8acce60b10 binman: Pass the toolpath to tests
Tools like ifwitool may not be available in the PATH, but are available in
the build. These tools may be needed by tests, so allow tests to use the
--toolpath flag.

Also use this flag with travis.

Signed-off-by: Simon Glass <sjg@chromium.org>
2019-07-24 12:53:44 -07:00
Tom Rini f0db8395b4 gitlab-ci: Move the pyelfutils section
We need this for building some 64bit ARM platforms, not for test.py
runs.

Signed-off-by: Tom Rini <trini@konsulko.com>
2019-07-18 11:30:03 -04:00
Tom Rini 9f7bda1043 gitlab-ci: Split the world build into 4 jobs
To better allow for parallelization of the world build job split things
into 32bit ARM (687 boards), 64bit ARM (215), PowerPC (311 boards) and
everything else (167 boards).

While the 32bit ARM job is heavier than I would like, there is not a
natural split that would reduce it in half or so without requiring the
sort of hard to maintain splits we have to do in Travis CI.

Signed-off-by: Tom Rini <trini@konsulko.com>
2019-07-18 11:29:53 -04:00
Tom Rini 7fd0ea2b63 gitlab-ci: Add pyelftools when needed
In order to mirror current Travis CI support we need to install this
package via pip.

Signed-off-by: Tom Rini <trini@konsulko.com>
2019-07-18 11:29:52 -04:00
Tom Rini 699c0b93dc gitlab-ci: Add evb-ast2500 test.py test
Bring us back into line with current Travis tests.

Signed-off-by: Tom Rini <trini@konsulko.com>
2019-07-18 11:29:52 -04:00
Tom Rini 1a62a72218 gitlab-ci: Initial conversion of Travis CI build to GitLab CI
Migrate all of the logic in our current .travis.yml file to a GitLab CI
config file.  Notable changes are that this will run the jobs on runners
with the "all" tag.  The timeout for a job needs to be configured higher
than normal as we no longer split building the world up into a large
number of small jobs but instead perform one big build job.  We make use
of stages so that we build and run all of the QEMU + test.py tests first
in order to increase the chance that any problems will be found before
starting the final big build.

Signed-off-by: Tom Rini <trini@konsulko.com>
2019-07-18 11:29:46 -04:00