1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-13 13:01:55 +03:00

Allow test framework to use cores/esp8266/Arduino.h directly (#7377)

* Allow test framework to use cores/esp8266/Arduino.h directly
* fix wps debugging
* some more missing debug.h
* Hunt down debug.h and roll-back
  TODO: rename it to something else... it is an internal header
* Move abs+round checks to test/device/test_sw
* Restore macros for C code
* fixup! Move abs+round checks to test/device/test_sw
* Fix bad c/p, actually try round with ints
* tweak c macros per review
* fix gcc-10 missing cerrno include
This commit is contained in:
Max Prokhorov
2020-10-06 17:18:00 +03:00
committed by GitHub
parent 7ba31010be
commit 36b444dba3
17 changed files with 147 additions and 335 deletions

View File

@ -56,8 +56,6 @@ const char* fspath = nullptr;
static struct termios initial_settings;
std::map<String,String> mockArgs;
int mockverbose (const char* fmt, ...)
{
va_list ap;
@ -137,8 +135,6 @@ void help (const char* argv0, int exitcode)
"\t-S - spiffs size in KBytes (default: %zd)\n"
"\t-L - littlefs size in KBytes (default: %zd)\n"
"\t (spiffs, littlefs: negative value will force mismatched size)\n"
"\t-K - key\n"
"\t-V - value\n"
"\tgeneral:\n"
"\t-c - ignore CTRL-C (send it via Serial)\n"
"\t-f - no throttle (possibly 100%%CPU)\n"
@ -162,8 +158,6 @@ static struct option options[] =
{ "spiffskb", required_argument, NULL, 'S' },
{ "littlefskb", required_argument, NULL, 'L' },
{ "portshifter", required_argument, NULL, 's' },
{ "key", required_argument, NULL, 'K' },
{ "value", required_argument, NULL, 'V' },
{ "once", no_argument, NULL, '1' },
};
@ -215,11 +209,10 @@ int main (int argc, char* const argv [])
mock_port_shifter = 0;
else
mock_port_shifter = MOCK_PORT_SHIFTER;
String key;
for (;;)
{
int n = getopt_long(argc, argv, "hlcfbvTi:S:s:L:P:1K:V:", options, NULL);
int n = getopt_long(argc, argv, "hlcfbvTi:S:s:L:P:1", options, NULL);
if (n < 0)
break;
switch (n)
@ -260,12 +253,6 @@ int main (int argc, char* const argv [])
case 'T':
serial_timestamp = true;
break;
case 'K':
key = optarg;
break;
case 'V':
mockArgs[key] = optarg;
break;
case '1':
run_once = true;
break;