From d9701ae21edc66e8f86b24192cf22d450a68e66c Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Thu, 9 Apr 2020 18:33:34 +0200 Subject: [PATCH] Create a seedfile explicitly Running the entropy unit test creates a suitable seedfile, but this only works due to the happy accident that no prior unit test needs one (specifically, test_suite_entropy runs before test_suite_rsa). So create one explicitly, both for robustness and to keep the script closer to the version in development where the explicit seedfile creation is required. Signed-off-by: Gilles Peskine --- tests/scripts/basic-build-test.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/scripts/basic-build-test.sh b/tests/scripts/basic-build-test.sh index 1862786a2..1a1a7b9b9 100755 --- a/tests/scripts/basic-build-test.sh +++ b/tests/scripts/basic-build-test.sh @@ -75,6 +75,10 @@ make -j TEST_OUTPUT=out_${PPID} cd tests +if [ ! -f "seedfile" ]; then + dd if=/dev/urandom of="seedfile" bs=64 count=1 +fi + # Step 2a - Unit Tests (keep going even if some tests fail) perl scripts/run-test-suites.pl -v 2 |tee unit-test-$TEST_OUTPUT echo