@@ -25,25 +25,19 @@ deepstate_harness_compile_run <- function(package_path,time.limit.seconds=5,seed
2525 functions.list <- Sys.glob(file.path(test_path ," *" ))
2626 # no harness created
2727 if (length(functions.list )){
28- if (length(testharness ) == length(basename(functions.list )) &&
29- length(intersect(basename(functions.list ),testharness )) == length(testharness )){
30- uncompiled_count = 0
31- log_count = 0
32- for (fun.path in functions.list ){
33- compile.res <- deepstate_fuzz_fun(package_path , basename(fun.path ), time.limit.seconds , seed = seed , verbose = verbose )
34- if (! is.na(compile.res ) && compile.res == basename(fun.path )){
35- compiled.code <- c(compiled.code ,compile.res )
36- }
37- else {
38- uncompiled.code <- c(uncompiled.code ,basename(fun.path ))
39- }
28+ for (fun.path in functions.list ){
29+ compile.res <- deepstate_fuzz_fun(package_path , basename(fun.path ), time.limit.seconds , seed = seed , verbose = verbose )
30+ if (! is.na(compile.res ) && compile.res == basename(fun.path )){
31+ compiled.code <- c(compiled.code ,compile.res )
32+ }else {
33+ uncompiled.code <- c(uncompiled.code ,basename(fun.path ))
4034 }
41- if (length(uncompiled.code ) > 0 )
42- message(sprintf(" Uncompiled functions : %s\n " ,paste(uncompiled.code , collapse = " , " )))
43- return (as.character(compiled.code ))
4435 }
45- }
46- else {
36+ if (length(uncompiled.code ) > 0 )
37+ message(sprintf(" Uncompiled functions : %s\n " ,paste(uncompiled.code , collapse = " , " )))
38+ return (as.character(compiled.code ))
39+
40+ }else {
4741 stop(" TestHarness are not created for all the function that are returned by pkg create" )
4842 }
4943}
0 commit comments