Jesse Vincent
43c0e12ce1
extract out some common code in the testing makefiles
4 years ago
Jesse Vincent
2f873a0e20
clean up top and test dirs
4 years ago
Jesse Vincent
7aa68d8633
it helps if i name my env variables correctly
4 years ago
Jesse Vincent
306a9f45fd
get back ccache support
4 years ago
Jesse Vincent
3a68baca25
Revert "No longer hardcode ar and c++ in libcommon.mk"
...
This reverts commit f9b756ff5d637ba9e1c52ff6569fa4d8dc545720.
4 years ago
Jesse Vincent
4af76348d6
overzealous gitignore was breaking some of our ci, since an actual program we want in bin wasn't being copied to a ci vm
4 years ago
Jesse Vincent
ff99286daf
anotehr thing that will not work
4 years ago
Jesse Vincent
ce77fe3ac7
probably doesn't help
4 years ago
Jesse Vincent
3535d91dd7
maybe this fixes tests
4 years ago
Jesse Vincent
72516aafa8
I think this will fix building simulator tests?
4 years ago
Jesse Vincent
121f46076c
try to clean up setting kaleidoscope paths
4 years ago
Jesse Vincent
4ffe328025
clean up a couple rm calls to better insulate against paths that start with -. while unlikely, the protection is easy
4 years ago
Jesse Vincent
96fb56c4bb
No longer hardcode ar and c++ in libcommon.mk
4 years ago
Jesse Vincent
ff9db36814
Don't hardcode the compiler name in testcase.mk
4 years ago
Jesse Vincent
138fe4065b
no longer need an explicit "ARCH"
4 years ago
Jesse Vincent
ba3721187b
Tease apart sketch and Kaleidoscope makefiles
4 years ago
Jesse Vincent
4c3021995a
attempt to make simulator tests build again
4 years ago
Jesse Vincent
d7cf811b00
finish removing "BOARD_HARDWARE_PATH"
4 years ago
Jesse Vincent
ea068cc72c
more work excising BOARD_HARDWARE_PATH
4 years ago
Jesse Vincent
4111d535a3
remove an extra include
4 years ago
Jesse Vincent
9677426b82
start moving to the new makefile, bundled inside Kaleidoscope
4 years ago
Jesse Vincent
ee16e7d610
switch the sim to use the new build system
4 years ago
Jesse Vincent
fd7a9dcb1e
remove build-all, now that we no longer need it
4 years ago
Jesse Vincent
142f9ed6a3
make the use of build-all explicit. Even if we do need it to go away
4 years ago
Jesse Vincent
ea0a0c3dd6
try a hacky workaround for the fact that arduino-cli doesn't seem to let us put doublequotes in build-props
4 years ago
Michael Richters
c53bcae849
Make ktest match for "keyswitch" token non-greedy
...
The greedy match was including whitespace if more than one space character
separated the "keyswitch" token and the first coordinate.
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
20a380aa3f
Generate expected report check unconditionally
...
Even if a testcase shouldn't generate any HID reports, we should verify that it
didn't. If it does generate a report when there are none expected, that test
should fail.
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Jesse Vincent
b0902f35da
Add a "generate-testcases" target to make -C tests
...
Make ktest regeneration use a little bit more of Make's smarts.
Fixed #973
4 years ago
Jesse Vincent
51fd6be466
target to generate given testcase
4 years ago
Jesse Vincent
aafd594183
Make it possible to run a single testcase's makefile without being called from above
...
by setting topdir if it's not set
4 years ago
Jesse Vincent
cd211efa24
Remove generated testcases when running make clean
...
Fixes #976
4 years ago
Jesse Vincent
8c13d25cc3
Don't try to add the generated testcase to the list of possible test files if it already exists
...
Fixes #975
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
4 years ago
Michael Richters
3160edfd8c
Improve report verification in testing
...
This replaces the `CHECK_EXPECTED_REPORTS()` macro with a new `CheckReports()`
method. The new method verifies both the content and timestamps of expected
keyboard reports, and provides more output on failures (including details of any
unexpected reports).
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Jesse Vincent
1b061fe27f
We no longer use that HIDAdaptor
4 years ago
Jesse Vincent
cd2698d701
Port Redial tests to ktest. Add a couple ktest features to support that
4 years ago
Jesse Vincent
fde137509b
Add a pseudo-test that shows off the name of the test source file for generated tests
4 years ago
Jesse Vincent
2dd247dae8
Improve parsing of comments without spaces after the #
...
Better handle cases with empty test scripts
4 years ago
Jesse Vincent
7e5b05e447
There's no real need to vary the generated test
...
class for each generated test file. removing
this makes test definitions simpler
Also, grow support for multiple tests within a script
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
4 years ago
Jesse Vincent
533b6da571
Little bits of refactoring to the ktest parser
4 years ago
Jesse Vincent
4517ff7c0e
Add a first version of a Kaleidoscope testing DSL.
...
The goal is to make it easy for folks to write tests without knowing C++
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
4 years ago
Jesse Vincent
d8b674f4dc
Small error in my cherry-picking.
4 years ago
Jesse Vincent
072892111e
Extract expected report validation. I'm very much not proud of the
...
hack of using a macro for this, but I'm happy to simplify test scripts
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
4 years ago
Jesse Vincent
eebf8e639b
Add a variant of ExpectReport that takes an explicit list of keycodes
...
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
4 years ago
Michael Richters
78e9ec4291
Add event queue functions to testing infrastructure
...
This change adds a set of functions to the `VirtualDeviceTest` class to make it
possible to write simpler testcases involving timed keyswitch press and release
events along with corresponding keyboard HID reports.
Other outputs (Consumer & System Control HID reports, LEDs, et cetera) are
not yet included.
4 years ago
Michael Richters
0473094d4e
Add timestamps to simulator HID report classes
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
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
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