This adds a googletest-based test harness (with googletest pulled into
`testing/googletest`, so we have a fixed state of it), and a few test
cases that demonstrate its use.
Original work by Eric Paniagua in #898, with minor cleanups by Gergely
Nagy.
Signed-off-by: Eric Paniagua <epaniagua@google.com>
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
We can pass arguments to the entrypoint from the `docker run` commandline, so we
do not need to do that via an environment variable. This way, we're an
environment variable and an `eval` shorter.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
To make it easier to reproduce things, and to help build in a clean environment,
this adds a thin Dockerfile that has Arduino and arduino-cli pre-installed, and
- along with the `bin/run-docker` script - is set up so that one can easily run
arbitrary commands in the context of the current bundle and Kaleidoscope.
The first run will take a while, because docker will build the image. Subsequent
runs will use the cache.
To use: `bin/run-docker make`, for example. Any argument passed to the
`bin/run-docker` will be eval-ed within the container, and will run there.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
In order to be able to access the devices as the at-seat user, without having to
fiddle with distro-specific permissions and groups, we need to tag it both
`uaccess` and `seat`, and have the rule sorted before the one that applies
permissions based on these tags. As such, the file had to be renamed as well.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
When building Kaleidoscope, the compiled object files are linked together into a
static archive. This static archive has a very simple structure, and only stores
filenames, not paths, not even relative ones. As such, we can't have files with
the same name, because they will conflict, and one will override the other.
To avoid this situation, this script will find all cpp source files (we don't
need to care about header-only things, those do not result in an object file),
and will comb through them to find conflicting filenames.
If a conflict is found, it will print all files that share the name, and will
exit with an error at the end. It does not exit at the first duplicate, but will
find and print all of them.
If no conflict is found, the script just prints its status message and exits
with zero.
This addresses the bulk of #850.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
for some reason, this line shows up on stderr anytime I (or the
find-device-port script) run `system_profiler SPUSBDataType`
2020-02-24 23:19:14.656 system_profiler[23932:4118769] SPUSBDevice:
IOCreatePlugInInterfaceForService failed 0xe00002be
I got annoyed enough to suppress it, so I could see the other output
that I actually care about.
This adds some quotes to various paths used in Kaleidoscope's build system.
This fixes builds on msys2 that failed due to whitespaces in system paths.
Signed-off-by: Florian Fleissner <florian.fleissner@inpartik.de>
Many build systems allow C and C++ compilers to be specified
via environment variables C and CXX.
This commit enables this for kaleidoscope-builder.
Furtheron, on unixoid systems virtual builds are possible through a
command line similar to
CXX=<path to C++ compiler> C=<path to C compiler> ARCH=virtual make
Signed-off-by: Florian Fleissner <florian.fleissner@inpartik.de>