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_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_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
|
||||
btree cexample cmath collections
|
||||
cppexample ffi framebuf gc
|
||||
hashlib math sys termios
|
||||
ubinascii uctypes uerrno uheapq
|
||||
uio ujson ulab uos
|
||||
urandom ure uselect ustruct
|
||||
utime utimeq uzlib
|
||||
hashlib math qrio sys
|
||||
termios ubinascii uctypes uerrno
|
||||
uheapq uio ujson ulab
|
||||
uos urandom ure uselect
|
||||
ustruct utime utimeq uzlib
|
||||
ime
|
||||
|
||||
utime utimeq
|
||||
|
|
Loading…
Reference in New Issue