Origami-Cloudless-AI / TinyMLaaS-2023-winter

Run Hello World of TensorFlow Lite for micro automatically in Docker
https://Origami-TinyML.github.io/tflm_hello_world
Apache License 2.0
1 stars 2 forks source link

Test Driven Development coverage #16

Closed doyu closed 1 year ago

doyu commented 1 year ago

Present unit test code coverage

doyu commented 1 year ago

Any update?

ArttuLe commented 1 year ago

@doyu #16

FROM ubuntu

RUN apt update && apt install -y git make unzip curl g++ python3 pip wget
COPY /build/requirements.txt ./
RUN pip3 install -r requirements.txt
RUN git clone https://github.com/tensorflow/tflite-micro.git

WORKDIR tflite-micro

RUN make -f tensorflow/lite/micro/tools/make/Makefile test_hello_world_test hello_world_bin ADDITIONAL_DEFINES=--coverage
RUN gcov -pb -o gen/linux_x86_64_default/obj/core/tensorflow/lite/micro/examples/hello_world tensorflow/lite/micro/examples/hello_world/hello_world_test.cc

#Move the generated .gcov file to the Host machine

CMD `["./gen/linux_x86_64_default/bin/hello_world"]
doyu commented 1 year ago

@ArttuLe Could you send a PR? I won't take but it's easier for me to try, I guess.....

doyu commented 1 year ago

@ArttuLe

I'm sorry and I am lost at which issue you implemented a codecov bad badge. Still I don't see that badge on the repo site after I merged a small change in READEME.md. Does the codecov baget show up only when C-code is modified?