enable qrio in unix coverage build, and add a test
This commit is contained in:
parent
131dbf1e87
commit
f9393c9e51
|
@ -21,5 +21,12 @@ MICROPY_VFS_LFS2 = 1
|
||||||
FROZEN_DIR=variants/coverage/frzstr
|
FROZEN_DIR=variants/coverage/frzstr
|
||||||
FROZEN_MPY_DIR=variants/coverage/frzmpy
|
FROZEN_MPY_DIR=variants/coverage/frzmpy
|
||||||
|
|
||||||
|
SRC_QRIO := $(patsubst ../../%,%,$(wildcard ../../shared-bindings/qrio/*.c ../../shared-module/qrio/*.c ../../lib/quirc/lib/*.c))
|
||||||
|
$(info SRC_QRIO = $(SRC_QRIO))
|
||||||
|
SRC_C += $(SRC_QRIO)
|
||||||
|
|
||||||
|
CFLAGS += -DCIRCUITPY_QRIO=1
|
||||||
|
$(BUILD)/lib/quirc/lib/%.o: CFLAGS += -Wno-shadow -Wno-sign-compare -include shared-module/qrio/quirc_alloc.h
|
||||||
|
|
||||||
SRC_C += coverage.c
|
SRC_C += coverage.c
|
||||||
SRC_CXX += coveragecpp.cpp
|
SRC_CXX += coveragecpp.cpp
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,13 @@
|
||||||
|
try:
|
||||||
|
import qrio
|
||||||
|
except:
|
||||||
|
print("SKIP")
|
||||||
|
raise SystemExit
|
||||||
|
|
||||||
|
loc = __file__.rsplit("/", 1)[0]
|
||||||
|
with open(f"{loc}/data/qr.pgm") as f:
|
||||||
|
content = f.read()[-320 * 240 :]
|
||||||
|
|
||||||
|
decoder = qrio.QRDecoder(320, 240)
|
||||||
|
for r in decoder.decode(content):
|
||||||
|
print(r)
|
|
@ -0,0 +1 @@
|
||||||
|
QRInfo(payload=b'https://adafru.it', data_type='iso_8859-2')
|
|
@ -32,11 +32,11 @@ mport
|
||||||
builtins micropython _thread array
|
builtins micropython _thread array
|
||||||
btree cexample cmath collections
|
btree cexample cmath collections
|
||||||
cppexample ffi framebuf gc
|
cppexample ffi framebuf gc
|
||||||
hashlib math sys termios
|
hashlib math qrio sys
|
||||||
ubinascii uctypes uerrno uheapq
|
termios ubinascii uctypes uerrno
|
||||||
uio ujson ulab uos
|
uheapq uio ujson ulab
|
||||||
urandom ure uselect ustruct
|
uos urandom ure uselect
|
||||||
utime utimeq uzlib
|
ustruct utime utimeq uzlib
|
||||||
ime
|
ime
|
||||||
|
|
||||||
utime utimeq
|
utime utimeq
|
||||||
|
|
Loading…
Reference in New Issue