Skip to content

Add a test log for htrun #1

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

Merged
merged 2 commits into from
May 14, 2019
Merged

Add a test log for htrun #1

merged 2 commits into from
May 14, 2019

Conversation

k-stachowiak
Copy link
Contributor

This PR adds a log pattern to be fed into htrun for comparison.

The proposed log pattern verifies that:

  • serial number has been printed
  • two SHA-256 tests were ran successfully

Copy link
Contributor

@Patater Patater left a comment

Choose a reason for hiding this comment

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

LGTM

I was able to test this with mbedhtrun successfully, too.

mbedhtrun -d /media/DAPLINK -p /dev/ttyACM0 -m K64F -f ./BUILD/K64F/GCC_ARM/mbed-os-example-atecc608a-tmp.bin --compare-log ./tests/atecc608a.log 
[1557845285.31][HTST][INF] host test executor ver. 0.0.1
[1557845285.31][HTST][INF] copy image onto target...
[1557845293.23][MBED][WRN] Target ID not found: Skipping flash check and retry
[1557845293.23][HTST][INF] starting host test process...
[1557845293.23][CONN][INF] starting connection process...
[1557845293.23][CONN][INF] notify event queue about extra 60 sec timeout for serial port pooling
[1557845293.23][CONN][INF] initializing serial port listener... 
[1557845293.23][SERI][INF] serial(port=/dev/ttyACM0, baudrate=9600, read_timeout=0.01, write_timeout=5)
[1557845293.23][HTST][INF] setting timeout to: 60 sec
[1557845293.23][SERI][INF] reset device using 'default' plugin...
[1557845293.34][SERI][INF] waiting 1.00 sec after reset
[1557845294.34][SERI][INF] wait for it...
[1557845294.34][SERI][TXD] mbedmbedmbedmbedmbedmbedmbedmbedmbedmbed
[1557845294.34][CONN][INF] sending up to 2 __sync packets (specified with --sync=2)
[1557845294.34][CONN][INF] sending preamble '5be93f4d-7cf4-434b-9ac4-1e5f2254f348'
[1557845294.34][SERI][TXD] {{__sync;5be93f4d-7cf4-434b-9ac4-1e5f2254f348}}
[1557845294.35][CONN][RXD] **********************************************
[1557845294.35][CONN][RXD] Serial Number:
[1557845294.35][CONN][RXD] 01 23 BA CF BA D3 29 CA EE 
[1557845294.35][CONN][RXD] 
[1557845294.35][CONN][RXD] **********************************************
[1557845294.35][CONN][RXD] SHA-256:
[1557845294.35][CONN][RXD] 
[1557845294.35][CONN][RXD] Input: 61 62 63 
[1557845294.35][CONN][RXD] Expected Hash: BA 78 16 BF 8F 01 CF EA 41 41 40 DE 5D AE 22 23 
[1557845294.35][CONN][RXD] B0 03 61 A3 96 17 7A 9C B4 10 FF 61 F2 00 15 AD 
[1557845294.35][CONN][RXD] 
[1557845294.35][CONN][RXD] Actual Hash: BA 78 16 BF 8F 01 CF EA 41 41 40 DE 5D AE 22 23 
[1557845294.35][CONN][RXD] B0 03 61 A3 96 17 7A 9C B4 10 FF 61 F2 00 15 AD 
[1557845294.35][CONN][RXD] 
[1557845294.35][CONN][RXD] Success!
[1557845294.36][CONN][RXD] 
[1557845294.36][CONN][RXD] **********************************************
[1557845294.36][CONN][RXD] SHA-256:
[1557845294.36][CONN][RXD] 
[1557845294.36][CONN][RXD] Input: 
[1557845294.36][CONN][RXD] Expected Hash: E3 B0 C4 42 98 FC 1C 14 9A FB F4 C8 99 6F B9 24 
[1557845294.36][CONN][RXD] 27 AE 41 E4 64 9B 93 4C A4 95 99 1B 78 52 B8 55 
[1557845294.36][CONN][RXD] 
[1557845294.36][CONN][RXD] Actual Hash: E3 B0 C4 42 98 FC 1C 14 9A FB F4 C8 99 6F B9 24 
[1557845294.36][CONN][RXD] 27 AE 41 E4 64 9B 93 4C A4 95 99 1B 78 52 B8 55 
[1557845294.36][CONN][RXD] 
[1557845294.36][CONN][RXD] Success!
[1557845294.36][CONN][RXD] 
[1557845294.36][HTST][INF] Target log matches compare log!
[1557845294.36][HTST][INF] test suite run finished after 1.12 sec...
[1557845294.37][CONN][INF] received special event '__host_test_finished' value='True', finishing
[1557845294.37][HTST][INF] CONN exited with code: 0
[1557845294.37][HTST][INF] Some events in queue
[1557845294.37][HTST][INF] stopped consuming events
[1557845294.37][HTST][INF] host test result() call skipped, received: True
[1557845294.37][HTST][WRN] missing __exit event from DUT
[1557845294.37][HTST][WRN] missing __exit_event_queue event from host test
[1557845294.37][HTST][INF] calling blocking teardown()
[1557845294.37][HTST][INF] teardown() finished
[1557845294.37][HTST][INF] {{result;success}}

@Patater Patater added the enhancement New feature or request label May 14, 2019
@Patater Patater merged commit f87219b into ARMmbed:master May 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants