* Fix Python3 errors for device tests
The Python3 migration didn't include fixes for local scripts in the
device test tree.
Fatal build and run Python errors fixed.
The last update to xunitmerge is ~5 years ago, so it looks to be
unsupported now.
Use a local copy of the two components to allow patching to work with
Python3.
The serial test seems to send garbage chars (non-ASCII/etc.), so use a
codepage 437 which supports all 255 chars.
Fixes: #6660
* Run tests at 160MHz (req'd for some SSL connections)
* Fix debuglevel options for builder
* Fix Python3 interpreter path in xunitmerge
* Remove virtualenv on "make clean"
* Add appropriate attribution, license to xunitmerge
Add like to the original sources with the author's license to the
copied/fixed xunitmerge files.
* Fix device test environment variables
Device tests were not connecting properly to WiFi because the
environment variables were not set when WiFi.connect was called.
This would result in tests sometimes working *if* the prior sketch run
on the ESP saved WiFi connection information and auto-connect was
enabled. But, in most cases, the tests would simply never connect to
any WiFi and fail.
getenv() works only after BS_RUN is called (because BS_RUN handles the
actual parsing of environment variables sent from the host).
Add a "pretest" function to all tests which is called by the host test
controller only after all environment variables are set. Move all
WiFi/etc. operations that were in each separate test's setup() into it.
So the order of operations for tests now is:
ESP: setup()
-> Set serial baud
-> Call BS_RUN()
HOST: Send environment
Send "do pretest"
ESP: pretest()
-> Set Wifi using env. ariables, etc. return "true" on success
HOST: Send "run test 1"
ESP: Run 1st test, return result
HOST: Send "run test 2"
ESP: Run 2nd test, return result
<and so forth>
If nothing is needed to be set up, just return true from the pretest
function.
All tests now run and at least connect to WiFi. There still seem to be
some actual test errors, but not because of the WiFi/environment
variables anymore.
* Remove unneeded debug prints
* Silence esptool.py output when not in V=1 mode
Esptool-ck.exe had an option to be silent, but esptool.py doesn't so the
output is very chatty and makes looking a the run logs hard (60 lines
of esptool.py output, 3 lines of actual test reports).
Redirect esptool.py STDOUT to /dev/null unless V=1 to clear this up.
* Speed up builds massively by removing old JSON
arduino-builder checks the build.options.json file and then goes off and
pegs my CPU at 100% for over a minute on each test compile checking if
files have been modified.
Simply deleting any pre-existing options.json file causes this step to
be skipped and a quick, clean recompile is done in siginificantly less
time.
* Enable compile warnings, fix any that show up
Enable all GCC warnings when building the tests and fix any that came up
(mostly signed/unsigned, unused, and deprecated ones).
* Fix UMM_MALLOC printf crash, umm_test
Printf can now handle PROGMEM addresses, so simplify and correct the
debug printouts in umm_info and elsewhere.
Previously device tests included information such as access point SSID/password at compile time. This made it difficult to compile test binaries once and then send them to multiple test runners for execution.
This change adds a command to the test library to set environment variable on the target device: “setenv key value”. C library setenv/getenv facility is used to store variables.
Test runner, tests, and makefile are updated to use this functionality.
* device test for #4516 (WiFiClient leaking)
* simply count the number of connections that do not change heap
* remove unused heapLost
* + python server (to not depend on gateway's opened tcp port)
* remove old&bad define
* fix another old address