Test: Customize Fluxbox launch to get rid of toolbar in IDE tests. wxPython4
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Tue, 28 Feb 2023 15:06:13 +0100
branchwxPython4
changeset 3730 87dac789bdaf
parent 3729 1bd62761a8f6
child 3738 9ce94d0d3764
Test: Customize Fluxbox launch to get rid of toolbar in IDE tests.
tests/Makefile
--- a/tests/Makefile	Tue Feb 28 15:05:20 2023 +0100
+++ b/tests/Makefile	Tue Feb 28 15:06:13 2023 +0100
@@ -126,8 +126,10 @@
 sikuli_ide_tests = $(subst $(ide_test_dir)/,,$(wildcard $(ide_test_dir)/*.sikuli))
 pytest_ide_tests = $(subst $(ide_test_dir)/,,$(wildcard $(ide_test_dir)/*.pytest))
 
+fluxbox_command ?= echo "session.screen0.toolbar.placement: TopCenter" > fluxbox_init; (fluxbox -rc fluxbox_init >/dev/null 2>&1 &)
+
 define sikuli_idetest_command
-	(fluxbox >/dev/null 2>&1 &); BEREMIZPATH=$(build_dir)/beremiz sikulix -r $(src)/ide_tests/$(1)
+	$(fluxbox_command); BEREMIZPATH=$(build_dir)/beremiz sikulix -r $(src)/ide_tests/$(1)
 endef
 
 
@@ -135,7 +137,7 @@
 KILL_DELAY=430
 PYTEST=$(dir $(BEREMIZPYTHONPATH))/pytest
 define pytest_idetest_command
-	(fluxbox >/dev/null 2>&1 &); PYTHONPATH=$(ide_test_dir) timeout -k $(KILL_DELAY) $(DELAY) $(PYTEST) --maxfail=1 --timeout=100  $(src)/ide_tests/$(1)
+	$(fluxbox_command); PYTHONPATH=$(ide_test_dir) timeout -k $(KILL_DELAY) $(DELAY) $(PYTEST) --maxfail=1 --timeout=100  $(src)/ide_tests/$(1)
 endef
 
 # Xnest based interactive sessions for tests edit and debug. 
@@ -169,10 +171,10 @@
 	echo "$(ide_tests_targets) : Passed"
 
 xnest_xterm: built_apps
-	$(call xnest_run, bash -c '(fluxbox &);xterm')
+	$(call xnest_run, bash -c '$(fluxbox_command);xterm')
 
 xnest_sikuli: built_apps
-	$(call xnest_run, bash -c '(fluxbox &);(BEREMIZPATH=$(build_dir)/beremiz xterm -e sikulix &);xterm')
+	$(call xnest_run, bash -c '$(fluxbox_command);(BEREMIZPATH=$(build_dir)/beremiz xterm -e sikulix &);xterm')
 
 xvfb_sikuli: built_apps
 	echo "******************************************"