Build and run tests headless?

Hi,

I’m trying to compile a new version of CP2 on our cluster, but I’m stymied by the inability of the testing framework to run headless:

[root@bc CellProfiler]# make python cellprofiler/cpmath/setup.py build_ext -i --compiler=unix running build_ext python cellprofiler/cpmath/setup.py build_ext -i --compiler=unix running build_ext python cellprofiler/cpmath/setup.py build_ext -i --compiler=unix running build_ext python cellprofiler/cpmath/setup.py build_ext -i --compiler=unix running build_ext python cellprofiler/cpmath/setup.py build_ext -i --compiler=unix running build_ext python -m nose.core --exe --with-xunit --xunit-file=/usr/cp2/xml-test-report.xml cellprofiler debug1: client_input_channel_open: ctype x11 rchan 3 win 65536 max 16384 debug1: client_request_x11: request from 127.0.0.1 40571 debug1: channel 1: new [x11] debug1: confirm x11 X11 connection rejected because of wrong authentication. debug1: channel 1: free: x11, nchannels 2 Unable to access the X Display, is $DISPLAY set properly? make: *** [tests] Error 1

Please ignore the switch from the flags --with-nosexunit --core-target to --with-xunit --xunit-file, as we don’t have the NoseXunit plugin installed, and Nose versions > 0.11 have equivalent functionality built in (see http://stackoverflow.com/questions/2083102/using-nose-nosexunit-on-a-python-package)

However, I’m not able to forward X windows to my workstation, as I’m using ssh -X to log into the cluster remotely, and the have to su to root to compile. Anyhow, is there a way to run the tests without opening an X11 window, and just dump the results in the specified XML file?

Thanks,

Lee.

Hi,

I found a way to perform X11 forwarding after switching users to root on the remote machine, so please disregard this question. If others encounter this problem, I’ve posted two solutions on my blog https://cerevisuals.wordpress.com/2011/08/06/technical-aside-x11-forwarding-and-su/

Thanks,

Lee.