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

Move src/system/tests to auto-test-driver generation #4000

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
12 changes: 1 addition & 11 deletions src/system/tests/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ import("${chip_root}/build/chip/chip_test_suite.gni")
chip_test_suite("tests") {
output_name = "libSystemLayerTests"

sources = [
test_sources = [
"TestSystemErrorStr.cpp",
"TestSystemLayer.h",
"TestSystemObject.cpp",
"TestSystemPacketBuffer.cpp",
"TestSystemTimer.cpp",
Expand All @@ -37,13 +36,4 @@ chip_test_suite("tests") {
"${chip_root}/src/system",
"${nlunit_test_root}:nlunit-test",
]

tests = [
"TestSystemErrorStr",
"TestSystemObject",
"TestSystemPacketBuffer",
"TestSystemTimer",
"TestSystemWakeEvent",
"TestTimeSource",
]
}
2 changes: 0 additions & 2 deletions src/system/tests/TestSystemErrorStr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
#define __STDC_LIMIT_MACROS
#endif

#include "TestSystemLayer.h"

#include <inttypes.h>
#include <stdint.h>
#include <string.h>
Expand Down
36 changes: 0 additions & 36 deletions src/system/tests/TestSystemErrorStrDriver.cpp

This file was deleted.

40 changes: 0 additions & 40 deletions src/system/tests/TestSystemLayer.h

This file was deleted.

5 changes: 3 additions & 2 deletions src/system/tests/TestSystemObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
#define __STDC_LIMIT_MACROS
#endif

#include "TestSystemLayer.h"

// Install a sleep in the high water mark function, to force
// collisions between the threads that call it.

Expand Down Expand Up @@ -528,6 +526,9 @@ static int Finalize(void * aContext)

int TestSystemObject(void)
{
// Initialize standard pseudo-random number generator
srand(0);

// Run test suit againt one lContext.
nlTestRunner(&sTestSuite, &chip::System::sContext);

Expand Down
41 changes: 0 additions & 41 deletions src/system/tests/TestSystemObjectDriver.cpp

This file was deleted.

6 changes: 4 additions & 2 deletions src/system/tests/TestSystemPacketBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
#define __STDC_LIMIT_MACROS
#endif

#include "TestSystemLayer.h"

#include <errno.h>
#include <stdint.h>
#include <stdlib.h>
Expand Down Expand Up @@ -1208,6 +1206,10 @@ int TestTeardown(void * inContext)

int TestSystemPacketBuffer(void)
{
#if CHIP_SYSTEM_CONFIG_USE_LWIP
tcpip_init(NULL, NULL);
#endif // CHIP_SYSTEM_CONFIG_USE_LWIP

// clang-format off
nlTestSuite theSuite =
{
Expand Down
46 changes: 0 additions & 46 deletions src/system/tests/TestSystemPacketBufferDriver.cpp

This file was deleted.

5 changes: 1 addition & 4 deletions src/system/tests/TestSystemTimer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,8 @@
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif
// config
#include <system/SystemConfig.h>

// module header
#include "TestSystemLayer.h"
#include <system/SystemConfig.h>

#include <nlunit-test.h>
#include <support/CodeUtils.h>
Expand Down
36 changes: 0 additions & 36 deletions src/system/tests/TestSystemTimerDriver.cpp

This file was deleted.

5 changes: 1 addition & 4 deletions src/system/tests/TestSystemWakeEvent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,8 @@
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif
// config
#include <system/SystemConfig.h>

// module header
#include "TestSystemLayer.h"
#include <system/SystemConfig.h>

#include <nlunit-test.h>
#include <support/CodeUtils.h>
Expand Down
36 changes: 0 additions & 36 deletions src/system/tests/TestSystemWakeEventDriver.cpp

This file was deleted.

5 changes: 1 addition & 4 deletions src/system/tests/TestTimeSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,8 @@
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif
// config
#include <system/SystemConfig.h>

// module header
#include "TestSystemLayer.h"
#include <system/SystemConfig.h>

#include <nlunit-test.h>
#include <support/CodeUtils.h>
Expand Down
36 changes: 0 additions & 36 deletions src/system/tests/TestTimeSourceDriver.cpp

This file was deleted.