File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ git config --global --add safe.directory '*'
5454cmake " ${cmake_args[@]} " -S . -B build -G Ninja
5555cmake --build build --parallel
5656
57- cp corpus/* .dict corpus/* .options $OUT /
57+ cp corpus/corpus/ * .dict corpus/ corpus/* .options $OUT /
5858
5959# Copy the fuzzer executables, zip-ed corpora, option and
6060# dictionary files to $OUT.
@@ -70,7 +70,7 @@ for f in $(find build/tests/ -name '*_test' -type f);
7070do
7171 name=$( basename $f ) ;
7272 module=$( echo $name | sed ' s/_test//' )
73- corpus_dir=" corpus/$module "
73+ corpus_dir=" corpus/corpus/ $module "
7474 echo " Copying for $module " ;
7575 cp $f $OUT /
7676 if [ -e " $corpus_dir " ]; then
Original file line number Diff line number Diff line change @@ -66,6 +66,11 @@ string(JOIN " " LIBFUZZER_OPTS
6666 -use_value_profile=1
6767)
6868
69+ set (CORPUS_BASE_PATH ${PROJECT_SOURCE_DIR} /corpus)
70+ if (USE_LUAJIT)
71+ set (CORPUS_BASE_PATH ${CORPUS_BASE_PATH} /corpus)
72+ endif ()
73+
6974function (create_test)
7075 cmake_parse_arguments (
7176 FUZZ
@@ -89,8 +94,8 @@ function(create_test)
8994 if (IS_LUAJIT AND (${test_name} STREQUAL "lua_load_test" ))
9095 set (LIBFUZZER_OPTS "${LIBFUZZER_OPTS} -only_ascii=1" )
9196 endif ()
92- set (dict_path ${PROJECT_SOURCE_DIR} /corpus /${test_name} .dict)
93- set (corpus_path ${PROJECT_SOURCE_DIR} /corpus /${test_prefix} )
97+ set (dict_path ${CORPUS_BASE_PATH} /${test_name} .dict)
98+ set (corpus_path ${CORPUS_BASE_PATH} /${test_prefix} )
9499 if (EXISTS ${dict_path} )
95100 set (LIBFUZZER_OPTS "${LIBFUZZER_OPTS} -dict=${dict_path} " )
96101 endif ()
You can’t perform that action at this time.
0 commit comments