From 0b748be0b7f76ed76e5035e85a0704c9e7a8ae79 Mon Sep 17 00:00:00 2001 From: Advait Jain Date: Fri, 11 Sep 2020 15:05:42 -0700 Subject: [PATCH 1/2] Small cleanup to the stm32f4 makefile and CI scripts. * added renode behind a flag to disable for CI but keep for direct invocations of test_stm32f4.sh * no-longer excluding kernel tests that pass for stm32f4 * removed stale example exclusions Manually tested that the following command succeeds (And runs all the tests via renode): tensorflow/lite/micro/tools/ci_build/test_stm32f4.sh --- .../lite/micro/tools/ci_build/test_all.sh | 2 +- .../lite/micro/tools/ci_build/test_stm32f4.sh | 10 +++++---- .../tools/make/targets/stm32f4_makefile.inc | 21 ++++--------------- 3 files changed, 11 insertions(+), 22 deletions(-) diff --git a/tensorflow/lite/micro/tools/ci_build/test_all.sh b/tensorflow/lite/micro/tools/ci_build/test_all.sh index 945d2e63f91..f718f7cde46 100755 --- a/tensorflow/lite/micro/tools/ci_build/test_all.sh +++ b/tensorflow/lite/micro/tools/ci_build/test_all.sh @@ -47,7 +47,7 @@ echo "Running Sparkfun tests at `date`" tensorflow/lite/micro/tools/ci_build/test_sparkfun.sh echo "Running stm32f4 tests at `date`" -tensorflow/lite/micro/tools/ci_build/test_stm32f4.sh +tensorflow/lite/micro/tools/ci_build/test_stm32f4.sh PRESUBMIT echo "Running Arduino tests at `date`" tensorflow/lite/micro/tools/ci_build/test_arduino.sh diff --git a/tensorflow/lite/micro/tools/ci_build/test_stm32f4.sh b/tensorflow/lite/micro/tools/ci_build/test_stm32f4.sh index 2ef1bb1f97f..4f744e6aa2b 100755 --- a/tensorflow/lite/micro/tools/ci_build/test_stm32f4.sh +++ b/tensorflow/lite/micro/tools/ci_build/test_stm32f4.sh @@ -40,7 +40,9 @@ readable_run make -j8 -f tensorflow/lite/micro/tools/make/Makefile BUILD_TYPE=re readable_run make -f tensorflow/lite/micro/tools/make/Makefile clean readable_run make -j8 -f tensorflow/lite/micro/tools/make/Makefile TAGS=${TAGS} TARGET=${TARGET} build -# TODO(b/149597202): Disabled until we can get Docker running inside Docker. -# Parallell builds doesn't work very well with this -#readable_run make -f tensorflow/lite/micro/tools/make/Makefile TAGS=${TAGS} TARGET=${TARGET} test - +# TODO(b/149597202): Running tests via renode are disabled as part of the +# continuous integration until we can get Docker running inside Docker. However, +# if this script is run locally, the tests will still be run. +if [[ ${1} != "PRESUBMIT" ]]; then +readable_run make -f tensorflow/lite/micro/tools/make/Makefile TAGS=${TAGS} TARGET=${TARGET} test +fi diff --git a/tensorflow/lite/micro/tools/make/targets/stm32f4_makefile.inc b/tensorflow/lite/micro/tools/make/targets/stm32f4_makefile.inc index 15ee93d4e19..53994cb1301 100644 --- a/tensorflow/lite/micro/tools/make/targets/stm32f4_makefile.inc +++ b/tensorflow/lite/micro/tools/make/targets/stm32f4_makefile.inc @@ -62,35 +62,22 @@ ifeq ($(TARGET), stm32f4) TEST_SCRIPT := tensorflow/lite/micro/testing/test_stm32f4_binary.sh # TODO, non working tests.. the micro_speech example partly works # TODO(b/158324045): Examine why some tests fail here. + EXCLUDED_TESTS := \ tensorflow/lite/micro/micro_interpreter_test.cc \ tensorflow/lite/micro/micro_allocator_test.cc \ tensorflow/lite/micro/memory_helpers_test.cc \ tensorflow/lite/micro/memory_arena_threshold_test.cc \ tensorflow/lite/micro/recording_micro_allocator_test.cc \ - tensorflow/lite/micro/kernels/logistic_test.cc \ - tensorflow/lite/micro/kernels/logical_test.cc \ - tensorflow/lite/micro/kernels/maximum_minimum_test.cc \ - tensorflow/lite/micro/kernels/comparisons_test.cc \ - tensorflow/lite/micro/kernels/reshape_test.cc \ - tensorflow/lite/micro/kernels/arg_min_max_test.cc \ - tensorflow/lite/micro/kernels/elementwise_test.cc \ - tensorflow/lite/micro/kernels/strided_slice_test.cc \ - tensorflow/lite/micro/kernels/prelu_test.cc \ - tensorflow/lite/micro/kernels/pack_test.cc \ - tensorflow/lite/micro/kernels/activations_test.cc \ - tensorflow/lite/micro/kernels/dequantize_test.cc \ - tensorflow/lite/micro/kernels/unpack_test.cc \ - tensorflow/lite/micro/kernels/split_test.cc \ - tensorflow/lite/micro/simple_tensor_allocator_test.cc + tensorflow/lite/micro/kernels/circular_buffer_test.cc + MICROLITE_TEST_SRCS := $(filter-out $(EXCLUDED_TESTS), $(MICROLITE_TEST_SRCS)) + EXCLUDED_EXAMPLE_TESTS := \ tensorflow/lite/micro/examples/magic_wand/Makefile.inc \ tensorflow/lite/micro/examples/person_detection/Makefile.inc \ tensorflow/lite/micro/examples/person_detection_experimental/Makefile.inc \ - tensorflow/lite/micro/examples/mobilenet_v2/Makefile.inc \ tensorflow/lite/micro/examples/micro_speech/Makefile.inc \ - tensorflow/lite/micro/examples/ds_cnn_l/Makefile.inc \ tensorflow/lite/micro/examples/image_recognition_experimental/Makefile.inc MICRO_LITE_EXAMPLE_TESTS := $(filter-out $(EXCLUDED_EXAMPLE_TESTS), $(MICRO_LITE_EXAMPLE_TESTS)) From 1a3fcd65dbfdd1439f8834725a34d4e11a437565 Mon Sep 17 00:00:00 2001 From: Advait Jain Date: Fri, 11 Sep 2020 15:22:01 -0700 Subject: [PATCH 2/2] excluded failing tests. --- tensorflow/lite/micro/tools/make/targets/stm32f4_makefile.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tensorflow/lite/micro/tools/make/targets/stm32f4_makefile.inc b/tensorflow/lite/micro/tools/make/targets/stm32f4_makefile.inc index 53994cb1301..e9ee7296999 100644 --- a/tensorflow/lite/micro/tools/make/targets/stm32f4_makefile.inc +++ b/tensorflow/lite/micro/tools/make/targets/stm32f4_makefile.inc @@ -69,7 +69,9 @@ ifeq ($(TARGET), stm32f4) tensorflow/lite/micro/memory_helpers_test.cc \ tensorflow/lite/micro/memory_arena_threshold_test.cc \ tensorflow/lite/micro/recording_micro_allocator_test.cc \ - tensorflow/lite/micro/kernels/circular_buffer_test.cc + tensorflow/lite/micro/kernels/circular_buffer_test.cc \ + tensorflow/lite/micro/kernels/conv_test.cc \ + tensorflow/lite/micro/kernels/fully_connected_test.cc MICROLITE_TEST_SRCS := $(filter-out $(EXCLUDED_TESTS), $(MICROLITE_TEST_SRCS))