mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-20 02:55:47 +00:00
Merge topic 'regression-test-debug'
bd72d7247 improve regression test error output when args aren't set Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Kenneth Moreland <kmorel@sandia.gov> Merge-request: !2417
This commit is contained in:
commit
21eac99c74
@ -208,7 +208,7 @@ private:
|
||||
{
|
||||
static std::string TestDataBasePath;
|
||||
|
||||
if (path != "")
|
||||
if (!path.empty())
|
||||
{
|
||||
TestDataBasePath = path;
|
||||
if ((TestDataBasePath.back() != '/') && (TestDataBasePath.back() != '\\'))
|
||||
@ -217,6 +217,13 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
if (TestDataBasePath.empty())
|
||||
{
|
||||
VTKM_LOG_S(
|
||||
vtkm::cont::LogLevel::Error,
|
||||
"TestDataBasePath was never set, was --data-dir set correctly? (hint: ../data/data)");
|
||||
}
|
||||
|
||||
return TestDataBasePath;
|
||||
}
|
||||
|
||||
@ -224,7 +231,7 @@ private:
|
||||
{
|
||||
static std::string RegressionTestImageBasePath;
|
||||
|
||||
if (path != "")
|
||||
if (!path.empty())
|
||||
{
|
||||
RegressionTestImageBasePath = path;
|
||||
if ((RegressionTestImageBasePath.back() != '/') &&
|
||||
@ -234,6 +241,13 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
if (RegressionTestImageBasePath.empty())
|
||||
{
|
||||
VTKM_LOG_S(vtkm::cont::LogLevel::Error,
|
||||
"RegressionTestImageBasePath was never set, was --baseline-dir set correctly? "
|
||||
"(hint: ../data/baseline)");
|
||||
}
|
||||
|
||||
return RegressionTestImageBasePath;
|
||||
}
|
||||
|
||||
@ -241,7 +255,7 @@ private:
|
||||
{
|
||||
static std::string WriteDirBasePath;
|
||||
|
||||
if (path != "")
|
||||
if (!path.empty())
|
||||
{
|
||||
WriteDirBasePath = path;
|
||||
if ((WriteDirBasePath.back() != '/') && (WriteDirBasePath.back() != '\\'))
|
||||
|
@ -73,7 +73,7 @@ inline TestEqualResult test_equal_images(const std::shared_ptr<ViewType> view,
|
||||
}
|
||||
catch (const vtkm::cont::ErrorExecution& error)
|
||||
{
|
||||
VTKM_LOG_S(vtkm::cont::LogLevel::Error, error.what());
|
||||
VTKM_LOG_S(vtkm::cont::LogLevel::Error, error.GetMessage());
|
||||
imageResult.PushMessage(error.GetMessage());
|
||||
|
||||
const std::string outputImagePath = vtkm::cont::testing::Testing::WriteDirPath(fileName);
|
||||
@ -85,7 +85,7 @@ inline TestEqualResult test_equal_images(const std::shared_ptr<ViewType> view,
|
||||
}
|
||||
catch (const vtkm::cont::ErrorBadValue& error)
|
||||
{
|
||||
VTKM_LOG_S(vtkm::cont::LogLevel::Error, error.what());
|
||||
VTKM_LOG_S(vtkm::cont::LogLevel::Error, error.GetMessage());
|
||||
imageResult.PushMessage(error.GetMessage());
|
||||
imageResult.PushMessage("Unsupported file type for image: " + fileName);
|
||||
testResults.PushMessage(imageResult.GetMergedMessage());
|
||||
@ -199,5 +199,4 @@ inline TestEqualResult test_equal_images_matching_name(
|
||||
returnOnPass);
|
||||
}
|
||||
|
||||
|
||||
#endif // vtk_m_rendering_testing_Testing_h
|
||||
|
Loading…
Reference in New Issue
Block a user