Jesse Vincent
430b5bac53
Try to cache the files Arduino downloads
3 years ago
Jesse Vincent
fbbead928b
Don't interleave output from test suite when running under gmake4 or
...
newer.
On gmake 3, warn the user
3 years ago
Jesse Vincent
b83604d37e
Fix some dependency errors in test makefile rules that could cause
...
parallel testing to fail
3 years ago
Jesse Vincent
572d772a8e
Quiet down making the ktestfile.
...
Add an identifier for which test we're running
3 years ago
Jesse Vincent
25eadfd0a6
Stop printing size information when running simulator tests
3 years ago
Michael Richters
e5d67efd58
Format codebase with `clang-format`
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
3 years ago
Jesse Vincent
372adb58c1
testing/makefiles/delegate.mk was a no-op
3 years ago
Jesse Vincent
dbeed3c767
Apply some of our makefile optimization techniques to the test suite
3 years ago
Michael Richters
f9b9c27852
Add mouse report handling to ktest
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
3 years ago
Michael Richters
29ebffe099
Add function for verification of expected mouse reports
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
3 years ago
Michael Richters
0670113b66
Move checking of keyboard reports to a separate function
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
3 years ago
Michael Richters
e87306144e
Add MouseReports to HIDState for testing
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
3 years ago
Michael Richters
e8c84a0e47
Add MouseReport class for testing
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
3 years ago
Michael Richters
72c2e0fe27
Rename *Report functions to *KeyboardReport
...
In preparation for validation of report types other than just Keyboard, rename
these keyboard-specific functions (and variables) to have appropriately
keyboard-specific names.
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
3 years ago
Michael Richters
381b05e10f
Add DELAY command for ktest scripts
...
This adds a way to add a delay (advancing the virtual clock) in a simulator test
script without running Kaleidoscope cycles.
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
3 years ago
Florian Bruhin
231ebad36f
Update embedded googletest to 1.11.0
...
Fixes #1081
Signed-off-by: Florian Bruhin <me@the-compiler.org>
3 years ago
Michael Richters
53093ee5b9
Fix trailing comments on ktest `PRESS` & `RELEASE` lines
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
86cc2c66a7
Suppress warnings when expecting no report without comment
...
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Michael Richters
1a5934ef61
Add the plugins dir to includes for testcases
...
This makes it possible for a testcase to include source files from plugin
directories. When the plugins got pulled out of the main Kaleidoscope source
dir, plugin header files became unavailable to testcases, but these files are
useful in some instances.
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
4 years ago
Jesse Vincent
8405dd0641
Add some support for logging the source line in ktest files
4 years ago
Jesse Vincent
72a8ba2935
fix up testing for the new plugin layout
4 years ago
Jesse Vincent
c5ac087390
Add the ability to have "TODO" test sections that gtest interprets as 'DISABLED'
4 years ago
Jesse Vincent
b05a8e8c5f
astyle
4 years ago
Jesse Vincent
dfb710f705
Move key def sections into a subdirectory to make the codebase a bit cleaner.
...
These should never have been getting called directly by end-user code, although the URLs were referenced as a resource in docs.
4 years ago
Jesse Vincent
80c00d5e24
Update example and testing sketches to use new makefiles
4 years ago
Jesse Vincent
6ef1570964
Improve dependency tracking, cleanup and presentation in test Makefiles.
4 years ago
Jesse Vincent
aaa9603d72
Update gitignore files to ignore .arduino and to stop ignoring testing/bin
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