Skip to content
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

murdock: enable nrf52dk for on-hardware tests #9095

Merged
merged 1 commit into from
Mar 7, 2019

Conversation

kaspar030
Copy link
Contributor

Contribution description

This PR enables on-hardware tests on two nrf52dk boards.

nrf52dk uses $(HEXFILE) as flashfile. One of the commits makes an exception for this. IMO, this is ugly, but will go away as soon as #8838 is merged.

Issues/PRs references

#8838

@kaspar030 kaspar030 added Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Area: CI Area: Continuous Integration of RIOT components CI: run tests If set, CI server will run tests on hardware for the labeled PR labels May 7, 2018
@kaspar030 kaspar030 requested a review from cladmi May 7, 2018 15:19
@kaspar030 kaspar030 added State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels May 7, 2018
@kaspar030 kaspar030 force-pushed the murdock_enable_nrf52dk branch 2 times, most recently from 5b09ac8 to 0913103 Compare May 7, 2018 21:38
@cladmi cladmi added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels May 8, 2018
@cladmi
Copy link
Contributor

cladmi commented May 9, 2018

Looks good.
Still funny that the current hack is set FLASHFILE:=$(HEXFILE) when it's still a .bin :D

Does the patch for the test work ? it could help for other shell based tests that from time to time fail on samr21.

I tried running it but it currently failed, so waiting on your input for re-running it.

@tcschmidt tcschmidt requested a review from MrKevinWeiss June 21, 2018 11:18
@tcschmidt
Copy link
Member

ping @MrKevinWeiss

Copy link
Contributor

@MrKevinWeiss MrKevinWeiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess you are just waiting for #8838 to be merged so it gets done cleanly.

@@ -40,8 +41,10 @@ def _check_startup(child):

def _check_help(child):
child.sendline('')
child.expect('>')
child.expect('> ')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of adding sleep can you just child.expect('> ', timeout=0.1)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, that would make pexpect give '> ' more time, right? I intended to add a slight delay after receiving the prompt, before sending the next line.

@@ -40,8 +41,10 @@ def _check_startup(child):

def _check_help(child):
child.sendline('')
child.expect('>')
child.expect('> ')
time.sleep(0.1)
child.sendline('help')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

@kaspar030 kaspar030 force-pushed the murdock_enable_nrf52dk branch from 0913103 to 111f8f7 Compare August 3, 2018 13:38
@kaspar030 kaspar030 added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Aug 3, 2018
@tcschmidt
Copy link
Member

@MrKevinWeiss @smlng is this PR still needed given the establishing HIL testing technology and deployment?

@MrKevinWeiss
Copy link
Contributor

@kaspar030 Do you have the murdock workers connected? Now that we have the compile_and_test_for_board any maintainer can run these tests on there desk. Also I found lots of failures that we due to things unrelated to the test (ie. libfixmath, xtimer_periodic_wakeup). Plus some cases where the flasher either doesn't work or get held up and the only way to flash is by pressing the reset button at the right time.

How would you like to proceed?

@kaspar030
Copy link
Contributor Author

Do you have the murdock workers connected?

One is connected, but somehow the incoming UART is broken. I haven't gotten around to debugging that, yet.

@MrKevinWeiss
Copy link
Contributor

I am not sure but I also think IoT labs supports a whole bunch of boards now. They may have something available.

@kaspar030
Copy link
Contributor Author

I am not sure but I also think IoT labs supports a whole bunch of boards now. They may have something available.
Now that we have the compile_and_test_for_board any maintainer can run these tests on there desk.
is this PR still needed given the establishing HIL testing technology and deployment?

All of those don't support running tests per-PR as part of the CI.

@emmanuelsearch
Copy link
Member

@kaspar030 I am in the office today if there's anyway to physically help with the attached nrf52dk

@kaspar030
Copy link
Contributor Author

@kaspar030 I am in the office today if there's anyway to physically help with the attached nrf52dk

Yes, if you can find a second board, you could replace the nrf that's attached to the Pi. It might be a hardware problem. The nrf is connected to the Pi named "pi-36f90aef".

@emmanuelsearch
Copy link
Member

@kaspar030 can you try again? I think the USB cable was faulty. I changed to a new one.

@kaspar030
Copy link
Contributor Author

@kaspar030 can you try again? I think the USB cable was faulty. I changed to a new one.

Seems to work. Thanks!

@kaspar030
Copy link
Contributor Author

This is not WIP anymore. Anyone?

@cladmi
Copy link
Contributor

cladmi commented Mar 6, 2019

The last commit with the murdoc.inc.mk can be discarded. The value is found automatically with the current master. The test could be re-run after.

BOARD=nrf52dk make --no-print-directory -C examples/hello-world/ info-debug-variable-FLASHFILE
/home/harter/work/git/RIOT/examples/hello-world/bin/nrf52dk/hello-world.bin

What did you do for the JLink update ? I may need the same thing as sometime my jlink uart is mixed and could be added in the doc (other than this PR but asking as it was mentioned here).

@kaspar030 kaspar030 force-pushed the murdock_enable_nrf52dk branch from befb352 to e3729be Compare March 6, 2019 11:32
@kaspar030
Copy link
Contributor Author

The last commit with the murdoc.inc.mk can be discarded.

Nice. rebased & dropped that commit.

@kaspar030
Copy link
Contributor Author

What did you do for the JLink update ?

It was updated automatically when I flashed the board with JLink on my workstation, which had a very recent JLinkExe (I think from this year even).

@cladmi
Copy link
Contributor

cladmi commented Mar 6, 2019

Ok, so my board may have been updated already.

When looking in the murdock output, some files are not recognized as being utf-8 and are forced to be downloaded:

https://ci.riot-os.org/RIOT-OS/RIOT/9095/e3729be0358ec5a5e952c254fc97867c4acd85a4/output/run_test/tests/ssp/nrf52dk:gnu.txt

I get a file download.It opens as chinese in gedit, but gvim handles it correctly.

When opening the url for samr21-xpro it works correctly.

https://ci.riot-os.org/RIOT-OS/RIOT/9095/e3729be0358ec5a5e952c254fc97867c4acd85a4/output/run_test/tests/ssp/samr21-xpro:gnu.txt

@cladmi
Copy link
Contributor

cladmi commented Mar 6, 2019

"file" does not recognize the file as utf-8 It looks like there are ^@ characters that it does not like. Apparently null characters https://en.wikipedia.org/wiki/Null_character

@kaspar030
Copy link
Contributor Author

"file" does not recognize the file as utf-8 It looks like there are ^@ characters that it does not like. Apparently null characters https://en.wikipedia.org/wiki/Null_character

At least it is defined how Firefox does this:

From here:

When the Content-Type sent by the server is one of (case-sensitively)

    text/plain
    text/plain; charset=ISO-8859-1
    text/plain; charset=iso-8859-1

and the server did not send a Content-Encoding header, Mozilla will sniff the first block of data it gets and check for non-text bytes. Text bytes are 9-13, 27, and 31-255. When encountering a non-text byte, the helper app dialog will be shown, showing the MIME type corresponding to the extension of the file.

@kaspar030
Copy link
Contributor Author

@smlng can we try forcing all *.txt to be text/plain; charset=utf-8?

@kaspar030
Copy link
Contributor Author

Anyhow, the output issue is unrelated to this PR.

@cladmi @smlng do you see any reason not to merge this?

@kaspar030 kaspar030 mentioned this pull request Mar 7, 2019
4 tasks
Copy link
Contributor

@MrKevinWeiss MrKevinWeiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simple and clean, I ACK. Maybe we can rerun the ci (on hardware) to make sure everything is good before merge.

@MrKevinWeiss MrKevinWeiss added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: run tests If set, CI server will run tests on hardware for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: run tests If set, CI server will run tests on hardware for the labeled PR labels Mar 7, 2019
@MrKevinWeiss
Copy link
Contributor

@kaspar030 hmmm I can't see the tests being run on the hardware in the murdock output, shouldn't the samr21 and nrf52dk be triggered and show up in the worker stats?

--- worker stats:
e5 total: 3326 pass: 3326 fail: 0 avg: 2.1s
e52 total: 3602 pass: 3602 fail: 0 avg: 2.0s
haw-icc total: 6968 pass: 6968 fail: 0 avg: 2.3s
ifive total: 602 pass: 602 fail: 0 avg: 3.2s
mobi3.inet.haw-hamburg.de total: 4759 pass: 4759 fail: 0 avg: 3.3s
mobi7.inet.haw-hamburg.de total: 2897 pass: 2897 fail: 0 avg: 3.1s
mobi8.inet.haw-hamburg.de total: 2661 pass: 2661 fail: 0 avg: 4.4s
riot-ci.inet.haw-hamburg.de total: 1144 pass: 1144 fail: 0 avg: 3.4s
riotbuild total: 8504 pass: 8504 fail: 0 avg: 3.3s

@cladmi
Copy link
Contributor

cladmi commented Mar 7, 2019

The output issue will be seen on the first failed test for nrf52dk and somebody clicking on the test result. But if they open it in a good editor, it should be ok.

@kaspar030 kaspar030 added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Mar 7, 2019
@kaspar030
Copy link
Contributor Author

@cladmi yes but this issue is also present for samr21-xpro, it is not nrf52dk specific.

@kaspar030
Copy link
Contributor Author

@MrKevinWeiss results are there now. Care to confirm? there's a race when setting both CI labels at the same time, it sometimes causes one to not be recognized by murdock.

@MrKevinWeiss MrKevinWeiss merged commit 282991d into RIOT-OS:master Mar 7, 2019
@MrKevinWeiss
Copy link
Contributor

All good, thanks @kaspar030

@danpetry danpetry added this to the Release 2019.04 milestone Mar 11, 2019
@cladmi
Copy link
Contributor

cladmi commented Mar 11, 2019

@cladmi yes but this issue is also present for samr21-xpro, it is not nrf52dk specific.

I did not know, I only saw it for nrf52dk.

@kaspar030 kaspar030 deleted the murdock_enable_nrf52dk branch March 11, 2019 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: CI Area: Continuous Integration of RIOT components Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: run tests If set, CI server will run tests on hardware for the labeled PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants