Skip to content
Snippets Groups Projects
Commit f5d2f0f5 authored by Alexandre Abadie's avatar Alexandre Abadie
Browse files

tests/pkg_minmea: migrate to testrunner

parent 783e04e7
No related branches found
No related tags found
No related merge requests found
......@@ -7,3 +7,6 @@ USEPKG += minmea
BOARD_BLACKLIST := chronos msb-430 msb-430h telosb wsn430-v1_3b wsn430-v1_4 z1
include $(RIOTBASE)/Makefile.include
test:
tests/01-run.py
......@@ -26,16 +26,18 @@ static const char *_gll = "$GNGLL,5229.0178,N,01326.7605,E,114350.000,A,A*45";
int main(void)
{
puts("START");
struct minmea_sentence_gll frame;
int res = minmea_parse_gll(&frame, _gll);
if (!res) {
puts("error parsing GPS sentence");
puts("FAILURE: error parsing GPS sentence");
}
else {
printf("parsed coordinates: lat=%f lon=%f\n",
minmea_tocoord(&frame.latitude),
minmea_tocoord(&frame.longitude));
puts("SUCCESS");
}
return 0;
......
#!/usr/bin/env python3
import os
import sys
import math
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
import testrunner
def testfunc(child):
child.expect_exact('START')
child.expect_exact('SUCCESS')
if __name__ == "__main__":
sys.exit(testrunner.run(testfunc))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment