Skip to content

Commit fab634e

Browse files
committed
Turn on Rosie CI testing to test new builds on real hardware.
This introduces a skip_if module that can be used by tests to determine when they should be skipped due to the environment. Some tests have been split in order to have finer grained skip control.
1 parent f6a7025 commit fab634e

31 files changed

+306
-84
lines changed

.rosie.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# This configuration file tells Rosie where to find prebuilt .bin files (Travis
2+
# builds them) and where to find the tests.
3+
4+
binaries:
5+
prebuilt_s3: adafruit-circuit-python
6+
file_pattern: bin/{board}/adafruit-circuitpython-{board}-*-{short_sha}.{extension}
7+
8+
circuitpython_tests:
9+
test_directories:
10+
- tests/basics
11+
- tests/circuitpython
12+
test_helper:
13+
- tests/skip_if.py

.travis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ notifications:
2020
on_success: change # options: [always|never|change] default: always
2121
on_failure: always # options: [always|never|change] default: always
2222
on_start: never # options: [always|never|change] default: always
23+
webhooks:
24+
urls:
25+
- https://rosie-ci.ngrok.io/travis
26+
on_success: always
27+
on_failure: always
28+
on_start: always
29+
on_cancel: always
30+
on_error: always
2331

2432
before_script:
2533
- sudo add-apt-repository -y ppa:team-gcc-arm-embedded/ppa

atmel-samd/mpconfigport.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
#define MICROPY_ENABLE_DOC_STRING (0)
3434
//#define MICROPY_ERROR_REPORTING (MICROPY_ERROR_REPORTING_TERSE)
3535
#define MICROPY_ERROR_REPORTING (MICROPY_ERROR_REPORTING_NORMAL)
36-
#define MICROPY_BUILTIN_METHOD_CHECK_SELF_ARG (0)
3736
#define MICROPY_PY_ASYNC_AWAIT (0)
3837
#define MICROPY_PY_BUILTINS_BYTEARRAY (1)
3938
#define MICROPY_PY_BUILTINS_MEMORYVIEW (1)
@@ -61,7 +60,6 @@
6160
#define MICROPY_PY_URANDOM_EXTRA_FUNCS (0)
6261
#define MICROPY_PY_STRUCT (1)
6362
#define MICROPY_PY_SYS (1)
64-
#define MICROPY_CPYTHON_COMPAT (0)
6563
// If you change MICROPY_LONGINT_IMPL, also change MPY_TOOL_LONGINT_IMPL in mpconfigport.mk.
6664
#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_NONE)
6765
#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_FLOAT)
@@ -166,6 +164,13 @@ extern const struct _mp_obj_module_t usb_hid_module;
166164
#define MICROPY_PY_URE (1)
167165
#define MICROPY_PY_MICROPYTHON_MEM_INFO (1)
168166
#define MICROPY_PY_FRAMEBUF (1)
167+
168+
#define MICROPY_BUILTIN_METHOD_CHECK_SELF_ARG (1)
169+
#define MICROPY_PY_ALL_SPECIAL_METHODS (1)
170+
#define MICROPY_PY_ARRAY_SLICE_ASSIGN (1)
171+
#define MICROPY_PY_SYS_MAXSIZE (1)
172+
#define MICROPY_CPYTHON_COMPAT (1)
173+
169174
#define EXTRA_BUILTIN_MODULES \
170175
{ MP_OBJ_NEW_QSTR(MP_QSTR_audioio), (mp_obj_t)&audioio_module }, \
171176
{ MP_OBJ_NEW_QSTR(MP_QSTR_audiobusio), (mp_obj_t)&audiobusio_module }, \
@@ -177,6 +182,9 @@ extern const struct _mp_obj_module_t usb_hid_module;
177182
#define MICROPY_PY_MICROPYTHON_MEM_INFO (0)
178183
#define MICROPY_PY_FRAMEBUF (0)
179184
#define EXTRA_BUILTIN_MODULES
185+
186+
#define MICROPY_BUILTIN_METHOD_CHECK_SELF_ARG (0)
187+
#define MICROPY_CPYTHON_COMPAT (0)
180188
#endif
181189

182190
#define MICROPY_PORT_BUILTIN_MODULES \

index.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ Adafruit CircuitPython API Reference
1313
:target: https://gitter.im/adafruit/circuitpython?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge
1414
:alt: Gitter
1515

16+
.. image :: https://img.shields.io/discord/327254708534116352.svg
17+
:target: https://adafru.it/discord
18+
:alt: Discord
19+
1620
Welcome! This is the documentation for Adafruit CircuitPython. It is an open
1721
source derivative of `MicroPython <https://micropython.org>`_ for use on
1822
educational development boards designed and sold by `Adafruit

lib/utils/pyexec.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,9 @@ STATIC int parse_compile_execute(const void *source, mp_parse_input_kind_t input
136136
if (mp_obj_is_exception_instance(return_value)) {
137137
size_t n, *values;
138138
mp_obj_exception_get_traceback(return_value, &n, &values);
139-
result->exception_line = values[n - 2];
139+
if (values != NULL) {
140+
result->exception_line = values[n - 2];
141+
}
140142
}
141143
}
142144
}

py/builtinimport.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ STATIC mp_import_stat_t find_file(const char *file_str, uint file_len, vstr_t *d
115115
vstr_reset(dest);
116116
size_t p_len;
117117
const char *p = mp_obj_str_get_data(path_items[i], &p_len);
118+
DEBUG_printf("Looking in path: %d =%s=\n", i, p);
118119
if (p_len > 0) {
119120
vstr_add_strn(dest, p, p_len);
120121
vstr_add_char(dest, PATH_SEP_CHAR);
@@ -386,6 +387,7 @@ mp_obj_t mp_builtin___import__(size_t n_args, const mp_obj_t *args) {
386387
mp_import_stat_t stat;
387388
if (vstr_len(&path) == 0) {
388389
// first module in the dotted-name; search for a directory or file
390+
DEBUG_printf("Find file =%.*s=\n", vstr_len(&path), vstr_str(&path));
389391
stat = find_file(mod_str, i, &path);
390392
} else {
391393
// latter module in the dotted-name; append to path

py/frozenmod.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ STATIC mp_lexer_t *mp_lexer_frozen_str(const char *str, size_t str_len) {
7272
mp_lexer_t *lex = MICROPY_MODULE_FROZEN_LEXER(source, content, file_len, 0);
7373
return lex;
7474
}
75-
7675
#endif
7776

7877
#if MICROPY_MODULE_FROZEN_MPY

py/mkrules.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ $(TOP)/mpy-cross/mpy-cross: $(TOP)/py/*.[ch] $(TOP)/mpy-cross/*.[ch] $(TOP)/wind
107107
$(Q)$(MAKE) -C $(TOP)/mpy-cross
108108

109109
# make a list of all the .py files that need compiling and freezing
110+
BLAH := $(info $(shell pwd))
110111

111112
FROZEN_MPY_PY_FILES := $(shell find -L $(FROZEN_MPY_DIR) -type f -name '*.py' | $(SED) -e 's=^$(FROZEN_MPY_DIR)/==')
112113
FROZEN_MPY_MPY_FILES := $(addprefix $(BUILD)/frozen_mpy/,$(FROZEN_MPY_PY_FILES:.py=.mpy))

py/mpconfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
// to another, you must rebuild from scratch using "-B" switch to make.
4141

4242
#ifdef MP_CONFIGFILE
43-
#include MP_CONFIGFILE
43+
#include "mpconfigport_coverage.h"
4444
#else
4545
#include <mpconfigport.h>
4646
#endif

tests/basics/array_intbig.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# test array types QqLl that require big-ints
2+
import skip_if
3+
skip_if.no_bigint()
24

35
try:
46
from array import array

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy