0

If I create a new C11 application in Netbeans (with auto-generated makefile), add a dummy function to its main.c file that just returns 0, add a test to the function, and run the test via Netbeans from the test folder, I get the following error:

make: *** [nbproject/Makefile-impl.mk:73: .test-impl] Broken pipe

However, when I debug the test, it works properly. I get varying results when testing the whole project-- sometimes the output ends with the following message:

CUnit - A unit testing framework for C - Version 2.1-3
     http://cunit.sourceforge.net/

And sometimes I get the same error. Regardless the actual test results don't get output. Although if I close Netbeans and reopen, the first time I try to test the project the results are displayed correctly, although not any of the subsequent tries.

Any idea what this could be?

This is using CUnit 2.1.3-1, make 4.2.1-2, and gdb 7.12.1-2, all in cygwin 2.10.0 running on Windows 10.

Here's lines 71-73 of the makefile it's referring to, if that helps:

.test-impl: .build-tests-impl .test-pre
    @#echo "=> Running $@... Configuration=$(CONF)"
    "${MAKE}" -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .test-conf

Of course I can provide more of that file if needed, although you should get the same one if you reproduce the steps that led me to the error.

Vik78
  • 305
  • 1
  • 2
  • 14
  • Netbeans is NOT a cygwin program so it could mess the cygwin ambient and it is likely the cause of missing output. Have you tried to run the test outside Netbeans ? – matzeri Aug 21 '18 at 19:58
  • Yes, and when I run the same makefile line and then the .exe it seems to work. That's a shame, considering they give instructions on their website for installing Netbeans with Cygwin. Would you recommend a better IDE for C and Cygwin? – Vik78 Aug 25 '18 at 15:39

0 Answers0