Skip to content

Commit

Permalink
Merge pull request #8543 from gilles-peskine-arm/metatest-create-2.28
Browse files Browse the repository at this point in the history
Backport 2.28: Create a metatest program
  • Loading branch information
daverodgman authored Nov 20, 2023
2 parents e44be6a + e00255c commit 04a8d02
Show file tree
Hide file tree
Showing 14 changed files with 666 additions and 21 deletions.
2 changes: 2 additions & 0 deletions programs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ pkey/rsa_verify_pss
psa/crypto_examples
psa/key_ladder_demo
psa/psa_constant_names
psa/psa_hash
random/gen_entropy
random/gen_random_ctr_drbg
random/gen_random_havege
Expand All @@ -53,6 +54,7 @@ test/cpp_dummy_build
test/cpp_dummy_build.cpp
test/dlopen
test/ecp-bench
test/metatest
test/query_compile_time_config
test/selftest
test/ssl_cert_test
Expand Down
5 changes: 5 additions & 0 deletions programs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ APPS = \
ssl/ssl_server$(EXEXT) \
ssl/ssl_server2$(EXEXT) \
test/benchmark$(EXEXT) \
test/metatest$(EXEXT) \
test/query_compile_time_config$(EXEXT) \
test/selftest$(EXEXT) \
test/udp_proxy$(EXEXT) \
Expand Down Expand Up @@ -349,6 +350,10 @@ test/dlopen$(EXEXT): test/dlopen.c $(DEP)
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) test/dlopen.c $(LDFLAGS) $(DLOPEN_LDFLAGS) -o $@
endif

test/metatest$(EXEXT): test/metatest.c $(DEP)
echo " CC test/metatest.c"
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) -I ../library test/metatest.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@

test/query_config.o: test/query_config.c test/query_config.h $(DEP)
echo " CC test/query_config.c"
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) -c test/query_config.c -o $@
Expand Down
3 changes: 3 additions & 0 deletions programs/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ if(ENABLE_ZLIB_SUPPORT)
endif(ENABLE_ZLIB_SUPPORT)

set(executables_libs
metatest
selftest
udp_proxy
)
Expand Down Expand Up @@ -50,6 +51,8 @@ foreach(exe IN LISTS executables_libs executables_mbedcrypto)
endif()
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>
${extra_sources})
target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../tests/include)
target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../library)

# This emulates "if ( ... IN_LIST ... )" which becomes available in CMake 3.3
list(FIND executables_libs ${exe} exe_index)
Expand Down
Loading

0 comments on commit 04a8d02

Please sign in to comment.