This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 236867

Summary: java 7 update 21 breaks CUnit tests
Product: cnd Reporter: soldatov <soldatov>
Component: UnitTest SupportAssignee: igor_nikiforov <igor_nikiforov>
Status: VERIFIED FIXED    
Severity: normal CC: mmirilovic
Priority: P3    
Version: 7.4   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:

Description soldatov 2013-10-08 09:13:50 UTC
see issue 228730 and issue 229794
java 7 update 21, 25 or 40 should be installed
MinGW toolchain should installed

Scenario:
- Create C/C++ Application project with main.c
- Copy&Paste code from tutorial (https://netbeans.org/kb/docs/cnd/c-unit-test.html):
#include <stdio.h>
#include <stdlib.h>

long factorial(int arg) {
    long result = 1;
    int i;
    for (i = 2; i <= arg; ++i) {
        result *= i;
     }
    return result;
}

int main(int argc, char** argv) {
    printf("Type an integer and press Enter to calculate the integer's factorial: \n");
    int arg;
    fflush(stdout);
    scanf("%d", &arg);
    
    printf("factorial(%d) = %ld\n", arg, factorial(arg));

    return (EXIT_SUCCESS);
}

- Call context menu on main.c file in Projects tab and select "Create Test|New CUnit Test ..."
- Select "factorial(int) : long" and press Next
- Press Finish
- Call context menu on "Test Files" logical folder and select Test
===>
"/c/Documents and Settings/tester/My Documents/NetBeansProjects/CppApplication_1/"C:/MinGW/msys/1.0/bin/make.exe"" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
/bin/sh: /c/Documents and Settings/tester/My Documents/NetBeansProjects/CppApplication_1/C:/MinGW/msys/1.0/bin/make.exe: No such file or directory
make.exe": *** [.build-impl] Error 127


WORKAROUND:
- replace "C:\MinGW\msys\1.0\bin\make" on make.exe in Build Tools tab
- close IDE, add MAKE=make.exe system environment, start NetBeans
Comment 1 ilia 2013-10-14 13:04:02 UTC
internal repo
   rev/8567937b011f
Comment 2 Quality Engineering 2013-10-18 01:48:28 UTC
Integrated into 'main-silver', will be available in build *201310180001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/a0745d430285
User: Ilia Gromov <ilia@netbeans.org>
Log: fixed #236867 - java 7 update 21 breaks CUnit tests
(transplanted from 8567937b011f776139b8ce418a3ff437c21ae6d1)
(transplanted from fcb0a532df3e7dd8ea48f8adf8b6605fc14b5e81)
Comment 3 soldatov 2013-10-18 18:00:17 UTC
verified in trunk
Comment 4 soldatov 2013-11-13 07:44:50 UTC
verified in NetBeans 7.4 patch1 build