Gergely Nagy
6479579e76
Merge pull request #954 from gedankenexperimenter/t/testing.nitpicks
...
Improve consistency and readability of code in testing/*
4 years ago
Michael Richters
470363f893
Whitespace only, for readability
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
bc14df9f8b
Follow naming convention for private member variables
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
371ba30ed3
Make SimHarness::CycleTime() const correct
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Jesse Vincent
50698376ce
Merge pull request #953 from keyboardio/tests/exit-with-results
...
testing: Do not ignore the return value of RUN_ALL_TESTS
4 years ago
Gergely Nagy
835c332303
testing: Do not ignore the return value of RUN_ALL_TESTS
...
Instead of ignoring the return value of RUN_ALL_TESTS, exit with the same status
code. This will make failing tests actually fail the build, instead of logging
the error, and then exiting successfully.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
4 years ago
Gergely Nagy
518989ba57
Merge pull request #944 from keyboardio/standardize-key-report-names
...
Switch ConsumerControlReport and SystemControlReport to use ActiveKey…
4 years ago
Gergely Nagy
79589610ba
Merge pull request #947 from keyboardio/fix/make-clean
...
"make clean" needs to clear out build and output paths
4 years ago
Jesse Vincent
a2e3eb1e9d
Merge pull request #950 from gedankenexperimenter/t/redial
...
Add rudimentary tests for Redial plugin
4 years ago
Michael Richters
9de531bda0
Add rudimentary tests for Redial plugin
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Jesse Vincent
daaad86852
Merge pull request #949 from gedankenexperimenter/t/qukeys
...
Add some basic Qukeys testcases
4 years ago
Michael Richters
ac97009327
Improve consistency of Qukeys testcases
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
1d4fd1ed3a
Rename sketch.h -> shared.h
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
f1e0126b8d
Add copyright & license info
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
fd9b7462b0
Add four basic Qukeys testcases
...
These are very rudimentary testcases, and already need to be rewritten, but
should serve as the first step in a process of developing better, more robust
testcases in the future.
- A single tap of a qukey alone
- A hold timeout test
- A full overlap test (subsequent key released first)
- A rollover test (subsequent key released late enough to produce primary qukey value)
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Jesse Vincent
7f6d09c15b
Merge pull request #948 from gedankenexperimenter/t/keyboard-hid-modifiers
...
Add modifier information to KeyboardReport class
4 years ago
Jesse Vincent
820560f77c
Change the target the test suite uses when compiling sketches to avoid duplicate compilation
4 years ago
Jesse Vincent
e96d06893c
Make it possible to only run a subset of the simulator tests using the TEST_PATH variable
...
Suggested by @gendankenexperimenter
4 years ago
Michael Richters
2d47d64961
Add testcase for basic modifier keycodes
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
2207c3f4f8
Add modifier information to KeyboardReport class
...
This change adds the keycodes for keyboard modifier keys to the vector returned
by KeyboardReport::ActiveKeycodes(). Also, a simple method for getting the
modifiers byte from a keyboard hid report.
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Jesse Vincent
9ec11f1b4b
Force compilation of sketches in the simulator.
...
Because the Arduino build system doesn't -really- interface well with Makefiles, there's no other way to pick up Kaleidoscope or sketch changes from Make. This -does- slow down sim builds / test runs a bit.
Fixes #942
4 years ago
Jesse Vincent
5c0edd9b69
"make clean" needs to clear out build and output paths
...
It previously did not. Also, try -not- to clean out google test if the build dir doesn't even exist
4 years ago
Jesse Vincent
240f141538
Reduce the number of cycles the "long" test runs for, for perf reasons
4 years ago
Jesse Vincent
895f5f1e00
Add some tests for SetCycleTime
4 years ago
Jesse Vincent
cfcfd3b75e
Add diag strings for some tests to help debug
4 years ago
Jesse Vincent
a646261982
Add SetCycleTime and CycleTime to control how many ms each cycle take.
4 years ago
Jesse Vincent
b5c744a7cf
Move RunForMillis.cpp to the .cpp file.
...
Remove RunMillis and RunForCycles. I know this gets rid of parallelism in naming, but the alternate versions read wrong to me
4 years ago
Michael Richters
1c24228f80
Add testcases for `RunForMillis()` simulator function
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
76a48e0a12
Add `RunFor*` variants for `Cycles` and `Millis` functions
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
69fc1dc0e2
Add `SimHarness.RunMillis(t)` function
...
For now, this is just a wrapper around RunCycles(n), but the two could diverge
in the future. RunMillis(t) should always cause `t` milliseconds to elapse in
the simulator, regardless of how many cycles that takes.
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Jesse Vincent
3a16fc95fb
Cut down the sketch for the test to remove extraneous stuff
4 years ago
Michael Richters
23a78e119b
Testcase for simultaneous keypresses
...
This test runs multiple keypresses in the same cycle, and checks to see that the
last report generated contains the correct active keycodes (and no others).
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
39f0bbe159
Add KeyAddr versions of Press() & Release() to the simulator
...
This commit adds versions of `SimHarness::Press()` and `SimHarness::Release()`
functions that use a `KeyAddr` parameter instead of row & column integers.
to build the test.
4 years ago
Jesse Vincent
51d48245ad
Switch ConsumerControlReport and SystemControlReport to use ActiveKeycodes and ActiveKeycode respectively, to match Keyboard.
4 years ago
Jesse Vincent
7a12be25bc
Fix an embarassing typo.
...
This is why we do PRs, even for quick fixes and don't just push to master because we're the project lead and yolo.
4 years ago
Jesse Vincent
de45646c9d
extract out a variable for ARDUINO_BUILDER_TOOLS_PATH to make it easier to
...
get up and running on arch
4 years ago
Gergely Nagy
1d0d2d43d0
Merge pull request #934 from keyboardio/build-cleanup
...
Some more builder cleanups.
4 years ago
Jesse Vincent
34b428c4a9
Simplify conditional building
4 years ago
Jesse Vincent
c98b513636
Revert "missed one"
...
This reverts commit de062ea897
.
4 years ago
Jesse Vincent
5bea41f630
reduce a bit of code duplication
4 years ago
Jesse Vincent
de062ea897
missed one
4 years ago
Jesse Vincent
6e8d1d020a
Switch to a less verbose way to set defaults for environment variables
...
By reducing duplication, we improve readability and reduce errors
4 years ago
Jesse Vincent
a91c6a556e
refactor config file list to all be in one place
4 years ago
Jesse Vincent
dbb4f3b1ae
migrate check-docs from generic makefile
4 years ago
Gergely Nagy
fed3a6d6dc
Merge pull request #932 from keyboardio/builder-cleanup
...
Additional cleanup of kaleidoscope-builder
4 years ago
Jesse Vincent
25c8a8a180
Refactor the "SKETCH" environment variable and friends.
...
Functionality should be the same, but code should be clearer.
4 years ago
Jesse Vincent
e96902a9df
Switch from locally defining a "DIR" for every bin, to setting a global Kaleidoscope bin directory var
4 years ago
Jesse Vincent
660747c916
Rename ROOT to KALEIDOSCOPE_DIR, which is what it appears to actually be.
4 years ago
Jesse Vincent
ea0abc8833
inline a single-use cunction
4 years ago
Jesse Vincent
19f728ca56
lift find_bootloader_path' out of the config file into the program.
...
as it isn't something that's platform specific
'
4 years ago