tests/pkg_minmea: migrate to testrunner
This commit is contained in:
parent
783e04e7e6
commit
f5d2f0f503
@ -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;
|
||||
|
||||
16
tests/pkg_minmea/tests/01-run.py
Executable file
16
tests/pkg_minmea/tests/01-run.py
Executable file
@ -0,0 +1,16 @@
|
||||
#!/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))
|
||||
Loading…
x
Reference in New Issue
Block a user