Skip to content

Commit 876b270

Browse files
Pre-generate files in /library in libtestdriver1 components
We need this because `library/Makefile` and `libtestdriver1_rewrite.pl` don't set things up properly in `tests/libtestdriver1/library`. The visible symptom is that when not all generated files are present, the makefile looks for `../framework/exported.make` which is not present. I have not gone down this rabbit hole to see how much effort it would be to make it work. Signed-off-by: Gilles Peskine <[email protected]>
1 parent 6309a08 commit 876b270

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

scripts/all-helpers.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,17 @@ helper_libtestdriver1_adjust_config() {
103103
# 2. optional: a space-separate list of things to also support.
104104
# Here "things" are PSA_WANT_ symbols but with PSA_WANT_ removed.
105105
helper_libtestdriver1_make_drivers() {
106+
# Ensure that the configuration-independent platform-independent generated
107+
# files are present in the source tree. We specifically need the ones
108+
# involved in building the crypto library, because the libtestdriver1
109+
# rewritten library/Makefile can't build them (it doesn't have all
110+
# paths properly rewritten for that).
111+
if in_mbedtls_repo; then
112+
make -C library generated_files
113+
else
114+
$FRAMEWORK/scripts/make_generated_files.py
115+
fi
116+
106117
loc_accel_flags=$( echo "$1 ${2-}" | sed 's/[^ ]* */-DLIBTESTDRIVER1_MBEDTLS_PSA_ACCEL_&/g' )
107118
make CC=$ASAN_CC -C tests libtestdriver1.a CFLAGS=" $ASAN_CFLAGS $loc_accel_flags" LDFLAGS="$ASAN_CFLAGS"
108119
}

0 commit comments

Comments
 (0)