mirror of
https://github.com/opencv/opencv.git
synced 2026-12-02 21:22:43 -06:00
tests: reduce iterations, input sizes and perf grids of slow tests
Signed-off-by: abhishek-gola <abhishek@opencv.org>
This commit is contained in:
committed by
Abhishek Gola
parent
8a1083b85a
commit
0cfdeb800f
@@ -47,7 +47,7 @@ namespace opencv_test { namespace {
|
||||
inline void verify_size(const std::string &nm, const cv::Mat &img)
|
||||
{
|
||||
EXPECT_NO_THROW(imshow(nm, img));
|
||||
EXPECT_EQ(-1, waitKey(200));
|
||||
EXPECT_EQ(-1, waitKey(1));
|
||||
|
||||
// see https://github.com/opencv/opencv/issues/25550
|
||||
// Wayland backend is not supported getWindowImageRect().
|
||||
@@ -58,8 +58,15 @@ inline void verify_size(const std::string &nm, const cv::Mat &img)
|
||||
return;
|
||||
}
|
||||
|
||||
// Poll instead of a fixed delay: up to ~2 s, which also covers window managers that apply the resize late.
|
||||
Rect rc;
|
||||
EXPECT_NO_THROW(rc = getWindowImageRect(nm));
|
||||
for (int attempt = 0; attempt < 200; ++attempt)
|
||||
{
|
||||
EXPECT_NO_THROW(rc = getWindowImageRect(nm));
|
||||
if (rc.size() == img.size())
|
||||
break;
|
||||
EXPECT_EQ(-1, waitKey(10));
|
||||
}
|
||||
EXPECT_EQ(rc.size(), img.size());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user