mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Add "cimple_test" to the bazel build.
This commit is contained in:
parent
0f7138c010
commit
e618829112
|
@ -14,4 +14,4 @@ cirrus-ci_task:
|
|||
- mv c-toxcore cirrus-ci-build
|
||||
- cd -
|
||||
test_all_script:
|
||||
- bazel test --remote_http_cache=http://$CIRRUS_HTTP_CACHE_HOST --copt=-DUSE_IPV6=0 -c opt -k //c-toxcore/...
|
||||
- bazel test --copt=-DUSE_IPV6=0 -c opt -k //c-toxcore/...
|
||||
|
|
|
@ -122,3 +122,23 @@ cc_library(
|
|||
":video",
|
||||
],
|
||||
)
|
||||
|
||||
CIMPLE_SRCS = glob(
|
||||
[
|
||||
"*.c",
|
||||
"*.h",
|
||||
],
|
||||
exclude = [
|
||||
"*.api.h",
|
||||
"toxav.h",
|
||||
],
|
||||
)
|
||||
|
||||
sh_test(
|
||||
name = "cimple_test",
|
||||
size = "small",
|
||||
srcs = ["//hs-tokstyle/tools:check-cimple"],
|
||||
args = ["$(location %s)" % f for f in CIMPLE_SRCS],
|
||||
data = CIMPLE_SRCS,
|
||||
tags = ["manual"],
|
||||
)
|
||||
|
|
|
@ -85,8 +85,9 @@ RingBuffer *rb_new(int size)
|
|||
}
|
||||
|
||||
buf->size = size + 1; /* include empty elem */
|
||||
buf->data = (void **)calloc(buf->size, sizeof(void *));
|
||||
|
||||
if (!(buf->data = (void **)calloc(buf->size, sizeof(void *)))) {
|
||||
if (!buf->data) {
|
||||
free(buf);
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -118,7 +119,7 @@ uint16_t rb_data(const RingBuffer *b, void **dest)
|
|||
{
|
||||
uint16_t i = 0;
|
||||
|
||||
for (; i < rb_size(b); i++) {
|
||||
for (; i < rb_size(b); ++i) {
|
||||
dest[i] = b->data[(b->start + i) % b->size];
|
||||
}
|
||||
|
||||
|
|
|
@ -279,3 +279,27 @@ cc_library(
|
|||
"//c-toxcore/toxencryptsave:defines",
|
||||
],
|
||||
)
|
||||
|
||||
CIMPLE_SRCS = glob(
|
||||
[
|
||||
"*.c",
|
||||
"*.h",
|
||||
],
|
||||
exclude = [
|
||||
"*.api.h",
|
||||
"ccompat.h",
|
||||
"crypto_core_mem.c",
|
||||
"ping_array.h",
|
||||
"tox.h",
|
||||
"tox_api.c",
|
||||
],
|
||||
)
|
||||
|
||||
sh_test(
|
||||
name = "cimple_test",
|
||||
size = "small",
|
||||
srcs = ["//hs-tokstyle/tools:check-cimple"],
|
||||
args = ["$(location %s)" % f for f in CIMPLE_SRCS],
|
||||
data = CIMPLE_SRCS,
|
||||
tags = ["manual"],
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user