From 25fa8127e6ca1ec923db89b5617cf14a9c160172 Mon Sep 17 00:00:00 2001 From: Ernesto de Gracia Herranz Date: Sat, 25 May 2024 00:58:08 +0200 Subject: [PATCH] (#23942) sdf: refactor test package * sdf: refactor test package * evade UB * use sdf function * minimal test with img_data null * remove stb from conanfile * fix * remove stb from test_v1 * fix --- recipes/sdf/all/test_package/CMakeLists.txt | 3 +- recipes/sdf/all/test_package/conanfile.py | 4 +-- recipes/sdf/all/test_package/test.png | Bin 8484 -> 0 bytes recipes/sdf/all/test_package/test_package.c | 29 +++--------------- .../sdf/all/test_v1_package/CMakeLists.txt | 3 +- recipes/sdf/all/test_v1_package/conanfile.py | 6 +--- 6 files changed, 8 insertions(+), 37 deletions(-) delete mode 100644 recipes/sdf/all/test_package/test.png diff --git a/recipes/sdf/all/test_package/CMakeLists.txt b/recipes/sdf/all/test_package/CMakeLists.txt index afcf11bbd8776..0e0a1b879f436 100644 --- a/recipes/sdf/all/test_package/CMakeLists.txt +++ b/recipes/sdf/all/test_package/CMakeLists.txt @@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 3.1) project(test_package LANGUAGES C) find_package(sdf REQUIRED CONFIG) -find_package(stb REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} PRIVATE sdf::sdf stb::stb) +target_link_libraries(${PROJECT_NAME} PRIVATE sdf::sdf) diff --git a/recipes/sdf/all/test_package/conanfile.py b/recipes/sdf/all/test_package/conanfile.py index ad5b8f9465ed6..0a6bc68712d90 100644 --- a/recipes/sdf/all/test_package/conanfile.py +++ b/recipes/sdf/all/test_package/conanfile.py @@ -14,7 +14,6 @@ def layout(self): def requirements(self): self.requires(self.tested_reference_str) - self.requires("stb/cci.20210910") def build(self): cmake = CMake(self) @@ -24,5 +23,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - img_path = os.path.join(self.source_folder, "test.png") - self.run(f"{bin_path} {img_path}", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/sdf/all/test_package/test.png b/recipes/sdf/all/test_package/test.png deleted file mode 100644 index 568aa3449320a47d6daad61b3adc56941df221a1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8484 zcmV+u2WQQyyHDLyU8rb*z8s1VW^Qq1PlEf=$v0VHe{Z2O*LxDo}{G@E!^Q zc5kY^hzJwZ)i5k}&eezy`UF%g+qfQzF`qyT6c3fpj}80R?aSpU)` zCcW|;XeShl4USRUg zZR{+3i^U$P6!y?g=oQZtQ=4R-?^5dy#yQX^ILsS|nchZ5)wdr>hIWE@n;Q-GkZPf) zxl$lLHugnAr0{#r$npw-6B`w1tf(05k%_||G7M(y1V_!- z+EHxnY6UW}7-JoJqs5*#_DPQz)$;3j;^h_gBHV6c`7>C9Ai6GjrU$?5g zNW$qj9S=uPf)Gg%LL|F&D}l_B1cI0%;d>5)7VC02QbLV_@QB!NKS2GQCH1OSd< zE-pi3G{$9^>(QC9^hg2+IJs1*t(c23rjR)pUAN{)g6I>;-laveF~f0PKhqKc`XD z9Sn;gwpJ+{s^4X?my!jEf=tYD=#Mg^Nu+>HsC~FojB}hUtO}|dqw%0+_=CQz?L_@8 zsPmX?(JRgIWoajKB!Q?Y0F1^kyp30|0>JtB1%~+;)CrLUHbkn6YKlyZ_PKFFhIRr$ z)KN=Z76W2wAP^!6;&hOgZxI@8>+jkzClewGY++~ro#$zO1&?`a$DB-vRO@$@;57Cn+cQ2TqMA%^=8efLUYv?>tbahH4P zkpuz{NJoj`J`KgvBMAh4F~H?sh$Ikrz9%QBm+D_T;m4Q|2QL3A@Z>REzm&bN-=}q)8G^B^!P)#3ms4ondlP3 zTAsvRXoS1)WO&~ownMuhjn2nJTx1a|13dR8@5R%fw^ZS$uUV8}0M_Vt@hW#rd!)lC zzyh?wt(G*BUP<5uf5sa0#8Mmsa%{6nAyje(#q%uQ05AgsLna6D zg&3>9M*_%40f76^!G=n}e6&V?VU55N-yj8N#l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