Skip to content

Commit

Permalink
workflows: use dynamic DYNAMIC_RUNTIME_VARS
Browse files Browse the repository at this point in the history
Commit 02fcda1 ("CI: add archive support") made the mistake
to borrow DYNAMIC_RUNTIME_VARS and reset it without checking
other users, so we reset DYNAMIC_RUNTIME_VARS on other workflows
which would stop the tests from actually starting.

Fix this.

Fixes: 02fcda1 ("CI: add archive support")
Signed-off-by: Luis Chamberlain <[email protected]>
  • Loading branch information
mcgrof committed Oct 25, 2024
1 parent 9385003 commit e98b58b
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 34 deletions.
6 changes: 3 additions & 3 deletions scripts/archive.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
ifeq (,$(wildcard $(CURDIR)/.config))
else

DYNAMIC_RUNTIME_VARS :=
ARCHIVE_DYNAMIC_RUNTIME_VARS :=

ifneq (,$(DEMO))
DYNAMIC_RUNTIME_VARS += \
ARCHIVE_DYNAMIC_RUNTIME_VARS += \
"kdevops_archive_demo": True
endif

Expand All @@ -17,6 +17,6 @@ ci-archive:
--inventory localhost, \
playbooks/kdevops_archive.yml \
-e 'ansible_python_interpreter=/usr/bin/python3' \
--extra-vars '{ $(DYNAMIC_RUNTIME_VARS) }' \
--extra-vars '{ $(ARCHIVE_DYNAMIC_RUNTIME_VARS) }' \
--extra-vars=@./extra_vars.yaml
endif
14 changes: 7 additions & 7 deletions workflows/blktests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ endif # CONFIG_KERNEL_CI

EXTRA_VAR_INPUTS += extend-extra-args-blktests

DYNAMIC_RUNTIME_VARS := "kdevops_run_blktests": True
BLKTESTS_DYNAMIC_RUNTIME_VARS := "kdevops_run_blktests": True
ifneq (,$(RUN_FAILURES))
DYNAMIC_RUNTIME_VARS += , "run_tests_on_failures": True
BLKTESTS_DYNAMIC_RUNTIME_VARS += , "run_tests_on_failures": True
endif

ifneq (,$(SKIP_RUN))
DYNAMIC_RUNTIME_VARS += , "blktests_skip_run": True
BLKTESTS_DYNAMIC_RUNTIME_VARS += , "blktests_skip_run": True
endif

extend-extra-args-blktests:
Expand All @@ -71,7 +71,7 @@ blktests:

blktests-baseline:
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
-f 30 -i hosts -l baseline playbooks/blktests.yml --tags run_tests,copy_results --extra-vars '{ $(DYNAMIC_RUNTIME_VARS) }' --extra-vars=@./extra_vars.yaml $(LIMIT_HOSTS)
-f 30 -i hosts -l baseline playbooks/blktests.yml --tags run_tests,copy_results --extra-vars '{ $(BLKTESTS_DYNAMIC_RUNTIME_VARS) }' --extra-vars=@./extra_vars.yaml $(LIMIT_HOSTS)

blktests-baseline-loop:
$(Q)$(BLKTEST_KERNEL_CI_LOOP) baseline $(LIMIT_HOSTS)
Expand All @@ -81,15 +81,15 @@ blktests-baseline-kernelci:

blktests-baseline-skip-kdevops-update:
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
-f 30 -i hosts -l baseline playbooks/blktests.yml --tags run_tests,copy_results --skip-tags git_update --extra-vars '{ $(DYNAMIC_RUNTIME_VARS) }' --extra-vars=@./extra_vars.yaml $(LIMIT_HOSTS)
-f 30 -i hosts -l baseline playbooks/blktests.yml --tags run_tests,copy_results --skip-tags git_update --extra-vars '{ $(BLKTESTS_DYNAMIC_RUNTIME_VARS) }' --extra-vars=@./extra_vars.yaml $(LIMIT_HOSTS)

blktests-baseline-run-oscheck-only:
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
-f 30 -i hosts -l baseline playbooks/blktests.yml --tags run_tests,copy_results --skip-tags git_update,reboot,clean_results --extra-vars '{ $(DYNAMIC_RUNTIME_VARS) }' --extra-vars=@./extra_vars.yaml $(LIMIT_HOSTS)
-f 30 -i hosts -l baseline playbooks/blktests.yml --tags run_tests,copy_results --skip-tags git_update,reboot,clean_results --extra-vars '{ $(BLKTESTS_DYNAMIC_RUNTIME_VARS) }' --extra-vars=@./extra_vars.yaml $(LIMIT_HOSTS)

blktests-dev:
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
-f 30 -i hosts -l dev playbooks/blktests.yml --tags run_tests,copy_results --extra-vars '{ $(DYNAMIC_RUNTIME_VARS) }' --extra-vars=@./extra_vars.yaml $(LIMIT_HOSTS)
-f 30 -i hosts -l dev playbooks/blktests.yml --tags run_tests,copy_results --extra-vars '{ $(BLKTESTS_DYNAMIC_RUNTIME_VARS) }' --extra-vars=@./extra_vars.yaml $(LIMIT_HOSTS)

blktests-baseline-results:
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
Expand Down
6 changes: 3 additions & 3 deletions workflows/cxl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ifeq (y,$(CONFIG_QEMU_ENABLE_CXL_DEMO_DCD_TOPOLOGY_1))
CXL_ARGS += kdevops_qmp_str=$(CONFIG_QEMU_QMP_COMMAND_LINE_STRING)
endif

DYNAMIC_RUNTIME_VARS := "kdevops_run_cxl_tests": $(CONFIG_ENABLE_CXL_TEST)
CXL_DYNAMIC_RUNTIME_VARS := "kdevops_run_cxl_tests": $(CONFIG_ENABLE_CXL_TEST)
WORKFLOW_ARGS += $(CXL_ARGS)
BOOTLINUX_CXL_HELP :=

Expand All @@ -28,14 +28,14 @@ cxl-test-probe:
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
-f 30 -i hosts playbooks/cxl.yml \
--tags vars,cxl-test-prep,cxl-test-probe \
--extra-vars '{ $(DYNAMIC_RUNTIME_VARS) }' \
--extra-vars '{ $(CXL_DYNAMIC_RUNTIME_VARS) }' \
$(LIMIT_HOSTS)

cxl-test-meson:
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
-f 30 -i hosts playbooks/cxl.yml \
--tags vars,cxl-test-prep,cxl-test-meson \
--extra-vars '{ $(DYNAMIC_RUNTIME_VARS) }' \
--extra-vars '{ $(CXL_DYNAMIC_RUNTIME_VARS) }' \
$(LIMIT_HOSTS)

cxl-results:
Expand Down
28 changes: 14 additions & 14 deletions workflows/fstests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,39 +80,39 @@ FSTEST_KERNEL_CI_LOOP := scripts/workflows/fstests/run_kernel_ci.sh
FSTEST_KERNEL_CI_LOOP_KOTD := scripts/workflows/fstests/run_kernel_ci_kotd.sh
endif # CONFIG_KERNEL_CI

DYNAMIC_RUNTIME_VARS := "kdevops_run_fstests": True
FSTESTS_DYNAMIC_RUNTIME_VARS := "kdevops_run_fstests": True
ifneq (,$(RUN_FAILURES))
DYNAMIC_RUNTIME_VARS += , "run_tests_on_failures": True
FSTESTS_DYNAMIC_RUNTIME_VARS += , "run_tests_on_failures": True
endif

ifneq (,$(SKIP_RUN))
DYNAMIC_RUNTIME_VARS += , "fstests_skip_run": True
FSTESTS_DYNAMIC_RUNTIME_VARS += , "fstests_skip_run": True
endif

ifeq (y,$(CONFIG_FSTESTS_ENABLE_JOURNAL))
DYNAMIC_RUNTIME_VARS += , "fstests_journal": True
FSTESTS_DYNAMIC_RUNTIME_VARS += , "fstests_journal": True
endif

ifneq (,$(INITIAL_BASELINE))
DYNAMIC_RUNTIME_VARS += , "fstests_initial_baseline": True
FSTESTS_DYNAMIC_RUNTIME_VARS += , "fstests_initial_baseline": True
endif

ifneq (,$(START_AFTER))
DYNAMIC_RUNTIME_VARS += , "fstests_start_after": True
DYNAMIC_RUNTIME_VARS += , "fstests_start_after_test": "$(START_AFTER)"
FSTESTS_DYNAMIC_RUNTIME_VARS += , "fstests_start_after": True
FSTESTS_DYNAMIC_RUNTIME_VARS += , "fstests_start_after_test": "$(START_AFTER)"
endif

ifneq (,$(SKIP_TESTS))
DYNAMIC_RUNTIME_VARS += , "fstests_skip_tests_enable": True
DYNAMIC_RUNTIME_VARS += , "fstests_skip_tests": "$(SKIP_TESTS)"
FSTESTS_DYNAMIC_RUNTIME_VARS += , "fstests_skip_tests_enable": True
FSTESTS_DYNAMIC_RUNTIME_VARS += , "fstests_skip_tests": "$(SKIP_TESTS)"
endif

ifeq (y,$(CONFIG_DEVCONFIG_ENABLE_SYSTEMD_JOURNAL_REMOTE))
FSTESTS_BASELINE_EXTRA += journal-ln
endif

ifneq (,$(COUNT))
DYNAMIC_RUNTIME_VARS += , "oscheck_extra_args": "-I $(COUNT)"
FSTESTS_DYNAMIC_RUNTIME_VARS += , "oscheck_extra_args": "-I $(COUNT)"
endif

fstests: $(FSTESTS_BASELINE_EXTRA)
Expand All @@ -129,7 +129,7 @@ fstests-baseline: $(FSTESTS_BASELINE_EXTRA)
$(Q)PYTHONUNBUFFERED=1 ansible-playbook $(ANSIBLE_VERBOSE) \
-f 30 -i hosts -l baseline playbooks/fstests.yml \
--tags vars,run_tests,copy_results \
--extra-vars '{ $(DYNAMIC_RUNTIME_VARS) }' \
--extra-vars '{ $(FSTESTS_DYNAMIC_RUNTIME_VARS) }' \
--extra-vars=@./extra_vars.yaml $(LIMIT_HOSTS)

fstests-baseline-loop: $(KDEVOPS_EXTRA_VARS)
Expand All @@ -144,7 +144,7 @@ fstests-baseline-skip-kdevops-update: $(KDEVOPS_EXTRA_VARS)
--tags run_tests,copy_results \
--skip-tags git_update \
--extra-vars \
'{ $(DYNAMIC_RUNTIME_VARS) }' \
'{ $(FSTESTS_DYNAMIC_RUNTIME_VARS) }' \
--extra-vars=@./extra_vars.yaml \
$(LIMIT_HOSTS)

Expand All @@ -154,7 +154,7 @@ fstests-baseline-run-oscheck-only: $(KDEVOPS_EXTRA_VARS)
--tags run_tests,copy_results \
--skip-tags git_update,reboot,clean_results \
--extra-vars \
'{ $(DYNAMIC_RUNTIME_VARS) }' \
'{ $(FSTESTS_DYNAMIC_RUNTIME_VARS) }' \
--extra-vars=@./extra_vars.yaml \
$(LIMIT_HOSTS)

Expand All @@ -179,7 +179,7 @@ fstests-dev: $(KDEVOPS_EXTRA_VARS)
-f 30 -i hosts -l dev playbooks/fstests.yml \
--tags vars,run_tests,copy_results \
--extra-vars \
'{ $(DYNAMIC_RUNTIME_VARS) }' \
'{ $(FSTESTS_DYNAMIC_RUNTIME_VARS) }' \
--extra-vars=@./extra_vars.yaml $(LIMIT_HOSTS)

fstests-baseline-results-tfb-ls: $(KDEVOPS_EXTRA_VARS)
Expand Down
6 changes: 3 additions & 3 deletions workflows/linux/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ BOOTLINUX_ARGS += bootlinux_9p_mount_tag='$(subst ",,$(CONFIG_BOOTLINUX_9P_MOUNT
LINUX_CLONE_DEFAULT_TYPE := linux-clone-9p
endif

# XXX: I can't seem to use after this DYNAMIC_RUNTIME_VARS += for other
# XXX: I can't seem to use after this LINUX_DYNAMIC_RUNTIME_VARS += for other
# future dynamic run time variables. So figure how the hell to do that
# so we can enable other dynamic variables for other make targets other
# than uninstall. For now this does it for us.
Expand All @@ -61,7 +61,7 @@ endif
#
# We use override as other subsystems may use this too.
ifneq (,$(KVER))
override DYNAMIC_RUNTIME_VARS = "uninstall_kernel_ver": "$(KVER)"
override LINUX_DYNAMIC_RUNTIME_VARS = "uninstall_kernel_ver": "$(KVER)"
endif

BOOTLINUX_ARGS += bootlinux_cxl_test=$(CONFIG_ENABLE_CXL_TEST)
Expand Down Expand Up @@ -124,7 +124,7 @@ linux-uninstall:
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) -i \
$(KDEVOPS_HOSTFILE) $(KDEVOPS_PLAYBOOKS_DIR)/bootlinux.yml \
--tags uninstall-linux,vars \
--extra-vars '{ "uninstall_kernel_enable": "True", $(DYNAMIC_RUNTIME_VARS) }' \
--extra-vars '{ "uninstall_kernel_enable": "True", $(LINUX_DYNAMIC_RUNTIME_VARS) }' \
$(LIMIT_HOSTS)

linux-clone-clients: $(KDEVOPS_NODES)
Expand Down
8 changes: 4 additions & 4 deletions workflows/selftests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ ifeq (y,$(CONFIG_WORKFLOWS_DEDICATED_WORKFLOW))
export KDEVOPS_HOSTS_TEMPLATE := selftests.j2
endif

DYNAMIC_RUNTIME_VARS := "kdevops_run_selftests": True
SELFTESTS_DYNAMIC_RUNTIME_VARS := "kdevops_run_selftests": True

ifneq (,$(SKIP_RUN))
DYNAMIC_RUNTIME_VARS += , "selftests_skip_run": True
SELFTESTS_DYNAMIC_RUNTIME_VARS += , "selftests_skip_run": True
endif

ifneq (,$(SKIP_REBOOT))
DYNAMIC_RUNTIME_VARS += , "selftests_skip_reboot": True
SELFTESTS_DYNAMIC_RUNTIME_VARS += , "selftests_skip_reboot": True
endif

SELFTESTS_HELP_TARGETS := selftests-help-main
Expand All @@ -39,7 +39,7 @@ selftests:
selftests-baseline:
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
-f 30 -i hosts -l baseline playbooks/selftests.yml \
--extra-vars '{ $(DYNAMIC_RUNTIME_VARS) }' \
--extra-vars '{ $(SELFTESTS_DYNAMIC_RUNTIME_VARS) }' \
--tags vars,run_tests,copy_results,check_results $(LIMIT_HOSTS)

selftests-results:
Expand Down

0 comments on commit e98b58b

Please sign in to comment.