Almost fix extra_coverage test
This commit is contained in:
parent
22a44c6003
commit
2910dea6fd
2
.gitmodules
vendored
2
.gitmodules
vendored
@ -293,7 +293,7 @@
|
||||
url = https://github.com/adafruit/Adafruit_CircuitPython_Ticks.git
|
||||
[submodule "frozen/Adafruit_CircuitPython_asyncio"]
|
||||
path = frozen/Adafruit_CircuitPython_asyncio
|
||||
url = https://github.com/adafruit/Adafruit_CircuitPython_asyncio.git
|
||||
url = https://github.com/tannewt/Adafruit_CircuitPython_asyncio.git
|
||||
[submodule "frozen/circuitpython_ef_music"]
|
||||
path = frozen/circuitpython_ef_music
|
||||
url = https://github.com/elecfreaks/circuitpython_ef_music.git
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 7c25d09be04a2979bcfb43b801de57594112808d
|
||||
Subproject commit 6198266ecaeb1c8486a1333ee7c18bd5678d830a
|
@ -89,7 +89,7 @@ static void usb_serial_jtag_isr_handler(void *arg) {
|
||||
}
|
||||
|
||||
void usb_serial_jtag_init(void) {
|
||||
ringbuf_init(&ringbuf, buf, sizeof(buf) - 1);
|
||||
ringbuf_init(&ringbuf, buf, sizeof(buf));
|
||||
usb_serial_jtag_ll_clr_intsts_mask(USB_SERIAL_JTAG_INTR_SOF | USB_SERIAL_JTAG_INTR_SERIAL_OUT_RECV_PKT | USB_SERIAL_JTAG_INTR_TOKEN_REC_IN_EP1);
|
||||
usb_serial_jtag_ll_ena_intr_mask(USB_SERIAL_JTAG_INTR_SOF | USB_SERIAL_JTAG_INTR_SERIAL_OUT_RECV_PKT | USB_SERIAL_JTAG_INTR_TOKEN_REC_IN_EP1);
|
||||
ESP_ERROR_CHECK(esp_intr_alloc(ETS_USB_SERIAL_JTAG_INTR_SOURCE, ESP_INTR_FLAG_LEVEL1,
|
||||
|
@ -612,8 +612,11 @@ STATIC mp_obj_t extra_coverage(void) {
|
||||
|
||||
// ringbuf
|
||||
{
|
||||
byte buf[100];
|
||||
ringbuf_t ringbuf = {buf, sizeof(buf), 0, 0, 0};
|
||||
#define RINGBUF_SIZE 99
|
||||
|
||||
byte buf[RINGBUF_SIZE];
|
||||
ringbuf_t ringbuf;
|
||||
ringbuf_init(&ringbuf, buf, sizeof(buf));
|
||||
|
||||
mp_printf(&mp_plat_print, "# ringbuf\n");
|
||||
|
||||
@ -631,7 +634,7 @@ STATIC mp_obj_t extra_coverage(void) {
|
||||
mp_printf(&mp_plat_print, "%d %d\n", ringbuf_num_empty(&ringbuf), ringbuf_num_filled(&ringbuf));
|
||||
|
||||
// Two-byte put with full ringbuf.
|
||||
for (int i = 0; i < 99; ++i) {
|
||||
for (int i = 0; i < RINGBUF_SIZE; ++i) {
|
||||
ringbuf_put(&ringbuf, i);
|
||||
}
|
||||
mp_printf(&mp_plat_print, "%d %d\n", ringbuf_num_empty(&ringbuf), ringbuf_num_filled(&ringbuf));
|
||||
@ -643,7 +646,7 @@ STATIC mp_obj_t extra_coverage(void) {
|
||||
ringbuf_get(&ringbuf);
|
||||
mp_printf(&mp_plat_print, "%d %d\n", ringbuf_num_empty(&ringbuf), ringbuf_num_filled(&ringbuf));
|
||||
mp_printf(&mp_plat_print, "%d\n", ringbuf_put16(&ringbuf, 0xcc99));
|
||||
for (int i = 0; i < 97; ++i) {
|
||||
for (int i = 0; i < RINGBUF_SIZE - 2; ++i) {
|
||||
ringbuf_get(&ringbuf);
|
||||
}
|
||||
mp_printf(&mp_plat_print, "%04x\n", ringbuf_get16(&ringbuf));
|
||||
@ -651,7 +654,7 @@ STATIC mp_obj_t extra_coverage(void) {
|
||||
|
||||
// Two-byte put with wrap around on first byte:
|
||||
ringbuf_clear(&ringbuf);
|
||||
for (int i = 0; i < 99; ++i) {
|
||||
for (int i = 0; i < RINGBUF_SIZE; ++i) {
|
||||
ringbuf_put(&ringbuf, i);
|
||||
ringbuf_get(&ringbuf);
|
||||
}
|
||||
@ -660,7 +663,7 @@ STATIC mp_obj_t extra_coverage(void) {
|
||||
|
||||
// Two-byte put with wrap around on second byte:
|
||||
ringbuf_clear(&ringbuf);
|
||||
for (int i = 0; i < 98; ++i) {
|
||||
for (int i = 0; i < RINGBUF_SIZE - 1; ++i) {
|
||||
ringbuf_put(&ringbuf, i);
|
||||
ringbuf_get(&ringbuf);
|
||||
}
|
||||
|
@ -28,7 +28,6 @@ def get_version_info_from_git(repo_path):
|
||||
|
||||
# Note: git describe doesn't work if no tag is available
|
||||
try:
|
||||
print(tools_describe)
|
||||
git_tag = subprocess.check_output(
|
||||
[tools_describe],
|
||||
cwd=repo_path,
|
||||
@ -95,10 +94,8 @@ def make_version_header(repo_path, filename):
|
||||
# Get version info using git (required)
|
||||
info = get_version_info_from_git(repo_path)
|
||||
if info is None:
|
||||
print(info)
|
||||
cannot_determine_version()
|
||||
git_tag, git_hash, ver = info
|
||||
print(git_tag, git_hash, ver)
|
||||
if len(ver) < 3:
|
||||
cannot_determine_version()
|
||||
else:
|
||||
|
@ -318,7 +318,7 @@ void tuh_hid_report_received_cb(uint8_t dev_addr, uint8_t instance, uint8_t cons
|
||||
}
|
||||
|
||||
void usb_keyboard_init(void) {
|
||||
ringbuf_init(&_incoming_ringbuf, _buf, sizeof(_buf) - 1);
|
||||
ringbuf_init(&_incoming_ringbuf, _buf, sizeof(_buf));
|
||||
}
|
||||
|
||||
bool usb_keyboard_chars_available(void) {
|
||||
|
@ -59,7 +59,7 @@ static _websocket cp_serial;
|
||||
void websocket_init(void) {
|
||||
socketpool_socket_reset(&cp_serial.socket);
|
||||
|
||||
ringbuf_init(&_incoming_ringbuf, _buf, sizeof(_buf) - 1);
|
||||
ringbuf_init(&_incoming_ringbuf, _buf, sizeof(_buf));
|
||||
}
|
||||
|
||||
void websocket_handoff(socketpool_socket_obj_t *socket) {
|
||||
|
BIN
tests/frozen/frozentest.mpy
Normal file
BIN
tests/frozen/frozentest.mpy
Normal file
Binary file not shown.
7
tests/frozen/frozentest.py
Normal file
7
tests/frozen/frozentest.py
Normal file
@ -0,0 +1,7 @@
|
||||
print("uPy")
|
||||
print("a long string that is not interned")
|
||||
print("a string that has unicode αβγ chars")
|
||||
print(b"bytes 1234\x01")
|
||||
print(123456789)
|
||||
for i in range(4):
|
||||
print(i)
|
@ -15,12 +15,12 @@ false true
|
||||
abc
|
||||
%
|
||||
# GC
|
||||
0
|
||||
0
|
||||
0x0
|
||||
0x0
|
||||
# GC part 2
|
||||
pass
|
||||
# tracked allocation
|
||||
m_tracked_head = 0
|
||||
m_tracked_head = 0x0
|
||||
0 1
|
||||
1 1
|
||||
2 1
|
||||
@ -37,7 +37,7 @@ m_tracked_head = 0
|
||||
5 1
|
||||
6 1
|
||||
7 1
|
||||
m_tracked_head = 0
|
||||
m_tracked_head = 0x0
|
||||
# vstr
|
||||
tests
|
||||
sts
|
||||
@ -55,19 +55,13 @@ _uasyncio aesio array audiocore
|
||||
audiomixer bitmaptools cexample cmath
|
||||
collections cppexample displayio gc
|
||||
math qrio rainbowio struct
|
||||
synthio termios traceback ubinascii
|
||||
uctypes uerrno uhashlib uheapq
|
||||
uio ujson ulab ulab.numpy
|
||||
ulab.numpy.fft ulab.numpy.linalg ulab.scipy
|
||||
ulab.scipy.linalg ulab.scipy.optimize
|
||||
ulab.scipy.signal ulab.scipy.special
|
||||
ulab.utils uos urandom ure
|
||||
uselect usys utime utimeq
|
||||
uzlib zlib
|
||||
synthio traceback ubinascii uctypes
|
||||
uerrno uhashlib uheapq uio
|
||||
ujson ulab uos uplatform
|
||||
urandom ure uselect usys
|
||||
utime uzlib zlib
|
||||
ime
|
||||
|
||||
utime utimeq
|
||||
|
||||
argv atexit byteorder exc_info
|
||||
executable exit getsizeof implementation
|
||||
maxsize modules path platform
|
||||
|
Loading…
Reference in New Issue
Block a user