Merge pull request #8463 from gilles-peskine-arm/metatest-create

Create a metatest program
This commit is contained in:
Gilles Peskine 2023-11-20 14:07:08 +00:00 committed by GitHub
commit 6267dd59c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 465 additions and 1 deletions

View file

@ -144,6 +144,7 @@ sub gen_app {
my $guid = gen_app_guid( $path );
$path =~ s!/!\\!g;
(my $appname = $path) =~ s/.*\\//;
my $is_test_app = ($path =~ m/^test\\/);
my $srcs = "<ClCompile Include=\"..\\..\\programs\\$path.c\" \/>";
if( $appname eq "ssl_client2" or $appname eq "ssl_server2" or
@ -158,7 +159,9 @@ sub gen_app {
$content =~ s/<SOURCES>/$srcs/g;
$content =~ s/<APPNAME>/$appname/g;
$content =~ s/<GUID>/$guid/g;
$content =~ s/INCLUDE_DIRECTORIES\n/$include_directories/g;
$content =~ s/INCLUDE_DIRECTORIES\n/($is_test_app ?
$library_include_directories :
$include_directories)/ge;
content_to_file( $content, "$dir/$appname.$ext" );
}