build success but test failed based on master with Qt5.15.2 on ubuntu2004

Hi, there.
I build the vtk source on branch master with Qt5.15.2 on ubuntu2004.

when I run the test app, it failed like below information.

anyone know how can I make the test run successful? very thanks.

eton@9u:~/opt/vtks/vtk-src/build/bin$ ./vtkGUISupportQtQuickCxxTests
Available tests:
  0. TestQQuickVTKRenderItem
  1. TestQQuickVTKRenderItemWidget
  2. TestQQuickVTKRenderWindow
To run a test, enter the test number: 0
CTEST_FULL_OUTPUT (Avoid ctest truncation of output)
QML2_IMPORT_PATH: ("/home/eton/opt/vtks/vtk-src/build/bin", "qrc:/qt-project.org/imports", "/home/eton/Qt/5.15.2/gcc_64/qml")
QQmlApplicationEngine failed to load component
qrc:/TestQQuickVTKRenderItem.qml:7:1: module "VTK" is not installed

Loguru caught a signal: SIGSEGV
Stack trace:
5       0x560c4cd3314e ./vtkGUISupportQtQuickCxxTests(+0x614e) [0x560c4cd3314e]
4       0x7f43abb930b3 __libc_start_main + 243
3       0x560c4cd33614 ./vtkGUISupportQtQuickCxxTests(+0x6614) [0x560c4cd33614]
2       0x560c4cd33a21 ./vtkGUISupportQtQuickCxxTests(+0x6a21) [0x560c4cd33a21]
1       0x7f43aa3554ce QWindow::show() + 14
0       0x7f43abbb2210 /lib/x86_64-linux-gnu/libc.so.6(+0x46210) [0x7f43abbb2210]
(   1.784s) [main thread     ]                       :0     FATL| Signal: SIGSEGV
Segmentation fault (core dumped)

the make install info just like below: (new user not allowed upload log file.)

Install the project...
-- Install configuration: "Release"
-- Up-to-date: /usr/local/include/vtk-9.0/vtkParse.h
-- Up-to-date: /usr/local/include/vtk-9.0/vtkParseData.h

I want to draw addition graph on ImagePlaneWidget use Qt-QML.
by the way , i would like append any useful message, just tell me how to do, or just any suggestions?

You may need to set the QML2_IMPORT_PATH environment variable to be able to load them (I don’t know where Qt searches by default). FWIW, CTest will set this, but you’ll need to set it manually if you’re going to run the executable by hand.

very thanks. It works.
I export it then test run a part. below is the log:

export QML2_IMPORT_PATH=/home/eton/opt/vtks/vtk-src/build/lib/qml

eton@9u:~/opt/vtks/vtk-src/build$ ./bin/vtkGUISupportQtQuickCxxTests
Available tests:
  0. TestQQuickVTKRenderItem
  1. TestQQuickVTKRenderItemWidget
  2. TestQQuickVTKRenderWindow
To run a test, enter the test number: 0
CTEST_FULL_OUTPUT (Avoid ctest truncation of output)
QML2_IMPORT_PATH: ("/home/eton/opt/vtks/vtk-src/build/bin", "qrc:/qt-project.org/imports", "/home/eton/opt/vtks/vtk-src/build/lib/qml", "/home/eton/Qt/5.15.2/gcc_64/qml")
terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_M_construct null not valid

Loguru caught a signal: SIGABRT
Stack trace:
13      0x55c94dc3e14e ./bin/vtkGUISupportQtQuickCxxTests(+0x614e) [0x55c94dc3e14e]
12      0x7f3d1cf770b3 __libc_start_main + 243
11      0x55c94dc3e614 ./bin/vtkGUISupportQtQuickCxxTests(+0x6614) [0x55c94dc3e614]
10      0x55c94dc3ed5e ./bin/vtkGUISupportQtQuickCxxTests(+0x6d5e) [0x55c94dc3ed5e]
9       0x7f3d1aad925c std::string::basic_string(char const* const&) + 60
8       0x7f3d1aad90a4 void std::string::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag) + 52
7       0x7f3d1898821e std::__throw_logic_error(char const*) + 65
6       0x7f3d189916a9 /lib/x86_64-linux-gnu/libstdc++.so.6(+0xaa6a9) [0x7f3d189916a9]
5       0x7f3d189913f7 /lib/x86_64-linux-gnu/libstdc++.so.6(+0xaa3f7) [0x7f3d189913f7]
4       0x7f3d1899138c /lib/x86_64-linux-gnu/libstdc++.so.6(+0xaa38c) [0x7f3d1899138c]
3       0x7f3d18985911 /lib/x86_64-linux-gnu/libstdc++.so.6(+0x9e911) [0x7f3d18985911]
2       0x7f3d1cf75859 abort + 299
1       0x7f3d1cf9618b gsignal + 203
0       0x7f3d1cf96210 /lib/x86_64-linux-gnu/libc.so.6(+0x46210) [0x7f3d1cf96210]
(   2.356s) [main thread     ]                       :0     FATL| Signal: SIGABRT
Aborted (core dumped)

That test expects to be told where its baseline images and input data exist. You can see how it gets run through CTest here (click the Show Command Line “link”). It may just be easier to run ctest -R TestQQuickVTKRenderItem instead of trying to run it by hand.

@ben.boeckel Very tks. what you tell me is very useful, more than solve the problem.