Updated mbec-client-c version & unit tests

pull/3240/head
Antti Kauppila 2016-02-06 11:51:31 +02:00
parent fbdfa62dbe
commit c00a0f8956
4 changed files with 6 additions and 41 deletions

2
.gitignore vendored
View File

@ -7,4 +7,4 @@ coverage
build/
yotta_modules/
yotta_targets/
upload.tar.gz

View File

@ -19,7 +19,7 @@
],
"dependencies": {
"nanostack-libservice": "^3.0.0",
"mbed-client-c": "^1.1.0",
"mbed-client-c": "^2.0.0",
"sal-stack-nanostack": "^3.0.0",
"mbedtls": "^2.0.0"
},

View File

@ -1,34 +0,0 @@
#!/bin/bash
echo
echo Build Coap-service unit tests
echo
# Remember to add new test folder to Makefile
make clean
make all
echo
echo Create results
echo
mkdir results
find ./ -name '*.xml' | xargs cp -t ./results/
echo
echo Create coverage document
echo
mkdir coverages
cd coverages
lcov -q -d ../. -c -o app.info
lcov -q -r app.info "/test*" -o app.info
lcov -q -r app.info "/usr*" -o app.info
lcov -q -r app.info "/libService*" -o app.info
genhtml -q --no-branch-coverage app.info
cd ..
echo
echo
echo
echo Have a nice bug hunt!
echo
echo
echo

View File

@ -46,23 +46,22 @@ struct coap_s *sn_coap_protocol_init(void *(*used_malloc_func_ptr)(uint16_t), vo
return sn_coap_protocol_stub.expectedCoap;
}
//Yotta is not yet updated to use mbed-client-c 2.x version(git is), so do not modify these 4 yet to contain handle
int8_t sn_coap_protocol_set_block_size(uint16_t block_size)
int8_t sn_coap_protocol_set_block_size(struct coap_s *handle, uint16_t block_size)
{
return sn_coap_protocol_stub.expectedInt8;
}
int8_t sn_coap_protocol_set_duplicate_buffer_size(uint8_t size)
int8_t sn_coap_protocol_set_duplicate_buffer_size(struct coap_s *handle, uint8_t size)
{
return sn_coap_protocol_stub.expectedInt8;
}
int8_t sn_coap_protocol_set_retransmission_parameters(uint8_t resending_count, uint8_t resending_intervall)
int8_t sn_coap_protocol_set_retransmission_parameters(struct coap_s *handle, uint8_t resending_count, uint8_t resending_intervall)
{
return sn_coap_protocol_stub.expectedInt8;
}
int8_t sn_coap_protocol_set_retransmission_buffer(uint8_t buffer_size_messages, uint16_t buffer_size_bytes)
int8_t sn_coap_protocol_set_retransmission_buffer(struct coap_s *handle, uint8_t buffer_size_messages, uint16_t buffer_size_bytes)
{
return sn_coap_protocol_stub.expectedInt8;
}