-
-
Notifications
You must be signed in to change notification settings - Fork 749
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Device Test Harness #1490
Comments
Tried a quick and dirty approache to run some tests for a ESP8266_4MB board. First used
|
You can specify an input file with the tool - and then just pipe the output to a file. You can also specify a TCP/IP port instead of using serial - connect to the wifi address via telnet - that way it will be full speed with out any dropping of chars. |
It would definitely be possible to tweak the command-line tool - when using Actually figuring out when to stop listening could be tricky though - maybe there could be a JSON format comment in each test that said how long to wait for, and also if the test was suitable for embedded. Anyway, using the CLI would be a huge bonus as then serial/telnet/bluetooth/etc could be used depending on the board being tested. |
Is it possible to define a key word as stop watch indicator? |
not sure I understand? |
console.log( ".stop.watch."); or an escape sequence to tell command-line-tool to stop watching |
or just add a number to |
Got a nice mix of framing tests.js files and use command-line-tool to send them
A sample frame.js
run
esp8266_test.lst.txt Number of tests: 139 |
Ahh, ok. The issue is that when the tests are running in the Linux build, it knows when everything is finished by checking if any timers are active and can finish automatically. Adding something like:
at the end of the code you upload should fix it - although honestly a timeout of 1s is probably good enough? I actually added a It's great that you got the tests going though. |
test_digitalwrite_words.js only works for board that the have those pin names Have you thought about adding some device specific tests
|
Have you thought about running on board tests via make? |
Yes, device specific tests would be good. However first I'd be happy with a system for running general tests on the device and sending back the result :) In an ideal world we'd have a setup of maybe an I2C, SPI and OneWire RAM device on every single board, and would then have code that'd test they all worked correctly. With testing - sure, it could be a |
This is what I have done now with shell scripting just added a new finding to #1631 The whole output is redirected to a result.log file to analyse afer a run. Eg. Output for running testfile test_abstract_comparison.js:
And then grep SyntaxError ReferenceError and flavors of result= |
Number of test files 300 /Espruino/repos/testing/esp8266_test_v2.lst |
Like to add some neopixels too. |
Ok, fine with bash scripting stuff for now. I guess extending espruino command line tool would be the most efficient way.
|
Got grafana and influxdb running localy and want to import a What do you think about this table columns to store test results? EspruinoVersion BoardName NameOfTestfile Result Result: error, true, false eg
Not sure about a timestamp or a RunCounter or what is helpful to be added as column. |
When I was doing it I stored a log - but that could just be the contents of error. Also, runtime could be handy - it might provide a useful way of benchmarking between commits |
Runtime is a good point. insert one sample row for measurement
git: short HEAD as string |
So this is going to happen - great! Just some question about the files in folder tests:
I am planing to update the ESP8266 builds to SDK version 3 and will try to run scripts build three years ago. |
Hmm, after checking the documents there is no big win having version 3. |
The Really I'd be looking at adding new tests - initially probably just benchmarking (and maybe checking memory/stack usage). I think if those work we could be reasonably happy with the interpreter. Obviously hardware testing needs a bit of thought too though - for example Wifi on ESP8266 would need to be able to connect to something else, or Bluetooth on nRF52/ESP32 really needs some kind of companion test that would run on the Raspberry Pi. |
Ok, understand, first check the linux build and then second the other devices. Not sure if you remember that here are some test for the ESP8266 here we could use for the wifi testing. |
I've been after doing actual on-device testing for some time - it was the first Patreon goal, but we haven't actually hit that yet. There's another request here: #1207 (comment)
Realistically to avoid false positives you'd want to reset the device after running each test, so my idea is to have a system for Raspberry Pi that anyone could plug a board into and run. It would:
Other potential options:
Then someone also needs to make something to aggregate all this data, graph it, and make it usable.
The text was updated successfully, but these errors were encountered: