From c275209d321f9402a22d4eb33a664202bdd5b75b Mon Sep 17 00:00:00 2001 From: Ernesto de Gracia Herranz Date: Wed, 15 May 2024 02:33:14 +0200 Subject: [PATCH] (#23992) tinygltf: refactor test package --- recipes/tinygltf/all/test_package/box01.glb | Bin 3816 -> 0 bytes .../tinygltf/all/test_package/conanfile.py | 3 +-- .../all/test_package/test_package.cpp | 20 ++---------------- .../tinygltf/all/test_v1_package/conanfile.py | 3 +-- 4 files changed, 4 insertions(+), 22 deletions(-) delete mode 100644 recipes/tinygltf/all/test_package/box01.glb diff --git a/recipes/tinygltf/all/test_package/box01.glb b/recipes/tinygltf/all/test_package/box01.glb deleted file mode 100644 index 7477e897f06a5ae6d09311da18ca66a3f4bcead0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3816 zcmb_e>rxvx6jsvombU5rehH($HDv8Il(>_IV*`m(z}(6-!(>|7$jeUcUC*wJ!!VxV zN8c-boIXa+kyc)@m_Sn2BaXgv`_7S;m4e>x>P^Pjzjqk>`!-`wc3K-JTy#1zP2(ix zwfz&`9(KDj*$d@}*Sr#MA1m4Fc2lV|?8N;+9LY%S9uFk1&6g{FiFe{*gl2!C#QWko zX7S6C)NFW+gv8f^1%=`2b43M81>l2j~-H#c9(#)NH_6q7$W_1;RuKSzw2 zF756tan{JxY`6}uovp&hSgT0&DxdH`Mlum9PIwI$^jORWxNj@Z2XUf!i66-%4P#te zUYYZ-DQCyr9h~gmnv4Q<$ZJ2H?^lT=ppEsb_ZR$pU(SX4i`BE;Q7$*Q@+!gAd0f@2 zMpww$UD(AczLjUAaqY}ooAr;ctZlmN-N*Q065?_l2qkJ_FzAIHp>PH7#T_NpY^o9| z`aictDi^9H0H^~r0Roci&;WP>utnfkfZw1oLM1$fdH@>$9as)vlZ-1{umkmVSOwUF z`cqgPk<(xBD1bK9NAP$HB-9r%J;2cj|E%fxJ;Iv>tnJGMyMuFkBahd1gY*23UGq71 zC!gkj3BHUkk9YDre0hIGJLvlJdJQi6=eTGuVyEAi^poc+`WNdfVyE8XdKa;?zxn!^ zc-nLQG+!SFrazkrirC~g^-r9dIWGENhA+!kvsyW+%)@*{x%-{Z9L|i8n5kj9k1<>=Z6Wu z$*=8A&8PVTswd;$!Wv9Ge(11tsz=*(e)>9Q_38Jyp4n}GhF{mO`*ZA%s2*bn;?wcA zKmGl~{vErHckH@8vOjpBPtd+lG6_Y`oCC5SrfGO2S4BskrTgBThc^a2@W>dnlXa;? z508WGco-Z;cnRV)yqn-b(1?3+;>1mE8YO+R$-=Ay<>ZOYk!yY5qo?eb%f44BFV2tY znD5KiB`|ieXRfXqUVk4+Fig_6~cO-NN5(_9lCez0cml-v{h%c87h)K4KrUPuQpIGxj int main(int argc, char **argv) { - if (argc < 2) { - std::cerr << "Need at least one argument\n"; - return 1; - } tinygltf::Model model; tinygltf::TinyGLTF loader; std::string err; std::string warn; - bool ret = loader.LoadBinaryFromFile(&model, &err, &warn, argv[1]); - - if (!warn.empty()) { - printf("Warn: %s\n", warn.c_str()); - } - - if (!err.empty()) { - printf("Err: %s\n", err.c_str()); - } - - if (!ret) { - printf("Failed to parse glTF\n"); - return -1; - } + bool ret = loader.LoadBinaryFromFile(&model, &err, &warn, "non_existent_file.glb"); + printf("Test %d\n", ret); return 0; } diff --git a/recipes/tinygltf/all/test_v1_package/conanfile.py b/recipes/tinygltf/all/test_v1_package/conanfile.py index 6d85d0b397c56..38f4483872d47 100644 --- a/recipes/tinygltf/all/test_v1_package/conanfile.py +++ b/recipes/tinygltf/all/test_v1_package/conanfile.py @@ -14,5 +14,4 @@ def build(self): def test(self): if not tools.cross_building(self): bin_path = os.path.join("bin", "test_package") - glb_path = os.path.join(self.source_folder, os.pardir, "test_package", "box01.glb") - self.run(f"{bin_path} {glb_path}", run_environment=True) + self.run(bin_path, run_environment=True)