Skip to content

Commit 16fc636

Browse files
committed
fstests: add support to customize groups through CLI
It would be good to allow CIs to customize the group we want to test. Right now we default to "auto" but it would be good for a CI to let the user drop down a menu and click on "quick" for instance. Demo: $ make mrproper $ make defconfig-xfs_reflink_4k FSTESTS_GROUP="quick" $ grep FSTESTS_RUN_CUSTOM_GROUP_TESTS .config CONFIG_FSTESTS_RUN_CUSTOM_GROUP_TESTS="quick" Suggested-by: Carlos Maiolino <[email protected]> Signed-off-by: Luis Chamberlain <[email protected]>
1 parent 59aee56 commit 16fc636

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

workflows/fstests/Kconfig

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ config FSTESTS_SOAK_DURATION_SET_BY_CLI
55
output yaml
66
default $(shell, scripts/check-cli-set-var.sh SOAK_DURATION)
77

8+
config FSTESTS_GROUP_TESTS_SET_BY_CLI
9+
bool
10+
output yaml
11+
default $(shell, scripts/check-cli-set-var.sh FSTESTS_GROUP)
12+
813
config HAVE_DISTRO_PREFERS_FSTESTS_WATCHDOG
914
bool
1015
default n
@@ -759,7 +764,9 @@ config FSTESTS_RUN_CUSTOM_GROUP_TESTS
759764
string "Run a custom group of fstests"
760765
default "auto" if FSTESTS_RUN_AUTO_GROUP_TESTS
761766
depends on FSTESTS_RUN_TESTS
762-
depends on !FSTESTS_ENABLE_RUN_CUSTOM_TESTS
767+
depends on FSTESTS_ENABLE_RUN_CUSTOM_TESTS
768+
default $(shell, ./scripts/append-makefile-vars.sh $(FSTESTS_GROUP)) if FSTESTS_ENABLE_RUN_CUSTOM_TESTS && FSTESTS_GROUP_TESTS_SET_BY_CLI
769+
default "auto" if FSTESTS_ENABLE_RUN_CUSTOM_TESTS && !FSTESTS_GROUP_TESTS_SET_BY_CLI
763770
help
764771
To configure fstests to run specific group of tests instead of the
765772
'auto' group.
@@ -774,7 +781,7 @@ config FSTESTS_EXCLUDE_TEST_GROUPS
774781
config FSTESTS_ENABLE_RUN_CUSTOM_TESTS
775782
bool "Enable running custom tests"
776783
depends on FSTESTS_RUN_TESTS
777-
default n
784+
default FSTESTS_GROUP_TESTS_SET_BY_CLI
778785
help
779786
Enable this only if you want to always run custom tests.
780787
In the future we will support the ability to dynamically run

0 commit comments

Comments
 (0)