-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously, the test vectors were encoded into the python test scripts, converted to base64, and send over to the device under test via stdio. The application sent back the output after converting it to base64 first, which was read back in by the test script and decoded. Finally, the test script compared the result with the expected result. This made the test complex, slow and, flanky, as stdio on interfaces such as UART has a high bit error rate and some quirks (e.g. the EDBG UART bridge e.g. in the samr21-xpro dropping bytes when bursts of more than 64 bytes at a time are send). This basically rewrites the test to embed the test vectors in the firmware and do the comparison on the devices. This fixes test failures on the samr21-xpro, the nRF52840-DK and likely many others. Also, it is now fast. (cherry picked from commit 176cb9a)
- Loading branch information
Showing
6 changed files
with
101 additions
and
287 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,6 @@ | ||
include ../Makefile.tests_common | ||
|
||
# This application uses getchar and thus expects input from stdio | ||
USEMODULE += stdin | ||
USEMODULE += hashes | ||
USEMODULE += base64 | ||
|
||
# Use a terminal that does not introduce extra characters into the stream. | ||
RIOT_TERMINAL ?= socat | ||
|
||
#ensure the rx buffer has some room even with large test patterns | ||
CFLAGS += -DSTDIO_UART_RX_BUFSIZE=128 | ||
USEMODULE += fmt | ||
|
||
include $(RIOTBASE)/Makefile.include | ||
|
||
# Increase Stack size for AVR | ||
ifneq (,$(filter avr8_common,$(USEMODULE))) | ||
CFLAGS += -DTHREAD_STACKSIZE_MAIN=THREAD_STACKSIZE_LARGE | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env python3 | ||
|
||
# Copyright (C) 2020 Otto-von-Guericke-Universität Magdeburg | ||
# | ||
# This file is subject to the terms and conditions of the GNU Lesser | ||
# General Public License v2.1. See the file LICENSE in the top level | ||
# directory for more details. | ||
|
||
# @author Marian Buschsieweke <marian.buschsieweke@ovgu.de> | ||
|
||
import sys | ||
from testrunner import run | ||
|
||
|
||
def testfunc(child): | ||
child.expect("TEST PASSED") | ||
|
||
|
||
if __name__ == "__main__": | ||
sys.exit(run(testfunc)) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.