support/testing: micropython: add micropython-lib test
Commit 8f403f0 "package/micropython-lib: merge with, and install
as part of micropython" brought micropython library within the
package.
This commit improves the micropython runtime test by enabling the
micropython-lib and by also adding a runtime test using one of its
module. We choose to use the gzip module, and check whther decodign q
simple gziped file works; the micropython-lib gzip can only decompress,
so we need to prepare it from the shell.
Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
committed by
Yann E. MORIN
parent
4c8ba31a72
commit
094fb84320
15
support/testing/tests/package/test_micropython/rootfs-overlay/root/zcat.py
Executable file
15
support/testing/tests/package/test_micropython/rootfs-overlay/root/zcat.py
Executable file
@@ -0,0 +1,15 @@
|
||||
#! /usr/bin/env micropython
|
||||
|
||||
import gzip
|
||||
import sys
|
||||
|
||||
|
||||
def main(fname):
|
||||
with open(fname, "rb") as f:
|
||||
with gzip.GzipFile(fileobj=f) as g:
|
||||
s = g.read()
|
||||
print(s.decode("UTF-8"), end="")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main(sys.argv[1])
|
||||
Reference in New Issue
Block a user