Platformio unit test runs the same test case twice
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- embedded-iot, testing-qa
Research direction
Start with platformio.ini and test_sample.cpp, then reproduce the mbed unit-test run for the lpc1768 environment using the supplied test_port and test_speed. Trace why test_numbers appears twice and determine whether the duplicate execution comes from the test setup or the platform. Done means the sample test runs once with a consistent result.
Written by the indexing model from the issue text.
Description
Trying to run a sample test case for mbed framework. Got everything working but running into an issue where the same test case runs twice and one fails and one passes.
https://community.platformio.org/t/platformio-unit-test-runs-the-same-test-case-twice/36404/3
platformio.ini
[env:lpc1768]
platform = nxplpc
board = lpc1768
framework = mbed
test_speed = 9600
test_port = /dev/cu.usbmodem142302
test_sample.cpp
#include <mbed.h>
#include <unity.h>
#define WAIT_TIME_MS 2000
void test_numbers(void)
{
TEST_ASSERT_EQUAL(13,13);
}
void setUp(void) {
// set stuff up here
}
void tearDown(void) {
// clean stuff up here
}
int main()
{
thread_sleep_for(WAIT_TIME_MS);
UNITY_BEGIN(); // IMPORTANT LINE!
RUN_TEST(test_numbers);
UNITY_END();
}
Folder structure
- Dominant language
- Python
- Stars
- 9
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from platformio/platform-nxplpc
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
platformio/platform-nxplpc#33 · 9 comments · 2 reactions ·
-
LPC55S69-EVKOpen
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
board feature platform
Difficulty 4/5 3-5 days Newbie friendliness 25/100
platformio/platform-nxplpc#29 · 4 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
platformio/platform-nxplpc#28 · 3 comments ·
All issues in platformio/platform-nxplpc
Similar issues
-
docs(contributing): the two things that silently block a PRPossibly taken A pull request linked to this issue is open or already merged. Openavailable documentation good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 95/100
Nixitov/Riptide-Native#944 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
JTHCode/secretguard#24 ·
Maintainers usually reply within 1 day
-
area: middleware documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
omarelshamy25x/shamy-hijri#63 ·
Maintainers usually reply within 1 day