Skip to content
Prev 15507 / 21312 Next

[Bioc-devel] R environment variable which indicates "running in the bioc build system"?

On 9/12/19 15:13, Pages, Herve wrote:
Although that doesn't seem to be working on merida1:

  - From R:

    igv <- igvR()
    # attempting to open websocket connection on port 15000
    # LSOpenURLsWithRole() failed with error -10810 for the URL 
http://localhost:15000.

  - From the terminal (in an ssh remote session):

    merida1:~ biocbuild$ open http://www.apple.com/
    LSOpenURLsWithRole() failed with error -10810 for the URL 
http://www.apple.com/.

    merida1:~ biocbuild$ /Applications/Safari.app/Contents/MacOS/Safari
    Sep 12 18:54:20  Safari[98176] <Error>: Set a breakpoint at 
CGSLogError to catch errors as they are logged.
    Sep 12 18:54:20  Safari[98176] <Error>: This user is not allowed 
access to the window system right now.
    _RegisterApplication(), FAILED TO establish the default connection 
to the WindowServer, _CGSDefaultConnection() is NULL.

I don't think Safari supports headless mode and we probably don't want 
to start the business of installing a headless browser on El Capitan.

However things seem to work as expected on the Linux builders:

   library(igvR)
   igv <- igvR()
   # attempting to open websocket connection on port 15000
   # BrowserViz websocket ready after   1.20 seconds
   ping(igv)
   # [1] "pong"

Didn't try this on Windows though.

Would a test based on the detected OS (e.g. Sys.info()[["sysname"]] != 
"Darwin") would be good enough for now to decide whether to run the 
tests and examples? Not ideal but still better than using interactive() 
or disabling all testing and examples on our build machines.

H.