mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 17:41:54 +00:00
Makefile: Add gentestcases target
This calls gen_test_cases.sh in the proper environment. Also, prevent gen_test_cases.sh from overriding test_file, to provide stable signature (and avoid large git diff for no reason). BRANCH=none BUG=chromium:684354 TEST=make gentestcases -j8; git diff => no changes Change-Id: I556285fd1a07a4d84f4ebd3fd7881ae06743716e Reviewed-on: https://chromium-review.googlesource.com/439064 Commit-Ready: Nicolas Boichat <drinkcat@chromium.org> Tested-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
791267a561
commit
d02ae3899c
5
Makefile
5
Makefile
@@ -1379,6 +1379,11 @@ runtests: test_setup test_targets
|
||||
genkeys: utils test_setup
|
||||
tests/gen_test_keys.sh
|
||||
|
||||
# Generate test cases
|
||||
.PHONY: gentestcases
|
||||
gentestcases: utils test_setup
|
||||
tests/gen_test_cases.sh
|
||||
|
||||
# Generate test cases for fuzzing
|
||||
.PHONY: genfuzztestcases
|
||||
genfuzztestcases: utils test_setup
|
||||
|
||||
@@ -35,6 +35,10 @@ function generate_test_signatures {
|
||||
# Generate a file with random bytes for signature tests.
|
||||
function generate_test_file {
|
||||
echo "Generating test file..."
|
||||
if [ -f "${TEST_FILE}" ]; then
|
||||
echo "(skipping, file already exists)"
|
||||
return
|
||||
fi
|
||||
dd if=/dev/urandom of=${TEST_FILE} bs=${TEST_FILE_SIZE} count=1
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user