Stefan Profanter 6 rokov pred
rodič
commit
660165267e
1 zmenil súbory, kde vykonal 1 pridanie a 27 odobranie
  1. 1 27
      tests/fuzz/oss-fuzz-copy.sh

+ 1 - 27
tests/fuzz/oss-fuzz-copy.sh

@@ -12,33 +12,7 @@ for F in $fuzzerFiles; do
 	fuzzerName=$(basename $F .cc)
 
 	if [ -d "$SRC/open62541/tests/fuzz/${fuzzerName}_corpus" ]; then
-
-		# first combine any files in subfolders to one single binary file
-		subDirs=$(find $SRC/open62541/tests/fuzz/${fuzzerName}_corpus -maxdepth 1 -mindepth 1 -type d)
-		for dirPath in $subDirs; do
-			dir=$(basename $dirPath)
-			dirPathTmp=$SRC/open62541/tests/fuzz/${fuzzerName}_corpus/${dir}_tmp
-			if [ -d  $dirPathTmp ]; then
-				rm -r $dirPathTmp
-			fi
-			mkdir $dirPathTmp
-			# copy the files to get unique names
-			binFiles=$(find $dirPath -name "*.bin")
-			for binFile in $binFiles; do
-				binFileName=$(basename $binFile .bin)
-				cp $binFile $dirPathTmp/${dir}_${binFileName}.bin
-			done
-
-			outPath=$dirPathTmp/$dir.bin
-			cat $dirPath/*.bin > $outPath
-
-			zip -j $OUT/${fuzzerName}_seed_corpus.zip $dirPathTmp/*
-
-			rm -r $dirPathTmp
-
-		done
-
-		# zip -j $OUT/${fuzzerName}_seed_corpus.zip $SRC/open62541/tests/fuzz/${fuzzerName}_corpus/*.bin
+		zip -jr $OUT/${fuzzerName}_seed_corpus.zip $SRC/open62541/tests/fuzz/${fuzzerName}_corpus/
 	fi
 done