mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
[cmake] -v on failing notcurses-input runs
This commit is contained in:
parent
483985e9aa
commit
92bda51996
19
.drone.yml
19
.drone.yml
@ -13,17 +13,14 @@ steps:
|
|||||||
- cd build
|
- cd build
|
||||||
- cmake .. -DCMAKE_BUILD_TYPE=Release -DUSE_STATIC=off -DUSE_GPM=on -DUSE_QRCODEGEN=on -DDFSG_BUILD=on
|
- cmake .. -DCMAKE_BUILD_TYPE=Release -DUSE_STATIC=off -DUSE_GPM=on -DUSE_QRCODEGEN=on -DDFSG_BUILD=on
|
||||||
- make -j2
|
- make -j2
|
||||||
- ./notcurses-input < /dev/null
|
- ./notcurses-info
|
||||||
- env NOTCURSES_LOGLEVEL=7 ./notcurses-input < notcurses-input
|
- ctest --output-on-failure
|
||||||
- ./notcurses-input < notcurses-input
|
- make install
|
||||||
#- ./notcurses-info
|
- ldconfig
|
||||||
#- ctest --output-on-failure
|
- cd ../cffi
|
||||||
#- make install
|
- LDFLAGS=-L/usr/local/lib CFLAGS=-I/usr/local/include python3 setup.py sdist build install
|
||||||
#- ldconfig
|
- env LD_LIBRARY_PATH=/usr/local/lib ./notcurses-pydemo > /dev/null
|
||||||
#- cd ../cffi
|
- env LD_LIBRARY_PATH=/usr/local/lib ./ncdirect-pydemo > /dev/null
|
||||||
#- LDFLAGS=-L/usr/local/lib CFLAGS=-I/usr/local/include python3 setup.py sdist build install
|
|
||||||
#- env LD_LIBRARY_PATH=/usr/local/lib ./notcurses-pydemo > /dev/null
|
|
||||||
#- env LD_LIBRARY_PATH=/usr/local/lib ./ncdirect-pydemo > /dev/null
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
|
@ -874,12 +874,12 @@ add_test(
|
|||||||
# provide an empty source
|
# provide an empty source
|
||||||
add_test(
|
add_test(
|
||||||
NAME input-devnull
|
NAME input-devnull
|
||||||
COMMAND sh -c "./notcurses-input < /dev/null"
|
COMMAND sh -c "./notcurses-input -v < /dev/null"
|
||||||
)
|
)
|
||||||
# provide a binary file
|
# provide a binary file
|
||||||
add_test(
|
add_test(
|
||||||
NAME input-binary
|
NAME input-binary
|
||||||
COMMAND sh -c "./notcurses-input < notcurses-input"
|
COMMAND sh -c "./notcurses-input -v < notcurses-input"
|
||||||
)
|
)
|
||||||
# provide an ASCII file
|
# provide an ASCII file
|
||||||
add_test(
|
add_test(
|
||||||
|
@ -2381,9 +2381,7 @@ internal_get(inputctx* ictx, const struct timespec* ts, ncinput* ni){
|
|||||||
return (uint32_t)-1;
|
return (uint32_t)-1;
|
||||||
}
|
}
|
||||||
pthread_mutex_lock(&ictx->ilock);
|
pthread_mutex_lock(&ictx->ilock);
|
||||||
fprintf(stderr, "IVALID: %u EOF: %u IREAD: %u\n", ictx->ivalid, ictx->stdineof, ictx->iread);
|
|
||||||
while(!ictx->ivalid){
|
while(!ictx->ivalid){
|
||||||
fprintf(stderr, "WHILE IVALID: %u EOF: %u IREAD: %u\n", ictx->ivalid, ictx->stdineof, ictx->iread);
|
|
||||||
if(ictx->stdineof){
|
if(ictx->stdineof){
|
||||||
pthread_mutex_unlock(&ictx->ilock);
|
pthread_mutex_unlock(&ictx->ilock);
|
||||||
logwarn("read eof on stdin");
|
logwarn("read eof on stdin");
|
||||||
@ -2394,9 +2392,7 @@ fprintf(stderr, "WHILE IVALID: %u EOF: %u IREAD: %u\n", ictx->ivalid, ictx->stdi
|
|||||||
return NCKEY_EOF;
|
return NCKEY_EOF;
|
||||||
}
|
}
|
||||||
if(ts == NULL){
|
if(ts == NULL){
|
||||||
fprintf(stderr, "WAITING\n");
|
|
||||||
pthread_cond_wait(&ictx->icond, &ictx->ilock);
|
pthread_cond_wait(&ictx->icond, &ictx->ilock);
|
||||||
fprintf(stderr, "DONE WAITING\n");
|
|
||||||
}else{
|
}else{
|
||||||
int r = pthread_cond_timedwait(&ictx->icond, &ictx->ilock, ts);
|
int r = pthread_cond_timedwait(&ictx->icond, &ictx->ilock, ts);
|
||||||
if(r == ETIMEDOUT){
|
if(r == ETIMEDOUT){
|
||||||
@ -2416,7 +2412,6 @@ fprintf(stderr, "DONE WAITING\n");
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
id = ictx->inputs[ictx->iread].id;
|
id = ictx->inputs[ictx->iread].id;
|
||||||
fprintf(stderr, "GOT ID 0x%08x IREAD: %u\n", id, ictx->iread);
|
|
||||||
if(ni){
|
if(ni){
|
||||||
memcpy(ni, &ictx->inputs[ictx->iread], sizeof(*ni));
|
memcpy(ni, &ictx->inputs[ictx->iread], sizeof(*ni));
|
||||||
if(notcurses_ucs32_to_utf8(&ni->id, 1, (unsigned char*)ni->utf8, sizeof(ni->utf8)) < 0){
|
if(notcurses_ucs32_to_utf8(&ni->id, 1, (unsigned char*)ni->utf8, sizeof(ni->utf8)) < 0){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user