Skip to content

Commit e2efd7c

Browse files
authored
tarantool: fix corpus name (#14922)
Follows up tarantool/tarantool#11250 Follows up #14656
1 parent 3a7e60a commit e2efd7c

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

projects/tarantool/build.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -153,14 +153,17 @@ LUZER_TEST_DIR="build/luzer_tests"
153153
# Copying luzer-based tests to a $LUZER_TEST_DIR.
154154
cmake --build build --parallel --verbose --target copy_tests
155155
# Generating test wrappers for luzer-based tests.
156-
for test_file in $(find $LUZER_TEST_DIR -name "*.lua" -type f);
156+
for test_path in $(find $LUZER_TEST_DIR -name "*.lua" -type f);
157157
do
158-
test_name=$(basename $test_file);
159-
"$SRC/compile_lua_fuzzer" "$LUA_RUNTIME_NAME" $test_name
160-
cp "$test_file" "$OUT/"
161-
corpus_dir="test/static/corpus/$test_name"
158+
test_file=$(basename $test_path);
159+
test_name_we="${test_file%.*}";
160+
module_name=$(echo $test_name_we | sed 's/_test//' )
161+
"$SRC/compile_lua_fuzzer" "$LUA_RUNTIME_NAME" $test_file
162+
cp "$test_path" "$OUT/"
163+
corpus_dir="test/static/corpus/$module_name"
162164
if [ -e "$corpus_dir" ]; then
163-
zip --quiet -j $OUT/"$test_name"_seed_corpus.zip $corpus_dir/*
165+
zip -j $OUT/"$test_name_we"_seed_corpus.zip $corpus_dir/*
166+
echo "Build corpus '$OUT/"$test_name_we"_seed_corpus.zip' for the test '$test_name_we'"
164167
fi
165168
done
166169

0 commit comments

Comments
 (0)