Quality assurance in Ultibo

You can read here or here on what Ultibo really is and what it can give you.

Now, let’s get a very quick overview around QA and testing of your software.

Targeting specific platforms

Target one platform

Ultibo support five different platform groups:

  • RPI: Pi Zero/A/B/A+/B+/CM
  • RPI2: Pi 2B
  • RPI3: Pi 3B/3A+/3B+/CM3
  • RPI4: Pi 4B/400/CM4
  • QEMUVPB: QEMU Versatile PB

Quite opposite to common belief, the fact that demo and example projects are split by five above platform groups doesn’t imply that you have to create separate project for separate platform.

On contrary, not only you can create single project supporting many platforms, but you can also write a pieces of code targeting specific platform only, i.e.

  // General functions for "everyone"

  // Stuff available in Raspberry Pi 3 family only

  // Only newest stuff in RPi4

  // Do this only in testing environment (QEMU)

Targeting all but one platform

Free Pascal that is used in Ultibo allows exclusive conditionals using {$IFNDEF}:

  // A code that gets executed for every "real" platform, but not in QEMU environment.

Targeting two or three platforms

What about writing single code that targets two or more platforms (but not all except one — above example)?

Free Pascal allows conditional nesting using {$ELSEIF} as well, but this gets a little bit tricky from this point:

{$IF defined(RPI)}
  // Ignore... and do nothing
{$ELSEIF defined(RPI2)}
  // Ignore... and do nothing
{$ELSEIF defined(QEMUVPB)}
  // Some optional QA code or... ignore and do nothing
  // This will get executed for RPI3 and RPI4

A little bit tricky, but still possible.

Updating kernel image

If we are talking about QA then a quick ways of updating kernel image is a mandatory talk. Nobody serious thinks about this in terms of:

  1. Power-off your RPi and remove SD card
  2. Overwrite it on some PC
  3. Reinsert SD card and power-up Raspberry Pi

That would be totally pointless.

One of the most fabulous things about Ultibo programming is the fact that kernel image is not locked while Ultibo applications are running. You can overwrite it with a new version and restart RPi any time.

And you have many options for doing so:

(the last one is a must for Pi Zero family which has no networking ports except for the GPIO serial interface)

So… you have many ways of updating your RPi gear without pulling SD card in and out. And even more. With just a few lines of code you can write your very own auto-update feature!

More details here (last group on vast topic links list).

Leave a Reply