zephyr: Remove obsolete tinytest test framework.

Commit f573e73bae rewored the zephyr port to
build MicroPython as a cmake target, and since that commit the
`make-bin-testsuite` helper script no longer works (it requires a Makefile)
and hence the tinytest test framework can no longer be run.

Instead of fixing this, remove the option to use tinytest.  Boards running
zephyr can use the standard `tests/run-tests.py` script to run tests in the
usual way.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George 2024-08-19 10:43:43 +10:00
parent 86aa61918a
commit 05cad7b56f
3 changed files with 0 additions and 65 deletions

View File

@ -59,13 +59,6 @@
#include "modmachine.h"
#include "modzephyr.h"
#ifdef TEST
#include "shared/upytesthelper/upytesthelper.h"
#include "lib/tinytest/tinytest.c"
#include "shared/upytesthelper/upytesthelper.c"
#include TEST
#endif
static char heap[MICROPY_HEAP_SIZE];
void init_zephyr(void) {
@ -128,13 +121,6 @@ int real_main(void) {
init_zephyr();
mp_hal_init();
#ifdef TEST
static const char *argv[] = {"test"};
upytest_set_heap(heap, heap + sizeof(heap));
int r = tinytest_main(1, argv, groups);
printf("status: %d\n", r);
#endif
soft_reset:
#if MICROPY_ENABLE_GC
gc_init(heap, heap + sizeof(heap));

View File

@ -1,20 +0,0 @@
#!/bin/sh
#
# This is a wrapper for make to build a binary with builtin testsuite.
# It should be run just like make (i.e. extra vars can be passed on the
# command line, etc.), e.g.:
#
# ./make-bin-testsuite BOARD=qemu_cortex_m3
# ./make-bin-testsuite BOARD=qemu_cortex_m3 run
#
(cd ../../tests; ./run-tests.py --write-exp)
(cd ../../tests; ./run-tests.py --list-tests --target=minimal \
-e async -e intbig -e int_big -e builtin_help -e memstats -e bytes_compare3 -e class_reverse_op \
-e /set -e frozenset -e complex -e const -e native -e viper \
-e 'float_divmod\.' -e float_parse_doubleprec -e float/true_value -e float/types \
| ../tools/tinytest-codegen.py --stdin) > bin-testsuite.c
make \
CFLAGS_EXTRA='-DMP_CONFIGFILE="<mpconfigport_bin_testsuite.h>" -DTEST=\"bin-testsuite.c\" -DNO_FORKING' \
"$@"

View File

@ -1,31 +0,0 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2017 Linaro Limited
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "mpconfigport.h"
#ifdef TEST
#include "shared/upytesthelper/upytesthelper.h"
#define MP_PLAT_PRINT_STRN(str, len) upytest_output(str, len)
#endif