Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.arch.embedded > #29670
| From | Mikko OH2HVJ <mikko.syrjalahti@nospam.fi> |
|---|---|
| Newsgroups | comp.arch.embedded |
| Subject | Re: Tests in embedded |
| Date | 2020-05-17 11:26 +0300 |
| Organization | A noiseless patient Spider |
| Message-ID | <m28shr55nm.fsf@mspro.home> (permalink) |
| References | <r9o23d$9ln$1@dont-email.me> <m28shsbas6.fsf@mspro.home> <87mu68tfm8.fsf@nightsong.com> <m21rnjbyey.fsf@mspro.home> <r9pcnv$703$1@dont-email.me> |
pozz <pozzugno@gmail.com> writes: > Il 16/05/2020 19:08, Mikko OH2HVJ ha scritto: > [...] >> And repeatable builds. Once I set up Docker-based builds for some things >> there's no going back. Now I can compile a bit-perfect copy and start >> any troubleshooting or new versions from that. > > Docker-based builds... interesting, could you explain? If the compiler is available for Linux, you can create a Docker image, which is basically a stored image of disk. Then, you attach the source directory as a directory inside that 'image' and run your compile there. Since it uses Linux layered filesystem, any changes that are done inside the image only affect the top layer. After compile you start again from the original build image, which is exactly the same. Here's an example command I'm compiling one STM32 project from a Makefile in src/ directory: docker run -it --mount type=bind,source="$(pwd)"/src,target=/work/src \ stronglytyped/arm-none-eabi-gcc:latest /bin/bash -c "cd /work/src; make \ clean-all" That runs in interactive (-i) mode image "stronglytyped/arm-none-eabi-gcc:latest", which contains ARM GCC environment. The src/ directory is attached as /work/src inside that image. Then, bash is used to run "cd /work/src; make clean-all" inside that image. The makefile does the build, tests and outputs the binaries and programming files for me under /work/src/dist", which I can see as src/src/dist outside the docker. I'm actually running Mac and using Docker to do builds. And the exactly same Docker image+source code is run on the CI/CD/test server when I push my changes, so the binary compiled by CI/CD is exactly what I had while developing on my Mac. CI/CD server does the same compile and in addition runs HIL tests, code signing, delivers the package to staging area etc. This is how almost all modern (cloud) software is done, there's a lot to apply in embedded world. Of course, the integration/HIL testing and software delivery are usually very different! (To do production builds, use version controlled build image, not the :latest) -- mikko
Back to comp.arch.embedded | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Tests in embedded pozz <pozzugno@gmail.com> - 2020-05-16 08:43 +0200
Re: Tests in embedded Mikko OH2HVJ <mikko.syrjalahti@nospam.fi> - 2020-05-16 10:26 +0300
Re: Tests in embedded Paul Rubin <no.email@nospam.invalid> - 2020-05-16 02:04 -0700
Re: Tests in embedded Mikko OH2HVJ <mikko.syrjalahti@nospam.fi> - 2020-05-16 20:08 +0300
Re: Tests in embedded pozz <pozzugno@gmail.com> - 2020-05-16 20:51 +0200
Re: Tests in embedded Clifford Heath <no.spam@please.net> - 2020-05-17 09:35 +1000
Re: Tests in embedded Mikko OH2HVJ <mikko.syrjalahti@nospam.fi> - 2020-05-17 11:26 +0300
Re: Tests in embedded Dave Nadler <drn@nadler.com> - 2020-06-11 05:38 -0700
csiph-web