Issue 87 execute tests with GitHub ci (#234)

* Enable lcov coverage in unit testing via cmake.

* fix pipeline build error

* add compile options for unit test to silence some warnings

* remove all BAC_TEST unit tests in src/bacnet/ folder. They are now in test/bacnet/ folders using ztest.

* removed key.c - only used for unit test.

* produce XML test result output for parsing

* produce junit XML test result output

* change lint workflow to quality

* update readme badge for quality results

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
Steve Karg
2022-02-28 20:09:46 -06:00
committed by GitHub
parent 585cdb4a7d
commit c3a4c229fe
182 changed files with 231 additions and 16779 deletions
+1 -56
View File
@@ -414,59 +414,4 @@ bool tsm_invoke_id_failed(uint8_t invokeID)
return status;
}
#ifdef BAC_TEST
#include <assert.h>
#include <string.h>
#include "ctest.h"
/* flag to send an I-Am */
bool I_Am_Request = true;
/* dummy function stubs */
int datalink_send_pdu(BACNET_ADDRESS *dest,
BACNET_NPDU_DATA *npdu_data,
uint8_t *pdu,
unsigned pdu_len)
{
(void)dest;
(void)npdu_data;
(void)pdu;
(void)pdu_len;
return 0;
}
/* dummy function stubs */
void datalink_get_broadcast_address(BACNET_ADDRESS *dest)
{
(void)dest;
}
void testTSM(Test *pTest)
{
/* FIXME: add some unit testing... */
return;
}
#ifdef TEST_TSM
int main(void)
{
Test *pTest;
bool rc;
pTest = ct_create("BACnet TSM", NULL);
/* individual tests */
rc = ct_addTestFunction(pTest, testTSM);
assert(rc);
ct_setStream(pTest, stdout);
ct_run(pTest);
(void)ct_report(pTest);
ct_destroy(pTest);
return 0;
}
#endif /* TEST_TSM */
#endif /* BAC_TEST */
#endif /* MAX_TSM_TRANSACTIONS */
#endif