Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error building Unit Tests (UT) #110

Open
sudha-zetta opened this issue Mar 15, 2022 · 0 comments
Open

Error building Unit Tests (UT) #110

sudha-zetta opened this issue Mar 15, 2022 · 0 comments

Comments

@sudha-zetta
Copy link

I am trying to build the UnitTest (UT) directory in libest 3.2.0 and it looks like same files are missing.

$ make
gcc -I../../src/est -I../.. -I../util -I/usr/local/ssl/include -I/usr/local/curl/include -I/usr/local/include -I/include -I/include -Wall -g -DHAVE_CUNIT -DNO_SSL_DL -c runtest.c -o runtest.o
runtest.c:16:25: fatal error: CUnit/Basic.h: No such file or directory
#include "CUnit/Basic.h"
^
compilation terminated.
make: *** [runtest.o] Error 1

I looked into the Makefile and removed (-DHAVE_CUNIT) under CCFLAGS, but I get error ( not just warnings).

CCFLAGS = -Wall -g -DNO_SSL_DL $(CURL_CC_DEFINE) $(CFLAGS)

$ make
gcc -I../../src/est -I../.. -I../util -I/usr/local/ssl/include -I/usr/local/curl/include -I/usr/local/include -I/include -I/include -Wall -g -DNO_SSL_DL -c runtest.c -o runtest.o
runtest.c:96:1: error: unknown type name \u2018CU_pSuite\u2019
extern CU_pSuite coap_sanity_psuite;
^
runtest.c: In function \u2018main\u2019:
runtest.c:146:5: error: unknown type name \u2018CU_pFailureRecord\u2019
CU_pFailureRecord fr;
^
runtest.c:148:9: warning: unused variable \u2018fail_cnt\u2019 [-Wunused-variable]
int fail_cnt;
^
runtest.c:147:9: warning: unused variable \u2018run_cnt\u2019 [-Wunused-variable]
int run_cnt;
^
runtest.c:146:23: warning: unused variable \u2018fr\u2019 [-Wunused-variable]
CU_pFailureRecord fr;
^
runtest.c:145:9: warning: variable \u2018coap_sanity\u2019 set but not used [-Wunused-but-set-variable]
int coap_sanity = 0;
^
runtest.c:144:9: warning: variable \u2018con\u2019 set but not used [-Wunused-but-set-variable]
int con = 0;
^
runtest.c:143:9: warning: variable \u2018xml\u2019 set but not used [-Wunused-but-set-variable]
int xml = 0;
^
runtest.c:676:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
make: *** [runtest.o] Error 1

Any suggestions on how to fix this to run some tests? I am using CentOS 7.6

Thanks,
Sudha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant