From 92bda519961d3a468f0177310f1da5375049c875 Mon Sep 17 00:00:00 2001 From: nick black Date: Wed, 5 Jan 2022 22:26:30 -0500 Subject: [PATCH] [cmake] -v on failing notcurses-input runs --- .drone.yml | 19 ++++++++----------- CMakeLists.txt | 4 ++-- src/lib/in.c | 5 ----- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/.drone.yml b/.drone.yml index 73ae35ebd..62d09d32a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -13,17 +13,14 @@ steps: - cd build - cmake .. -DCMAKE_BUILD_TYPE=Release -DUSE_STATIC=off -DUSE_GPM=on -DUSE_QRCODEGEN=on -DDFSG_BUILD=on - make -j2 - - ./notcurses-input < /dev/null - - env NOTCURSES_LOGLEVEL=7 ./notcurses-input < notcurses-input - - ./notcurses-input < notcurses-input - #- ./notcurses-info - #- ctest --output-on-failure - #- make install - #- ldconfig - #- cd ../cffi - #- 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 + - ./notcurses-info + - ctest --output-on-failure + - make install + - ldconfig + - cd ../cffi + - 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 type: docker diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b3ed9510..5e1ddd52b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -874,12 +874,12 @@ add_test( # provide an empty source add_test( NAME input-devnull - COMMAND sh -c "./notcurses-input < /dev/null" + COMMAND sh -c "./notcurses-input -v < /dev/null" ) # provide a binary file add_test( NAME input-binary - COMMAND sh -c "./notcurses-input < notcurses-input" + COMMAND sh -c "./notcurses-input -v < notcurses-input" ) # provide an ASCII file add_test( diff --git a/src/lib/in.c b/src/lib/in.c index 2385538dd..41481e50e 100644 --- a/src/lib/in.c +++ b/src/lib/in.c @@ -2381,9 +2381,7 @@ internal_get(inputctx* ictx, const struct timespec* ts, ncinput* ni){ return (uint32_t)-1; } pthread_mutex_lock(&ictx->ilock); -fprintf(stderr, "IVALID: %u EOF: %u IREAD: %u\n", ictx->ivalid, ictx->stdineof, ictx->iread); while(!ictx->ivalid){ -fprintf(stderr, "WHILE IVALID: %u EOF: %u IREAD: %u\n", ictx->ivalid, ictx->stdineof, ictx->iread); if(ictx->stdineof){ pthread_mutex_unlock(&ictx->ilock); 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; } if(ts == NULL){ -fprintf(stderr, "WAITING\n"); pthread_cond_wait(&ictx->icond, &ictx->ilock); -fprintf(stderr, "DONE WAITING\n"); }else{ int r = pthread_cond_timedwait(&ictx->icond, &ictx->ilock, ts); if(r == ETIMEDOUT){ @@ -2416,7 +2412,6 @@ fprintf(stderr, "DONE WAITING\n"); } } id = ictx->inputs[ictx->iread].id; -fprintf(stderr, "GOT ID 0x%08x IREAD: %u\n", id, ictx->iread); if(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){