summaryrefslogtreecommitdiff
path: root/tests/thread
diff options
context:
space:
mode:
authorAnson He <ansonhe1997@gmail.com>2020-07-28 17:03:10 +0800
committerGitHub <noreply@github.com>2020-07-28 17:03:10 +0800
commitc010cc2c414a98caa1aa510497666bf017c792ab (patch)
treedac841881017719bae0654a64cbc52f35cf6977a /tests/thread
parent36ef3476de945071da9c1274e5b4d8bcdcc13d13 (diff)
parentdebbf1028adee2309ed991c90517c50d5eb13bfb (diff)
Merge pull request #1 from adafruit/main
Merged main to fork
Diffstat (limited to 'tests/thread')
-rw-r--r--tests/thread/mutate_bytearray.py4
-rw-r--r--tests/thread/mutate_dict.py4
-rw-r--r--tests/thread/mutate_instance.py4
-rw-r--r--tests/thread/mutate_list.py4
-rw-r--r--tests/thread/mutate_set.py4
-rw-r--r--tests/thread/stress_aes.py4
-rw-r--r--tests/thread/stress_heap.py4
-rw-r--r--tests/thread/stress_recurse.py4
-rw-r--r--tests/thread/thread_exc1.py4
-rw-r--r--tests/thread/thread_exit1.py4
-rw-r--r--tests/thread/thread_exit2.py4
-rw-r--r--tests/thread/thread_gc1.py4
-rw-r--r--tests/thread/thread_ident1.py4
-rw-r--r--tests/thread/thread_lock1.py4
-rw-r--r--tests/thread/thread_lock2.py4
-rw-r--r--tests/thread/thread_lock3.py4
-rw-r--r--tests/thread/thread_lock4.py4
-rw-r--r--tests/thread/thread_qstr1.py4
-rw-r--r--tests/thread/thread_shared1.py4
-rw-r--r--tests/thread/thread_shared2.py4
-rw-r--r--tests/thread/thread_sleep1.py4
-rw-r--r--tests/thread/thread_stacksize1.py4
-rw-r--r--tests/thread/thread_start1.py4
-rw-r--r--tests/thread/thread_start2.py4
24 files changed, 72 insertions, 24 deletions
diff --git a/tests/thread/mutate_bytearray.py b/tests/thread/mutate_bytearray.py
index f91b2d580..5015c3f9c 100644
--- a/tests/thread/mutate_bytearray.py
+++ b/tests/thread/mutate_bytearray.py
@@ -1,6 +1,8 @@
# test concurrent mutating access to a shared bytearray object
#
-# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+# SPDX-FileCopyrightText: Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+#
+# SPDX-License-Identifier: MIT
import _thread
diff --git a/tests/thread/mutate_dict.py b/tests/thread/mutate_dict.py
index c57d332d5..563fce39d 100644
--- a/tests/thread/mutate_dict.py
+++ b/tests/thread/mutate_dict.py
@@ -1,6 +1,8 @@
# test concurrent mutating access to a shared dict object
#
-# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+# SPDX-FileCopyrightText: Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+#
+# SPDX-License-Identifier: MIT
import _thread
diff --git a/tests/thread/mutate_instance.py b/tests/thread/mutate_instance.py
index a1ae428b5..2ecfbe109 100644
--- a/tests/thread/mutate_instance.py
+++ b/tests/thread/mutate_instance.py
@@ -1,6 +1,8 @@
# test concurrent mutating access to a shared user instance
#
-# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+# SPDX-FileCopyrightText: Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+#
+# SPDX-License-Identifier: MIT
import _thread
diff --git a/tests/thread/mutate_list.py b/tests/thread/mutate_list.py
index 764a9bd99..d70e8a8a3 100644
--- a/tests/thread/mutate_list.py
+++ b/tests/thread/mutate_list.py
@@ -1,6 +1,8 @@
# test concurrent mutating access to a shared list object
#
-# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+# SPDX-FileCopyrightText: Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+#
+# SPDX-License-Identifier: MIT
import _thread
diff --git a/tests/thread/mutate_set.py b/tests/thread/mutate_set.py
index 5492d8631..c4529f356 100644
--- a/tests/thread/mutate_set.py
+++ b/tests/thread/mutate_set.py
@@ -1,6 +1,8 @@
# test concurrent mutating access to a shared set object
#
-# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+# SPDX-FileCopyrightText: Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+#
+# SPDX-License-Identifier: MIT
import _thread
diff --git a/tests/thread/stress_aes.py b/tests/thread/stress_aes.py
index df75e616c..ebf7af371 100644
--- a/tests/thread/stress_aes.py
+++ b/tests/thread/stress_aes.py
@@ -11,7 +11,9 @@
# aggressive by changing the amount of data to encrypt, the number of loops and
# the number of threads.
#
-# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+# SPDX-FileCopyrightText: Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+#
+# SPDX-License-Identifier: MIT
##################################################################
# discrete arithmetic routines, mostly from a precomputed table
diff --git a/tests/thread/stress_heap.py b/tests/thread/stress_heap.py
index 5482a9ac6..206cf1a86 100644
--- a/tests/thread/stress_heap.py
+++ b/tests/thread/stress_heap.py
@@ -1,7 +1,9 @@
# stress test for the heap by allocating lots of objects within threads
# allocates about 5mb on the heap
#
-# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+# SPDX-FileCopyrightText: Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+#
+# SPDX-License-Identifier: MIT
try:
import utime as time
diff --git a/tests/thread/stress_recurse.py b/tests/thread/stress_recurse.py
index 68367c4dd..8edee246a 100644
--- a/tests/thread/stress_recurse.py
+++ b/tests/thread/stress_recurse.py
@@ -1,6 +1,8 @@
# test hitting the function recursion limit within a thread
#
-# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+# SPDX-FileCopyrightText: Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+#
+# SPDX-License-Identifier: MIT
import _thread
diff --git a/tests/thread/thread_exc1.py b/tests/thread/thread_exc1.py
index 10fb94b4f..e00a16bd2 100644
--- a/tests/thread/thread_exc1.py
+++ b/tests/thread/thread_exc1.py
@@ -1,6 +1,8 @@
# test raising and catching an exception within a thread
#
-# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+# SPDX-FileCopyrightText: Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+#
+# SPDX-License-Identifier: MIT
import _thread
diff --git a/tests/thread/thread_exit1.py b/tests/thread/thread_exit1.py
index 88cdd165c..ad7b01d89 100644
--- a/tests/thread/thread_exit1.py
+++ b/tests/thread/thread_exit1.py
@@ -1,6 +1,8 @@
# test _thread.exit() function
#
-# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+# SPDX-FileCopyrightText: Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+#
+# SPDX-License-Identifier: MIT
try:
import utime as time
diff --git a/tests/thread/thread_exit2.py b/tests/thread/thread_exit2.py
index 368a11bba..6bff8a173 100644
--- a/tests/thread/thread_exit2.py
+++ b/tests/thread/thread_exit2.py
@@ -1,6 +1,8 @@
# test raising SystemExit to finish a thread
#
-# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+# SPDX-FileCopyrightText: Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+#
+# SPDX-License-Identifier: MIT
try:
import utime as time
diff --git a/tests/thread/thread_gc1.py b/tests/thread/thread_gc1.py
index 8dcbf7e07..2ea189161 100644
--- a/tests/thread/thread_gc1.py
+++ b/tests/thread/thread_gc1.py
@@ -1,6 +1,8 @@
# test that we can run the garbage collector within threads
#
-# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+# SPDX-FileCopyrightText: Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+#
+# SPDX-License-Identifier: MIT
import gc
import _thread
diff --git a/tests/thread/thread_ident1.py b/tests/thread/thread_ident1.py
index 217fce73b..9a6f89ff5 100644
--- a/tests/thread/thread_ident1.py
+++ b/tests/thread/thread_ident1.py
@@ -1,6 +1,8 @@
# test _thread.get_ident() function
#
-# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+# SPDX-FileCopyrightText: Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+#
+# SPDX-License-Identifier: MIT
import _thread
diff --git a/tests/thread/thread_lock1.py b/tests/thread/thread_lock1.py
index ba5c7dff0..c2d7c9d1e 100644
--- a/tests/thread/thread_lock1.py
+++ b/tests/thread/thread_lock1.py
@@ -1,6 +1,8 @@
# test _thread lock object using a single thread
#
-# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+# SPDX-FileCopyrightText: Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+#
+# SPDX-License-Identifier: MIT
import _thread
diff --git a/tests/thread/thread_lock2.py b/tests/thread/thread_lock2.py
index 405f10b0b..4ef912dff 100644
--- a/tests/thread/thread_lock2.py
+++ b/tests/thread/thread_lock2.py
@@ -1,6 +1,8 @@
# test _thread lock objects with multiple threads
#
-# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+# SPDX-FileCopyrightText: Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+#
+# SPDX-License-Identifier: MIT
try:
import utime as time
diff --git a/tests/thread/thread_lock3.py b/tests/thread/thread_lock3.py
index 607898dad..35808d99c 100644
--- a/tests/thread/thread_lock3.py
+++ b/tests/thread/thread_lock3.py
@@ -1,6 +1,8 @@
# test thread coordination using a lock object
#
-# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+# SPDX-FileCopyrightText: Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+#
+# SPDX-License-Identifier: MIT
import _thread
diff --git a/tests/thread/thread_lock4.py b/tests/thread/thread_lock4.py
index 2f9d42d6b..440f3e90c 100644
--- a/tests/thread/thread_lock4.py
+++ b/tests/thread/thread_lock4.py
@@ -1,6 +1,8 @@
# test using lock to coordinate access to global mutable objects
#
-# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+# SPDX-FileCopyrightText: Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+#
+# SPDX-License-Identifier: MIT
try:
import utime as time
diff --git a/tests/thread/thread_qstr1.py b/tests/thread/thread_qstr1.py
index f4136d964..dccfb7f51 100644
--- a/tests/thread/thread_qstr1.py
+++ b/tests/thread/thread_qstr1.py
@@ -1,6 +1,8 @@
# test concurrent interning of strings
#
-# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+# SPDX-FileCopyrightText: Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+#
+# SPDX-License-Identifier: MIT
try:
import utime as time
diff --git a/tests/thread/thread_shared1.py b/tests/thread/thread_shared1.py
index 13c6651cc..de339ad7f 100644
--- a/tests/thread/thread_shared1.py
+++ b/tests/thread/thread_shared1.py
@@ -1,6 +1,8 @@
# test capability for threads to access a shared immutable data structure
#
-# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+# SPDX-FileCopyrightText: Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+#
+# SPDX-License-Identifier: MIT
import _thread
diff --git a/tests/thread/thread_shared2.py b/tests/thread/thread_shared2.py
index e4bfe7802..2c749e688 100644
--- a/tests/thread/thread_shared2.py
+++ b/tests/thread/thread_shared2.py
@@ -1,7 +1,9 @@
# test capability for threads to access a shared mutable data structure
# (without contention because they access different parts of the structure)
#
-# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+# SPDX-FileCopyrightText: Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+#
+# SPDX-License-Identifier: MIT
import _thread
diff --git a/tests/thread/thread_sleep1.py b/tests/thread/thread_sleep1.py
index 032ec1754..d5aa99f97 100644
--- a/tests/thread/thread_sleep1.py
+++ b/tests/thread/thread_sleep1.py
@@ -1,6 +1,8 @@
# test threads sleeping
#
-# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+# SPDX-FileCopyrightText: Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+#
+# SPDX-License-Identifier: MIT
try:
import utime
diff --git a/tests/thread/thread_stacksize1.py b/tests/thread/thread_stacksize1.py
index 62b6e5e40..e7189fafb 100644
--- a/tests/thread/thread_stacksize1.py
+++ b/tests/thread/thread_stacksize1.py
@@ -1,6 +1,8 @@
# test setting the thread stack size
#
-# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+# SPDX-FileCopyrightText: Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+#
+# SPDX-License-Identifier: MIT
import sys
import _thread
diff --git a/tests/thread/thread_start1.py b/tests/thread/thread_start1.py
index d23a74aa2..94df6dc62 100644
--- a/tests/thread/thread_start1.py
+++ b/tests/thread/thread_start1.py
@@ -1,6 +1,8 @@
# test basic capability to start a new thread
#
-# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+# SPDX-FileCopyrightText: Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+#
+# SPDX-License-Identifier: MIT
try:
import utime as time
diff --git a/tests/thread/thread_start2.py b/tests/thread/thread_start2.py
index d0913e37c..9412bb618 100644
--- a/tests/thread/thread_start2.py
+++ b/tests/thread/thread_start2.py
@@ -1,6 +1,8 @@
# test capability to start a thread with keyword args
#
-# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+# SPDX-FileCopyrightText: Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+#
+# SPDX-License-Identifier: MIT
try:
import utime as time