diff --git a/.github/workflows/wf.yml b/.github/workflows/wf.yml index 384e37b5..b8dbdda0 100644 --- a/.github/workflows/wf.yml +++ b/.github/workflows/wf.yml @@ -15,8 +15,7 @@ jobs: run: cd tests; chmod +x prepare; ./prepare - run: | export DISPLAY=:99; sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & - cd tests; chmod +x copy-configs patch-settings test + cd tests; chmod +x copy-configs test ./copy-configs - ./patch-settings ./test exit $? diff --git a/README.md b/README.md index 654d0fa3..ac93e601 100644 --- a/README.md +++ b/README.md @@ -21,9 +21,7 @@ to [examples](#some-ideas-to-start-with). ## Installation - Add `https://raw.githubusercontent.com/gwatcha/reaper-keys/master/index.xml` to Reapack. -- Optionally, install [SWS](https://sws-extension.org/) (by hand or from ReaTeam - Extensions). Although this extension _may_ work without SWS, the experience will be - worse. +- Install [SWS](https://sws-extension.org/) by hand or from ReaTeam Extensions. ## Features ### Bind key sequences @@ -152,16 +150,16 @@ For running tests locally you'd need some Linux distribution with X11 and `xdoto ```sh cd tests; -chmod +x prepare copy-configs patch-settings test +chmod +x prepare copy-configs test ./prepare # This will create a local Reaper installation ./copy-configs # This will make current instance of reaper-keys testable -./patch-settings # Or change test to true in internal/definitions/config.lua ./test # This will run every test and compare with reference projects ``` If you don't use X11 you can have a look at `.github/workflows/wf.yml` to see how x11 is emulated with Xvfb. +Use `./test -s` to skip first invocation which bypasses "Still evaluating" window. ### Writing tests diff --git a/internal/gui/feedback/controller.lua b/internal/gui/feedback/controller.lua index 31748637..681bf648 100644 --- a/internal/gui/feedback/controller.lua +++ b/internal/gui/feedback/controller.lua @@ -74,7 +74,7 @@ function feedback.update() feedback_view = FeedbackView:new() feedback_view:open() - if config.show_start_up_message and not config.test then + if config.show_start_up_message then reaper.ShowMessageBox(startup_msg, "Reaper Keys Open Message", 1) end diff --git a/internal/state_machine/state_machine.lua b/internal/state_machine/state_machine.lua index 3c5d1ce4..e90f2316 100644 --- a/internal/state_machine/state_machine.lua +++ b/internal/state_machine/state_machine.lua @@ -129,14 +129,14 @@ local function input() local hotkey = { context = section_id == 0 and "main" or "midi", key = ctxToState(ctx) } log.info("Input: " .. format.line(hotkey)) - if config.show_feedback_window and not config.test then feedback.clear() end + if config.show_feedback_window then feedback.clear() end local state = state_interface.get() local new_state = step(state, hotkey) state_interface.set(new_state) log.info("New state: " .. format.block(new_state)) - if config.test or not config.show_feedback_window then return end + if not config.show_feedback_window then return end feedback.displayState(new_state) feedback.update() diff --git a/tests/compare b/tests/compare index 595f8023..0ed0b682 100755 --- a/tests/compare +++ b/tests/compare @@ -3,11 +3,7 @@ from pathlib import Path from sys import argv left_file, right_file = Path(argv[1]).read_text(), Path(argv[2]).read_text() out = 0 -ignored_keys = ["/dev/null # still evaluating +[ $# -eq 0 ] && timeout 6 ./reaper/reaper -new -nosplash &>/dev/null # still evaluating for test in *.rks; do echo "Running $test"