akhikolla / RcppDeepState

RcppDeepState, a simple way to fuzz test code in Rcpp packages
https://akhikolla.github.io./
8 stars 2 forks source link

testpkgs being compiled/printed when I specify to compile a different package? #23

Closed tdhock closed 4 years ago

tdhock commented 4 years ago

Here I specify to compile LOPART but it prints a compilation command for several testpkgs files. why?

> RcppDeepState::deep_harness_compile_run("~/R/LOPART")
[1] "g++ -std=gnu++11 -I${R_HOME}/include -DNDEBUG -I. -I../inst/include/ -I/home/tdhock/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include -I/usr/local/include -fpic  -g -O2  -c /home/tdhock/R/x86_64-pc-linux-gnu-library/4.0/RcppDeepState/testpkgs/testSAN/src/RcppExports.cpp -o /home/tdhock/R/x86_64-pc-linux-gnu-library/4.0/RcppDeepState/testpkgs/testSAN/src/RcppExports.o"
[1] "g++ -std=gnu++11 -I${R_HOME}/include -DNDEBUG -I. -I../inst/include/ -I/home/tdhock/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include -I/usr/local/include -fpic  -g -O2  -c /home/tdhock/R/x86_64-pc-linux-gnu-library/4.0/RcppDeepState/testpkgs/testSAN/src/read_out_of_bound.cpp -o /home/tdhock/R/x86_64-pc-linux-gnu-library/4.0/RcppDeepState/testpkgs/testSAN/src/read_out_of_bound.o"
[1] "g++ -std=gnu++11 -I${R_HOME}/include -DNDEBUG -I. -I../inst/include/ -I/home/tdhock/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include -I/usr/local/include -fpic  -g -O2  -c /home/tdhock/R/x86_64-pc-linux-gnu-library/4.0/RcppDeepState/testpkgs/testSAN/src/use_after_deallocate.cpp -o /home/tdhock/R/x86_64-pc-linux-gnu-library/4.0/RcppDeepState/testpkgs/testSAN/src/use_after_deallocate.o"
[1] "g++ -std=gnu++11 -I${R_HOME}/include -DNDEBUG -I. -I../inst/include/ -I/home/tdhock/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include -I/usr/local/include -fpic  -g -O2  -c /home/tdhock/R/x86_64-pc-linux-gnu-library/4.0/RcppDeepState/testpkgs/testSAN/src/use_after_free.cpp -o /home/tdhock/R/x86_64-pc-linux-gnu-library/4.0/RcppDeepState/testpkgs/testSAN/src/use_after_free.o"
[1] "g++ -std=gnu++11 -I${R_HOME}/include -DNDEBUG -I. -I../inst/include/ -I/home/tdhock/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include -I/usr/local/include -fpic  -g -O2  -c /home/tdhock/R/x86_64-pc-linux-gnu-library/4.0/RcppDeepState/testpkgs/testSAN/src/write_index_outofbound.cpp -o /home/tdhock/R/x86_64-pc-linux-gnu-library/4.0/RcppDeepState/testpkgs/testSAN/src/write_index_outofbound.o"
[1] "g++ -std=gnu++11 -I${R_HOME}/include -DNDEBUG -I. -I../inst/include/ -I/home/tdhock/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include -I/usr/local/include -fpic  -g -O2  -c /home/tdhock/R/x86_64-pc-linux-gnu-library/4.0/RcppDeepState/testpkgs/testSAN/src/zero_sized_array.cpp -o /home/tdhock/R/x86_64-pc-linux-gnu-library/4.0/RcppDeepState/testpkgs/testSAN/src/zero_sized_array.o"
[1] "rm -f *.o && make -f ~/R/LOPART/inst/testfiles/LOPART_interface.Makefile "
clang++ -I/home/tdhock/lib/R/include -I/home/tdhock/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include -I/home/tdhock/R/x86_64-pc-linux-gnu-library/4.0/RInside/include -I/home/tdhock/R/x86_64-pc-linux-gnu-library/4.0/RcppDeepState/include ~/R/LOPART/inst/testfiles/LOPART_interface_DeepState_TestHarness.cpp -o ~/R/LOPART/inst/testfiles/LOPART_interface_DeepState_TestHarness.o -c
tdhock commented 4 years ago

e.g.

[1] "g++ -std=gnu++11 -I${R_HOME}/include -DNDEBUG -I. 
-I../inst/include/ -I/home/tdhock/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include -I/usr/local/include 
-fpic  -g -O2  
-c /home/tdhock/R/x86_64-pc-linux-gnu-library/4.0/RcppDeepState/testpkgs/testSAN/src/read_out_of_bound.cpp 
-o /home/tdhock/R/x86_64-pc-linux-gnu-library/4.0/RcppDeepState/testpkgs/testSAN/src/read_out_of_bound.o"
tdhock commented 4 years ago

add a test: printed output should contain my function name, not testpkgs fun names.

akhikolla commented 4 years ago

Fixed the issue. Now the deep_harness_compile_run() only makes calls respective function names instead of testpkg functions.