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:
parent
12f6b629b8
commit
6f1b8fea25
@ -8,3 +8,6 @@ USEPKG += micro-ecc
|
||||
CFLAGS += -DFEATURE_PERIPH_HWRNG
|
||||
|
||||
include $(RIOTBASE)/Makefile.include
|
||||
|
||||
test:
|
||||
tests/01-run.py
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
19
tests/pkg_micro-ecc-with-hwrng/tests/01-run.py
Executable file
19
tests/pkg_micro-ecc-with-hwrng/tests/01-run.py
Executable 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))
|
Loading…
Reference in New Issue
Block a user