diff --git a/recipes/freeimage/all/test_package/conanfile.py b/recipes/freeimage/all/test_package/conanfile.py index 9f97d7f9f47a9..0a6bc68712d90 100644 --- a/recipes/freeimage/all/test_package/conanfile.py +++ b/recipes/freeimage/all/test_package/conanfile.py @@ -23,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") - bees = os.path.join(self.source_folder, "test.png") - self.run(f"{bin_path} {bees}", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/freeimage/all/test_package/test.png b/recipes/freeimage/all/test_package/test.png deleted file mode 100644 index 11640c7488fb1..0000000000000 Binary files a/recipes/freeimage/all/test_package/test.png and /dev/null differ diff --git a/recipes/freeimage/all/test_package/test_package.cpp b/recipes/freeimage/all/test_package/test_package.cpp index 0adc1a0375b01..b2164b2ffb68d 100644 --- a/recipes/freeimage/all/test_package/test_package.cpp +++ b/recipes/freeimage/all/test_package/test_package.cpp @@ -11,39 +11,14 @@ void FreeImageErrorHandler(FREE_IMAGE_FORMAT fif, const char* message) std::cerr << "FreeImage error: " << message << std::endl; } -int main(int argc, char** argv ) -{ - if (argc < 2) { - std::cerr << "Need at least one argument" << std::endl; - return 1; - } +int main(int argc, char** argv ) { #if NEED_INIT FreeImage_Initialise(); #endif FreeImage_SetOutputMessage(FreeImageErrorHandler); - - std::cout << "FreeImage " << FreeImage_GetVersion() << ", with:" << std::endl; - - for (int i = 0; i < FreeImage_GetFIFCount(); ++i) - { - std::cout << "\t- " << FreeImage_GetFIFExtensionList((FREE_IMAGE_FORMAT)i) << std::endl; - } - - const char * image_file = argv[1]; - FREE_IMAGE_FORMAT fif = FIF_UNKNOWN; - fif = FreeImage_GetFileType(image_file, 0); - if (fif == FIF_UNKNOWN) { - fif = FreeImage_GetFIFFromFilename(image_file); - } - if ((fif != FIF_UNKNOWN) && FreeImage_FIFSupportsReading(fif)) { - FIBITMAP* dib = FreeImage_Load(fif, image_file, 0); - if (dib) - { - FreeImage_Unload(dib); - } - } + std::cout << "FreeImage " << FreeImage_GetVersion() << std::endl; #if NEED_INIT FreeImage_DeInitialise(); diff --git a/recipes/freeimage/all/test_v1_package/conanfile.py b/recipes/freeimage/all/test_v1_package/conanfile.py index 6895afd01c85c..38f4483872d47 100644 --- a/recipes/freeimage/all/test_v1_package/conanfile.py +++ b/recipes/freeimage/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") - bees = os.path.join(self.source_folder, os.pardir, "test_package", "test.png") - self.run(f"{bin_path} {bees}", run_environment=True) + self.run(bin_path, run_environment=True)