Skip to content
Snippets Groups Projects
Unverified Commit bec19c49 authored by Roman Azarenko's avatar Roman Azarenko
Browse files

CI: split supervisord config depending on job, make all shell scripts strict

Functional testing (both regular and API) relies on starting some services through supervisord. The set of services,
however, is different between regular and API functional testing.

For instance, functional testing does *not* expect `wifimngr` to run through supervisord, but instead executes it
separately. API test, on the other hand, expects supervisord to start `wifimngr`. The supervisord configuration file,
however, was the same for both instances.

At the time when regular functional test reloads supervisord configuration, the `wifimngr` executable hasn't been
compiled yet, and supervisord reports the following:

	ubusd: added process group
	wifimngr: added process group
	ubusd                            RUNNING   pid 285, uptime 0:00:03
	wifimngr                         FATAL     Exited too quickly (process log may have details)

The supervisord log file then contains this:

	valgrind: /builds/iopsys/wifimngr/wifimngr: No such file or directory

which is expected, since `wifimngr` hasn't been compiled yet.

* In supervisord v3.x, the abovementioned fatal error still results in a zero return code of `supervisorctl status all`.
The error thus goes unnoticed, and the pipeline continues.
* In supervisord v4.x, `supervisorctl status` correctly exits with a non-zero exit code, thus interrupting the script
and failing the pipeline.

The solution here is to have dedicated configuration for regular and API functional testing, where regular functional
testing doesn't use supervisord to manage wifimngr. There are multiple ways to approach this (two complete configs,
config per process etc). I picked two complete configs for simplicity, but this can be changed later.
parent f5701581
Branches
No related tags found
1 merge request!91CI: split supervisord config depending on job, make all shell scripts strict
Pipeline #66600 passed