simonratner opened a new issue #366: Customize command for running test binaries URL: https://github.com/apache/mynewt-newt/issues/366 It is useful to specify a custom executor script for running tests as part of `newt test` command execution. This could be specified as a key in `pkg.yml` for `unittest` packages, analogous to `bsp.downloadscript` and `bsp.debugscript` which exist for `bsp` packages. This test executor script will be executed as part of `newt test` with the test binary as a parameter, in place of directly executing the binary. The default, if not specified, should be to exec the binary directly as it is now. See: https://github.com/apache/mynewt-newt/blob/master/newt/builder/selftest.go#L151 ## Motivation WSL/WSL2 on Win10, as well as macOS Catalina, are exclusively 64-bit and are not able to run the unittest ELFs. While both of these systems are capable of building the unit tests with crosstools, running the resulting binary requires a VM/container with a 32-bit-capable OS. ## Current workaround Run `newt test` to build the test package, which will fail with an ELF format error. Then manually execute the built binary: ``` docker run -e NEWT_USER=$(id -u) -e NEWT_GROUP=$(id -g) -e NEWT_HOST=$(uname) \ --rm --privileged -v "$(pwd):/workspace" -w /workspace \ mynewt/newt:latest \ $path_to_test_bin_elf ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
