Skip to content

Commit

Permalink
fixup! fixup! tests: add robot test for periph_timer_cli
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelRottleuthner committed Sep 2, 2019
1 parent 875a853 commit 89de720
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions tests/periph_timer_cli/tests/01__periph_timer_base.robot
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ Measure Timer Delay For ${ticks}
[Documentation] Returns the time it took between set_timer and entering
... the timer ISR callback (measured by PHiLIP)
Run Keyword Timer Set To ${ticks} And Measure
${trace}= Run Keyword PHiLIP.Read Trace
${d1}= Evaluate ${trace[1]['time']}-${trace[0]['time']}
API Call Should Succeed PHiLIP.Read Trace
${trace}= Set Variable ${RESULT['data']}
${d1}= Evaluate ${trace}[1][time] - ${trace}[0][time]
[return] ${d1}

Check If Timer At ${freq} Hz Has Less Error Than ${perc} Percent
Expand Down Expand Up @@ -80,8 +81,9 @@ Timer Read Overhead
${repeat_cnt} Set Variable ${1000000}
API Call Should Succeed Timer Init cbname=cb_toggle gpio_port=${DEBUG_PORT} gpio_pin=${DEBUG_PIN}
API Call Should Succeed Timer Read Bench dev=0 repeat_cnt=${repeat_cnt} gpio_port=${DEBUG_PORT} gpio_pin=${DEBUG_PIN}
${trace}= Run Keyword PHiLIP.Read Trace
${us_per_read}= Evaluate (${trace[1]['time']} - ${trace[0]['time']}) * 1000000 / ${repeat_cnt}
API Call Should Succeed PHiLIP.Read Trace
${trace}= Set Variable ${RESULT['data']}
${us_per_read}= Evaluate (${trace}[1][time] - ${trace}[0][time]) * 1000000 / ${repeat_cnt}

Small Timer Delays
[Template] Timer Init With ${freq} Hz and Set To ${ticks}
Expand Down Expand Up @@ -125,8 +127,9 @@ Timer Peak To Peak Jitter
Run Keywords PHiLIP Reset
Run Keywords Enable Debug GPIO Trace On Pin 0
API Call Should Succeed Timer Set dev=0 chan=0 ticks=${ticks} gpio_port=${DEBUG_PORT} gpio_pin=${DEBUG_PIN}
${trace}= Run Keyword PHiLIP.Read Trace
${d1}= Evaluate ${trace[1]['time']}-${trace[0]['time']}
API Call Should Succeed PHiLIP.Read Trace
${trace}= Set Variable ${RESULT['data']}
${d1}= Evaluate ${trace}[1][time] - ${trace}[0][time]
Append To List ${diffs} ${d1}
END

Expand Down

0 comments on commit 89de720

Please sign in to comment.