diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 40bd90f5..5b48b4d6 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -15,7 +15,7 @@ test-suite gil : sample_image.cpp error_if.cpp : - : + : gil_reference_checksums.txt : $(BOOST_ROOT) BOOST_GIL_NO_IO _SCL_SECURE_NO_WARNINGS ] [ run channel.cpp error_if.cpp diff --git a/test/image.cpp b/test/image.cpp index 27953442..e05831a7 100644 --- a/test/image.cpp +++ b/test/image.cpp @@ -568,21 +568,17 @@ void test_image(const char* ref_checksum) { } int main(int argc, char* argv[]) { - - const char* local_name = "gil_reference_checksums.txt"; - const char* name_from_status = "../libs/gil/test/gil_reference_checksums.txt"; - - std::ifstream file_is_there(local_name); + if(argc != 2) + { + std::cerr << "Checksum file name argument missing" << std::endl; + return 1; + } + std::ifstream file_is_there(argv[1]); if (file_is_there) { - test_image(local_name); + test_image(argv[1]); } else { - std::ifstream file_is_there(name_from_status); - if (file_is_there) - test_image(name_from_status); - else { - std::cerr << "Unable to open gil_reference_checksums.txt"<