From 850e6b9a924eae7bdab31a93e033cada3495aa7f Mon Sep 17 00:00:00 2001 From: Icarus Sparry Date: Thu, 27 Apr 2017 11:18:59 -0700 Subject: [PATCH] Allow running only a single test If the environment variable RUN_JUST_ONE is set then skip any test which is not numerically equal to it. Signed-off-by: Icarus Sparry --- test/functional/swupdlib.bash | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/functional/swupdlib.bash b/test/functional/swupdlib.bash index f995b69..53ca195 100644 --- a/test/functional/swupdlib.bash +++ b/test/functional/swupdlib.bash @@ -40,6 +40,11 @@ EOF done } +# If the variable RUN_JUST_ONE is set then only run that test +maybeskip() { + [ -z "$RUN_JUST_ONE" ] || [ "$RUN_JUST_ONE" -eq "$BATS_TEST_NUMBER" ] || skip +} + set_os_release() { local ver=$1 local bundle=$2