1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

tests/pkg_micro-ecc-with-hwrng: migrate to testrunner

This commit is contained in:
Alexandre Abadie 2017-11-10 09:27:05 +01:00
parent 12f6b629b8
commit 6f1b8fea25
3 changed files with 28 additions and 4 deletions

View File

@ -8,3 +8,6 @@ USEPKG += micro-ecc
CFLAGS += -DFEATURE_PERIPH_HWRNG
include $(RIOTBASE)/Makefile.include
test:
tests/01-run.py

View File

@ -113,10 +113,12 @@ int main(void)
printf(" done with %d error(s)\n", errorc);
if (errorc == 0) {
return 0;
}
else {
if (errorc) {
puts("FAILURE");
return 1;
}
else {
puts("SUCCESS");
return 0;
}
}

View File

@ -0,0 +1,19 @@
#!/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('micro-ecc compiled!')
child.expect_exact('Testing 16 random private key pairs and signature '
'using HWRNG')
child.expect_exact('................ done with 0 error(s)')
child.expect_exact('SUCCESS')
if __name__ == "__main__":
sys.exit(testrunner.run(testfunc, timeout=60))