@@ -12,6 +12,68 @@ function ci_commit_formatting_run {
12
12
tools/verifygitlog.py -v upstream/master..HEAD --no-merges
13
13
}
14
14
15
+ # #######################################################################################
16
+ # package tests
17
+
18
+ MICROPYTHON=/tmp/micropython/ports/unix/build-standard/micropython
19
+
20
+ function ci_package_tests_setup {
21
+ git clone https://github.com/micropython/micropython.git /tmp/micropython
22
+
23
+ # build mpy-cross and micropython (use -O0 to speed up the build)
24
+ make -C /tmp/micropython/mpy-cross -j CFLAGS_EXTRA=-O0
25
+ make -C /tmp/micropython/ports/unix submodules
26
+ make -C /tmp/micropython/ports/unix -j CFLAGS_EXTRA=-O0
27
+ }
28
+
29
+ function ci_package_tests_run {
30
+ for test in \
31
+ ./micropython/drivers/storage/sdcard/sdtest.py \
32
+ ./micropython/ucontextlib/tests.py \
33
+ ./micropython/xmltok/test_xmltok.py \
34
+ ./python-ecosys/requests/test_requests.py \
35
+ ./python-stdlib/argparse/test_argparse.py \
36
+ ./python-stdlib/base64/test_base64.py \
37
+ ./python-stdlib/binascii/test_binascii.py \
38
+ ./python-stdlib/collections-defaultdict/test_defaultdict.py \
39
+ ./python-stdlib/functools/test_partial.py \
40
+ ./python-stdlib/functools/test_reduce.py \
41
+ ./python-stdlib/heapq/test_heapq.py \
42
+ ./python-stdlib/hmac/test_hmac.py \
43
+ ./python-stdlib/itertools/test_itertools.py \
44
+ ./python-stdlib/operator/test_operator.py \
45
+ ./python-stdlib/os-path/test_path.py \
46
+ ./python-stdlib/pickle/test_pickle.py \
47
+ ./python-stdlib/shutil/test_shutil.py \
48
+ ./python-stdlib/string/test_translate.py \
49
+ ./python-stdlib/tempfile/test_tempfile.py \
50
+ ./python-stdlib/time/test_time.py \
51
+ ./unix-ffi/gettext/test_gettext.py \
52
+ ./unix-ffi/pwd/test_getpwnam.py \
53
+ ./unix-ffi/re/test_re.py \
54
+ ./unix-ffi/time/test_strftime.py \
55
+ ; do
56
+ echo " Running test $test "
57
+ (cd ` dirname $test ` && $MICROPYTHON ` basename $test ` )
58
+ if [ $? -ne 0 ]; then
59
+ false # make this function return an error code
60
+ return
61
+ fi
62
+ done
63
+
64
+ (cd micropython/usb/usb-device && $MICROPYTHON -m tests.test_core_buffer)
65
+ if [ $? -ne 0 ]; then false ; return ; fi
66
+
67
+ (cd python-ecosys/cbor2 && $MICROPYTHON -m examples.cbor_test)
68
+ if [ $? -ne 0 ]; then false ; return ; fi
69
+
70
+ (cd python-stdlib/pathlib && $MICROPYTHON -m unittest)
71
+ if [ $? -ne 0 ]; then false ; return ; fi
72
+
73
+ (cd python-stdlib/unittest-discover/tests && $MICROPYTHON -m unittest)
74
+ if [ $? -ne 0 ]; then false ; return ; fi
75
+ }
76
+
15
77
# #######################################################################################
16
78
# build packages
17
79
0 commit comments