From 2ac18d7ae46e9a8ba2355353a94072ca13a91ba9 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 16 Jun 2025 08:57:45 +0200 Subject: [PATCH] mk-unity: include the embedded source name in the output Closes #17634 --- scripts/mk-unity.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/mk-unity.pl b/scripts/mk-unity.pl index 7685595c7c..2e394a5a3f 100755 --- a/scripts/mk-unity.pl +++ b/scripts/mk-unity.pl @@ -90,16 +90,17 @@ my $tlist = ""; foreach my $src (@src) { if($src =~ /([a-z0-9]+)\.c$/ && !exists $exclude{$src}) { my $name = $1; - my $fn = $src; if($embed) { + my $fn = $src; if($srcdir ne "" && -e "$srcdir/$fn") { $fn = $srcdir . "/" . $fn; } + print "/* Embedding: \"$src\" */\n"; my $content = do { local $/; open my $fh, '<', $fn or die $!; <$fh> }; print $content; } else { - print "#include \"$fn\"\n"; + print "#include \"$src\"\n"; } if(not exists $include{$src}) { # register test entry function $tlist .= " {\"$name\", test_$name},\n";