Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unittests: Debugging release tests #20539

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sys/embunit/TestRunner.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,20 @@
static Test* root_;
int TestRunnerHadErrors;

static void TestRunner_startTest(TestListner* self,Test* test)

Check warning on line 46 in sys/embunit/TestRunner.c

View workflow job for this annotation

GitHub Actions / static-tests

comma should be followed by whitespace
{
(void)self;
(void)test;
stdimpl_print(".");
stdimpl_print(".\n");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comma should be followed by whitespace 3 line above

i dont care but the static tests do

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From OP:

This PR is not intended to get merged.

}

static void TestRunner_endTest(TestListner* self,Test* test)

Check warning on line 53 in sys/embunit/TestRunner.c

View workflow job for this annotation

GitHub Actions / static-tests

comma should be followed by whitespace
{
(void)self;
(void)test;
}

static void TestRunner_addFailure(TestListner* self,Test* test,char* msg,int line,char* file)

Check warning on line 59 in sys/embunit/TestRunner.c

View workflow job for this annotation

GitHub Actions / static-tests

comma should be followed by whitespace
{
(void)self;
stdimpl_print("\n");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include ../Makefile.drivers_common

HANDLE_URC ?= 1
ECHO_ON ?= 1
SEND_EOL ?= "\\xd"
Expand All @@ -16,4 +18,7 @@ CFLAGS += -DAT_RECV_EOL_1="\"$(RECV_EOL_1)\""
CFLAGS += -DAT_RECV_EOL_2="\"$(RECV_EOL_2)\""
CFLAGS += -DCONFIG_AT_SEND_EOL="\"$(SEND_EOL)\""

USEMODULE += embunit
USEMODULE += at

include $(RIOTBASE)/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
#include "at.h"
#include "isrpipe/read_timeout.h"

#include "tests-at.h"

#define UNIT_TEST_LONG_URC "+UNITTEST_LONG_URC_VEEERY_LONG"
#define UNIT_TEST_SHORT_URC "+U"
#define LONG_COMMAND "AT+COMMAND_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"\
Expand Down Expand Up @@ -59,7 +57,7 @@ static void set_up(void)
.rp_buf_size = sizeof(rp_buf),
.rx_buf = buf,
.rx_buf_size = sizeof(buf),
.uart = UART_DEV(0),
.uart = UART_DEV(1),
};
int res = at_dev_init(&at_dev, &at_init_params);
/* check the UART initialization return value and respond as needed */
Expand Down Expand Up @@ -670,7 +668,7 @@ void test_process_urc(void)
}
#endif /* MODULE_AT_URC */

void tests_at(void)
static Test *tests_at(void)
{
EMB_UNIT_TESTFIXTURES(fixtures) {
new_TestFixture(test_readline_or_echo),
Expand All @@ -688,5 +686,17 @@ void tests_at(void)

EMB_UNIT_TESTCALLER(at_tests, set_up, tear_down, fixtures);

TESTS_RUN((Test *)&at_tests);
return (Test *)&at_tests;
}

int main(void)
{

puts("AT unit-like test\n");

TESTS_START();
TESTS_RUN(tests_at());
TESTS_END();

return 0;
}
2 changes: 2 additions & 0 deletions tests/unittests/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
DEVELHELP ?= 0
include ../Makefile.tests_common

OUTPUT := TEXT

USEMODULE += embunit

ifeq (, $(UNIT_TESTS))
Expand Down
1 change: 0 additions & 1 deletion tests/unittests/tests-at/Makefile

This file was deleted.

36 changes: 0 additions & 36 deletions tests/unittests/tests-at/tests-at.h

This file was deleted.

2 changes: 1 addition & 1 deletion tests/unittests/tests/01-run.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from testrunner import run_check_unittests


TIMEOUT = 120
TIMEOUT = 240


if __name__ == "__main__":
Expand Down
Loading