From d3c2704fa9b3a37710c43ebce4ea5f53dadc37ce Mon Sep 17 00:00:00 2001 From: iphydf Date: Tue, 19 Dec 2023 20:19:02 +0000 Subject: [PATCH] chore: Fix make_single_file to support core-only. --- other/docker/tcc/Dockerfile | 16 ++++++++++++++-- other/make_single_file | 9 ++++++--- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/other/docker/tcc/Dockerfile b/other/docker/tcc/Dockerfile index 65ab3e76..d1f10181 100644 --- a/other/docker/tcc/Dockerfile +++ b/other/docker/tcc/Dockerfile @@ -39,7 +39,7 @@ RUN tcc \ COPY other/make_single_file /work/other/ RUN \ - other/make_single_file \ + other/make_single_file -core \ auto_tests/auto_test_support.c \ auto_tests/send_message_test.c \ testing/misc_tools.c | \ @@ -47,5 +47,17 @@ RUN \ -o send_message_test \ -Wall -Werror \ -bench -g \ - $(pkg-config --cflags --libs libsodium opus vpx) \ + $(pkg-config --cflags --libs libsodium) \ && ./send_message_test | grep 'tox clients connected' + +RUN \ + other/make_single_file \ + auto_tests/auto_test_support.c \ + auto_tests/toxav_basic_test.c \ + testing/misc_tools.c | \ + tcc - \ + -o toxav_basic_test \ + -Wall -Werror \ + -bench -g \ + $(pkg-config --cflags --libs libsodium opus vpx) \ + && ./toxav_basic_test | grep 'Test successful' diff --git a/other/make_single_file b/other/make_single_file index 50ae499d..7487ca51 100755 --- a/other/make_single_file +++ b/other/make_single_file @@ -6,8 +6,11 @@ # # Example: # -# other/make_single_file testing/misc_tools.c auto_tests/send_message_test.c | \ -# tcc -o send_message_test - $(pkg-config --cflags --libs libsodium opus vpx) +# other/make_single_file auto_tests/toxav_basic_test.c auto_tests/auto_test_support.c testing/misc_tools.c | \ +# tcc -o toxav_basic_test - $(pkg-config --cflags --libs libsodium opus vpx) +# +# other/make_single_file -core auto_tests/send_message_test.c auto_tests/auto_test_support.c testing/misc_tools.c | \ +# tcc -o send_message_test - $(pkg-config --cflags --libs libsodium) use strict; use warnings; @@ -44,7 +47,7 @@ sub emit { if (@ARGV and $ARGV[0] eq "-core") { shift @ARGV; - for my $fn (, ) { + for my $fn (, , ) { emit(abs_path $fn); } } else {