diff --git a/packages/o/opencv/xmake.lua b/packages/o/opencv/xmake.lua index a2954233d..d0351ce64 100644 --- a/packages/o/opencv/xmake.lua +++ b/packages/o/opencv/xmake.lua @@ -170,7 +170,14 @@ package("opencv") end) on_test(function (package) - os.vrun("opencv_version") + -- bin path envs will be missing for precompiled artifacts in old xmake version + local runtest = true + if package.is_built and not package:is_built() and xmake.version():le("2.5.6") then + runtest = false + end + if runtest then + os.vrun("opencv_version") + end assert(package:check_cxxsnippets({test = [[ #include void test(int argc, char** argv) {