Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

All test are failing (and I am probably doing something wrong) #246

Closed
hroncok opened this Issue · 21 comments

3 participants

Miro Hrončok Marius Kintel donbright
Miro Hrončok

Hi,
I was going to build the test environment and run the tests, however I've realized, that all the tests are failing.

The sequence off commands I am running (%{those} are RPM macros):

qmake-qt4 VERSION=%{version} PREFIX=%{_prefix}
make %{?_smp_mflags}
make install INSTALL_ROOT=%{buildroot}
cd tests
cmake . -DGLEW_INCLUDE_DIR=/usr/include/GL/
ctest -C All
cd -

Am I doing anything wrong? Thanks.

Marius Kintel
Owner

I think you forgot to run make after cmake

Miro Hrončok

Yes, sorry for bothering you witch such a stupid problem :D

Miro Hrončok hroncok closed this
donbright
Collaborator

you are having to use GLEW_INCLUDE_DIR for it to work?

it should have found /usr/include/GL automatically...

Miro Hrončok

Yes, I have to.

...
-- Offscreen OpenGL Context - using Unix GLX
-- Found PythonInterp: /usr/bin/python (found version "2.7.3") 
Available test configurations: Heavy;Examples;Default;All
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
GLEW_INCLUDE_DIR
   used as include directory in directory /home/churchyard/rpmbuild/BUILD/openscad-6ecf96b081626c512343fc1a8f7aa4a202ffaa86/tests
   [above line repeats 16 times]

-- Configuring incomplete, errors occurred!

Miro Hrončok

Anyway, ended up with this:

97% tests passed, 15 tests failed out of 470

Total Test time (real) = 318.58 sec

The following tests FAILED:
    102 - dumptest_include-tests (Failed)
    103 - dumptest_use-tests (Failed)
    190 - cgalpngtest_text-search-test (Failed)
    254 - cgalpngtest_example023 (Failed)
    274 - cgalpngtest_include-tests (Failed)
    275 - cgalpngtest_use-tests (Failed)
    283 - opencsgtest_text-search-test (Failed)
    349 - opencsgtest_example023 (Failed)
    369 - opencsgtest_include-tests (Failed)
    370 - opencsgtest_use-tests (Failed)
    380 - throwntogethertest_text-search-test (Failed)
    382 - throwntogethertest_polygon-tests (Failed)
    444 - throwntogethertest_example023 (Failed)
    465 - throwntogethertest_include-tests (Failed)
    466 - throwntogethertest_use-tests (Failed)
No such file or directory
Problem running command: /usr/bin/python /home/churchyard/rpmbuild/BUILD/openscad-6ecf96b081626c512343fc1a8f7aa4a202ffaa86/tests/test_pretty_print.py --builddir=/home/churchyard/rpmbuild/BUILD/openscad-6ecf96b081626c512343fc1a8f7aa4a202ffaa86/tests/build
Problem executing post-test command(s).
Errors while running CTest

Does that actually mean anything?

Miro Hrončok hroncok reopened this
Miro Hrončok

http://files.hroncok.cz/linux_x86_64_mesa-dri-intel%28r%29_rufb_report/index.html

Is there any purpose of running those test on a virtual builder somewhere in cloud, where Fedora packages are created, or are they all graphics card specific?

Marius Kintel
Owner

You need MCAD for all tests to pass.
The tests are not GPU-dependant, but some artifacts may vary.

Marius Kintel
Owner

..so yes, running the tests in the cloud is super-helpful. As is publishing the HTML results.

Miro Hrončok

I am able to compile the test just fine from command line, but when trying to do it as part of RPM generation. I am getting this:

...
[100%] Building CXX object CMakeFiles/opencsgtest.dir/builddir/build/BUILD/openscad-2013.01/src/rendersettings.cc.o
/builddir/build/BUILD/openscad-2013.01/tests/csgtestcore.cc: In function 'void enable_opencsg_shaders(OffscreenView*)':
/builddir/build/BUILD/openscad-2013.01/tests/csgtestcore.cc:137:7: warning: unused variable 'ignore_gl_version' [-Wunused-variable]
Linking CXX executable opencsgtest
/builddir/build/BUILD/openscad-2013.01/tests/csgtestcore.cc: In function 'void enable_opencsg_shaders(OffscreenView*)':
/builddir/build/BUILD/openscad-2013.01/tests/csgtestcore.cc:137:7: warning: unused variable 'ignore_gl_version' [-Wunused-variable]
Linking CXX executable throwntogethertest
/usr/bin/ld: libtests-offscreen.a(fbo.cc.o): undefined reference to symbol '__glewGenFramebuffers'
/usr/bin/ld: note: '__glewGenFramebuffers' is defined in DSO /lib64/libGLEW.so.1.9 so try adding it to the linker command line
/lib64/libGLEW.so.1.9: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[2]: *** [opencsgtest] Error 1
make[1]: *** [CMakeFiles/opencsgtest.dir/all] Error 2
/usr/bin/ld: libtests-offscreen.a(fbo.cc.o): undefined reference to symbol '__glewGenFramebuffers'
/usr/bin/ld: note: '__glewGenFramebuffers' is defined in DSO /lib64/libGLEW.so.1.9 so try adding it to the linker command line
/lib64/libGLEW.so.1.9: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[2]: *** [throwntogethertest] Error 1
make[1]: *** [CMakeFiles/throwntogethertest.dir/all] Error 2
make: *** [all] Error 2

I suppose I should add -lGLEW, but I am not sure, how to tell cmake (or make) to do so. Could you please give me a hint?

donbright
Collaborator

Can you tell me the exact steps I would have to go through to do 'RPM generation' and reproduce this bug?

Marius Kintel
Owner

This sounds similar to what was discussed in #119

donbright
Collaborator

I assume that FindGLEW.cmake is to blame but it would be ideal to be able to reproduce the bug for testing..

The odd bit is that it's looking for "/lib64" not "/usr/lib64". We could add "/lib64" and "/lib" (and /usr/lib64) to the paths searched in FindGLEW.cmake but it will need testing to see if it works or not.

Miro Hrončok

Can you tell me the exact steps I would have to go through to do 'RPM generation' and reproduce this bug?

I thought I posted it yesterday, but cannot see it here, so again (hope I didn't post it some unrelated issue elsewhere).

You should have Fedora for that, ideally Fedora 18.

# yum -y install fedora-packager @development-tools
$ rpmdev-setuptree
$ wget https://github.com/downloads/hroncok/SPECS/openscad-2013.01.17-2.fc18.src.rpm
$ rpm --install openscad-2013.01.17-2.fc18.src.rpm && rm openscad-2013.01.17-2.fc18.src.rpm
$ cd rpmbuild/SPECS
# yum-builddep -y ./openscad.scad
$ rpmbuild -ba openscad.scad
donbright
Collaborator

Thanks, I apprecaite you taking the time to post that. Sorry for this bug.... I think I have a workaround for OpensCAD 2013.01 --->

Edit your openscad.spec file

Replace this

 cmake . -DGLEW_INCLUDE_DIR=/usr/include/GL

With this:

 cmake . -DGLEW_DIR=/usr

Thanks to Eric Deschamps and Laurent Guerby at the Gnu Compile Farm I have access to an Fedora 18 box and have tested this to work.


Unfortunately it appears that Xvfb on Fedora does not have GLX working, so you will still get a failed test with all of the 'graphical' tests unless you are running on a machine where X is already running. In fact it looks like the X11 people are going to get rid of Xvfb alltogther, so I have no idea what we will do to replace this in the future.


For the longer term build solution, so that we dont need any GLEW_DIR on systems like Fedora, I have rewritten FindGLEW.cmake and CMakelists.txt so that this should no longer be a problem. The patch is here:

https://github.com/openscad/openscad/compare/glewfix

The trick to tracking this down was editing ~/.rpmmacros and modifying the '-j' line like this:

  make VERBOSE=1

This showed me the following failure:

/usr/bin/cmake -E cmake_link_script CMakeFiles/cgalpngtest.dir/link.txt --verbose=1
/usr/lib64/ccache/c++    -fno-strict-aliasing -DEIGEN_DONT_ALIGN -O2 -g -DNDEBUG 
   CMakeFiles/cgalpngtest.dir/cgalpngtest.cc.o CMakeFiles/cgalpngtest.dir/bboxhelp.cc.o CMakeFiles/cgalpngtest.dir
/home/donb/rpmbuild/BUILD/openscad-2013.01/src/CGALRenderer.cc.o CMakeFiles/cgalpngtest.dir/home/donb
/rpmbuild/BUILD/openscad-2013.01/src/renderer.cc.o CMakeFiles/cgalpngtest.dir/home/donb/rpmbuild/BUILD
/openscad-2013.01/src/rendersettings.cc.o  -o cgalpngtest -rdynamic libtests-offscreen.a libtests-cgal.a -lopencsg 
-lCGAL -lgmpxx -lmpfr -lgmp -lboost_thread-mt -lQtCore -lGLU -lGL -lSM -lICE -lX11 -lXext -lboost_thread-mt 
-lboost_program_options-mt -lboost_filesystem-mt -lboost_system-mt -lboost_regex-mt libtests-common.a
 libtests-core.a  -lQtCore -lGLU -lGL -lSM -lICE -lX11 -lXext -lboost_program_options-mt -lboost_filesystem-mt 
-lboost_system-mt -lboost_regex-mt

It wasn't even passing -lGLEW to the linker here. That indicated failures in the cmake system (also visible in the cmake log).

Thanks again

donbright
Collaborator

Future note to self:

Xvfb will be replaced by 'X Dummy':

https://www.xpra.org/Xdummy.html#usage

Although they have plans to create scripts to wrap this...

http://lists.x.org/archives/xorg-devel/2012-March/thread.html#30067

Miro Hrončok

Thanks for the fix. Finaly, the tests are working in build system: http://kojipkgs.fedoraproject.org//work/tasks/6884/4906884/build.log

Now I have to figure out, how to use X Dummy.

donbright
Collaborator

Cool... one thing that might be nice is if the script does this after the test:

cat sysinfo.txt
cat Testing/Temporary/LastTest.log

That can show the machine details as well as the failed test logs.

I also filed a bug report at Fedora bugzilla about xvfb not working with GLX.

donbright
Collaborator

Link for future reference... How to modify rpm .spec files to run Xvfb...

http://en.opensuse.org/openSUSE:Build_Service_Tips_and_Tricks#Building_a_package.2C_which_needs_an_X-Server_during_build

(have to be careful about Xvfb package name, differs betwen distros/systems )

Miro Hrončok

I also filed a bug report at Fedora bugzilla about xvfb not working with GLX.

Could you please send the link to that bug?

Marius Kintel
Owner

Can we close this, or perhaps move the remains into a more concrete issue?

Miro Hrončok hroncok closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.