Skip to content

Commit

Permalink
lib: vendor tinytest
Browse files Browse the repository at this point in the history
Upstream MicroPython is removing tinytest from it's source tree, so
we need to make a copy of it so things don't break in future updates.
  • Loading branch information
dlech committed Sep 7, 2024
1 parent bd7c345 commit aa7eb39
Show file tree
Hide file tree
Showing 6 changed files with 778 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,6 @@
{
"name": "pbio/test",
"includePath": [
"${workspaceFolder}/micropython/lib/tinytest",
"${workspaceFolder}/lib/btstack/chipset/cc256x",
"${workspaceFolder}/lib/btstack/platform/posix",
"${workspaceFolder}/lib/btstack/src",
Expand All @@ -440,7 +439,8 @@
"${workspaceFolder}/lib/pbio/include",
"${workspaceFolder}/lib/pbio/platform/test",
"${workspaceFolder}/lib/pbio/test",
"${workspaceFolder}/lib/pbio/test/build"
"${workspaceFolder}/lib/pbio/test/build",
"${workspaceFolder}/lib/tinytest"
],
"defines": [
"UNIX"
Expand Down
4 changes: 2 additions & 2 deletions lib/pbio/test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ endif

all: $(PROG)

# using tinytest from upstream MicroPython
TINY_TEST_DIR = ../../../micropython/lib/tinytest
# tinytest dependency
TINY_TEST_DIR = ../../tinytest
TINY_TEST_INC = -I$(TINY_TEST_DIR)
TINY_TEST_SRC = $(TINY_TEST_DIR)/tinytest.c

Expand Down
18 changes: 18 additions & 0 deletions lib/tinytest/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Tinytest is a tiny little test framework written in C by Nick Mathewson.

It is distributed under the 3-clause BSD license. You can use it in
your own programs so long as you follow the license's conditions.

It's been tested on Windows, Mac, and many of the free Unixes.

It knows how to fork before running certain tests, and it makes
text-mode output in a format I like.

For info on how to use it, check out tinytest_demo.c.

You can get the latest version using Git, by pulling from
git://github.com/nmathewson/tinytest.git

Patches are welcome. Patches that turn this from tinytest to hugetest
will not be applied. If you want a huge test framework, use CUnit.

Loading

0 comments on commit aa7eb39

Please sign in to comment.