diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 12ba0b2..ca00fa7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,7 +17,7 @@ jobs: - name: Run host tests run: make test-host - name: Lint sources - run: ufbt lint ARGS="!./tests/host/vendor/munit" + run: ufbt lint - name: Build with ufbt uses: flipperdevices/flipperzero-ufbt-action@v0.1.2 id: build-app diff --git a/.gitmodules b/.gitmodules index 8599403..1eefbed 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "plugin"] path = plugin url = https://gitlab.com/bettse/flipper-wiegand-plugin.git -[submodule "tests/host/vendor/munit"] - path = tests/host/vendor/munit +[submodule "lib/host_tests/vendor/munit"] + path = lib/host_tests/vendor/munit url = https://github.com/nemequ/munit.git diff --git a/Makefile b/Makefile index 945312a..9723f34 100644 --- a/Makefile +++ b/Makefile @@ -11,13 +11,13 @@ build: test-host: mkdir -p build/host_tests - cc -std=c11 -Wall -Wextra -Werror -DSEADER_HOST_TEST -Itests/host/vendor/munit -Itests/host -I. \ - tests/host/vendor/munit/munit.c \ - tests/host/test_main.c \ - tests/host/test_lrc.c \ - tests/host/test_t1_existing.c \ - tests/host/t1_test_stubs.c \ - tests/host/bit_buffer_mock.c \ + cc -std=c11 -Wall -Wextra -Werror -DSEADER_HOST_TEST -Ilib/host_tests/vendor/munit -Ilib/host_tests -I. \ + lib/host_tests/vendor/munit/munit.c \ + lib/host_tests/test_main.c \ + lib/host_tests/test_lrc.c \ + lib/host_tests/test_t1_existing.c \ + lib/host_tests/t1_test_stubs.c \ + lib/host_tests/bit_buffer_mock.c \ lrc.c \ t_1.c \ -o build/host_tests/seader_tests @@ -27,7 +27,7 @@ launch: ufbt launch format: - ufbt format ARGS="!./tests/host/vendor/munit" + ufbt format clean: rm -rf dist diff --git a/application.fam b/application.fam index 9830012..444f63b 100644 --- a/application.fam +++ b/application.fam @@ -21,7 +21,6 @@ App( "*.c", "aeabi_uldivmod.sx", "!plugin/*.c", - "!tests", ], fap_icon="icons/logo.png", fap_category="NFC", diff --git a/tests/host/bit_buffer.h b/lib/host_tests/bit_buffer.h similarity index 100% rename from tests/host/bit_buffer.h rename to lib/host_tests/bit_buffer.h diff --git a/tests/host/bit_buffer_mock.c b/lib/host_tests/bit_buffer_mock.c similarity index 100% rename from tests/host/bit_buffer_mock.c rename to lib/host_tests/bit_buffer_mock.c diff --git a/tests/host/t1_test_stubs.c b/lib/host_tests/t1_test_stubs.c similarity index 100% rename from tests/host/t1_test_stubs.c rename to lib/host_tests/t1_test_stubs.c diff --git a/tests/host/t_1_host_env.h b/lib/host_tests/t_1_host_env.h similarity index 100% rename from tests/host/t_1_host_env.h rename to lib/host_tests/t_1_host_env.h diff --git a/tests/host/test_lrc.c b/lib/host_tests/test_lrc.c similarity index 100% rename from tests/host/test_lrc.c rename to lib/host_tests/test_lrc.c diff --git a/tests/host/test_main.c b/lib/host_tests/test_main.c similarity index 100% rename from tests/host/test_main.c rename to lib/host_tests/test_main.c diff --git a/tests/host/test_t1_existing.c b/lib/host_tests/test_t1_existing.c similarity index 100% rename from tests/host/test_t1_existing.c rename to lib/host_tests/test_t1_existing.c diff --git a/tests/host/vendor/munit b/lib/host_tests/vendor/munit similarity index 100% rename from tests/host/vendor/munit rename to lib/host_tests/vendor/munit diff --git a/t_1.c b/t_1.c index d558795..8649e26 100644 --- a/t_1.c +++ b/t_1.c @@ -1,5 +1,5 @@ #ifdef SEADER_HOST_TEST -#include "tests/host/t_1_host_env.h" +#include "lib/host_tests/t_1_host_env.h" #else #include "t_1.h" #endif