Fix: Tests: utils.sh: fix unbound variable
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Fri, 7 Feb 2020 19:56:50 +0000 (14:56 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 11 Feb 2020 20:19:35 +0000 (15:19 -0500)
commit4e4aceb7f943c0017786c6a8ef83e7a3d86c334f
tree2a90d458175da2a1f2776908504558fc25e064ec
parent30d8bd898e9c3a6568f880a7de959dc9d5e2cecf
Fix: Tests: utils.sh: fix unbound variable

When loading `utils.sh`, we test the `LTTNG_TEST_TEARDOWN_TIMEOUT` and
define it to a default value if it's not defined already.

When running bash test scripts with the `-u` option to error out when
encountering unset variables it prints an error and exit

This commit uses a trick found here:
https://stackoverflow.com/questions/3601515/how-to-check-if-a-variable-is-set-in-bash

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: Id24937f974ffd1ab3250296499da9360f97d393d
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/utils/utils.sh
This page took 0.025016 seconds and 4 git commands to generate.