diff --git a/tests/pkg_heatshrink/Makefile b/tests/pkg_heatshrink/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..a2a5a8985f44674f671c42d7deaad1c578cbf542 --- /dev/null +++ b/tests/pkg_heatshrink/Makefile @@ -0,0 +1,11 @@ +include ../Makefile.tests_common + +BOARD_INSUFFICIENT_MEMORY := arduino-duemilanove \ + arduino-uno \ + nucleo-f031k6 \ + # + +USEPKG += heatshrink +USEMODULE += embunit + +include $(RIOTBASE)/Makefile.include diff --git a/tests/unittests/tests-heatshrink/tests-heatshrink.c b/tests/pkg_heatshrink/main.c similarity index 95% rename from tests/unittests/tests-heatshrink/tests-heatshrink.c rename to tests/pkg_heatshrink/main.c index add0e1770a295b67c28c48ba986cd991add07221..077b47d6b569dcbcdcb8ab5ca71fb631c86690f7 100644 --- a/tests/unittests/tests-heatshrink/tests-heatshrink.c +++ b/tests/pkg_heatshrink/main.c @@ -7,7 +7,7 @@ */ /** - * @ingroup unittests + * @ingroup tests * @{ * @file * @brief Tests for the heatshrink compression library package @@ -106,7 +106,7 @@ static void test_heatshrink(void) TEST_ASSERT_EQUAL_INT(_comp_uncomp((const uint8_t*)_data, strlen(_data)), 0); } -TestRef test_heatshrink_all(void) +TestRef tests_heatshrink(void) { EMB_UNIT_TESTFIXTURES(fixtures) { new_TestFixture(test_heatshrink), @@ -116,7 +116,11 @@ TestRef test_heatshrink_all(void) return (TestRef) & HeatshrinkTest; } -void tests_heatshrink(void) +int main(void) { - TESTS_RUN(test_heatshrink_all()); + TESTS_START(); + TESTS_RUN(tests_heatshrink()); + TESTS_END(); + + return 0; } diff --git a/tests/pkg_heatshrink/tests/01-run.py b/tests/pkg_heatshrink/tests/01-run.py new file mode 100755 index 0000000000000000000000000000000000000000..4e70aa35dd77e6adf8c244cbac67a7acefdaa282 --- /dev/null +++ b/tests/pkg_heatshrink/tests/01-run.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python3 + +# Copyright (C) 2017 Freie Universität Berlin +# +# This file is subject to the terms and conditions of the GNU Lesser +# General Public License v2.1. See the file LICENSE in the top level +# directory for more details. + +import sys +from testrunner import run + + +def testfunc(child): + child.expect('OK \(\d+ tests\)') + + +if __name__ == "__main__": + sys.exit(run(testfunc)) diff --git a/tests/unittests/tests-heatshrink/Makefile b/tests/unittests/tests-heatshrink/Makefile deleted file mode 100644 index 48422e909a47d7cd428d10fa73825060ccc8d8c2..0000000000000000000000000000000000000000 --- a/tests/unittests/tests-heatshrink/Makefile +++ /dev/null @@ -1 +0,0 @@ -include $(RIOTBASE)/Makefile.base diff --git a/tests/unittests/tests-heatshrink/Makefile.include b/tests/unittests/tests-heatshrink/Makefile.include deleted file mode 100644 index 78eebac93ef90318ca13749a8d79d2da4ecd3fdf..0000000000000000000000000000000000000000 --- a/tests/unittests/tests-heatshrink/Makefile.include +++ /dev/null @@ -1 +0,0 @@ -USEPKG += heatshrink