ScintillatorSynth / Scintillator

A Video Synthesis Engine for SuperCollider
https://scintillatorsynth.org
56 stars 8 forks source link

Increase sclang exit reliability in test scripts #64

Closed lnihlen closed 4 years ago

lnihlen commented 4 years ago

The Travis build is a bit flaky right now due to timeouts on an exit hang from the sclang scripts. This is particularly noticeable on the sclang unit tests, with this in the log:

$ make sclang_unit_tests
Scanning dependencies of target sclang_unit_tests
compiling class library...
    Found 718 primitives.
    Compiling directory '/home/travis/build/ScintillatorSynth/Scintillator/third_party/sclang-dev/build/install-ext/share/SuperCollider/SCClassLibrary'
    Compiling directory '/home/travis/build/ScintillatorSynth/Scintillator/third_party/sclang-dev/build/install-ext/share/SuperCollider/Extensions'
    Compiling directory '/home/travis/.local/share/SuperCollider/Extensions'
    Compiling directory '/home/travis/build/ScintillatorSynth/Scintillator/classes'
    Compiling directory '/home/travis/build/ScintillatorSynth/Scintillator/tests'
    numentries = 696611 / 7544900 = 0.092
    3971 method selectors, 1900 classes
    method table size 10193664 bytes, big table size 60359200
    Number of Symbols 9422
    Byte Code Size 272448
    compiled 236 files in 0.12 seconds
Info: 4 methods are currently overwritten by extensions. To see which, execute:
MethodOverride.printAll
compile done
localhost : setting clientID to 0.
internal : setting clientID to 0.
Couldn't set realtime scheduling priority 1: Operation not permitted
Class tree inited in 0.01 seconds
*** Welcome to SuperCollider 3.10.4. *** For help type ctrl-c ctrl-h (Emacs) or :SChelp (vim) or ctrl-U (sced/gedit).
Couldn't set realtime scheduling priority 1: Operation not permitted
RUNNING UNIT TEST a TestScinthDef
UNIT TEST.............
There were no failures
main: quit request 0
cleaning up OSC
No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received
The build has been terminated

Asking around on the SC slack channel about best practices for this, scztt@ points me to the python scripts in https://github.com/scztt/qpm/tree/qpm-unit and recommends looking for subprocess calls, which contain some workarounds for the hang-on-exit issue.

Investigate and re-create in Scintillator.

lnihlen commented 4 years ago

This might also unblock being able to run sclang standalone on MacOS, furthering the work on #51. This is because the python script can include the xvfb workaround used to launch sclang on Linux, meaning we could build an sclang with SC_IDE=ON, thus allowing the interpreter to build on MacOS.

lnihlen commented 4 years ago

67 makes some progress towards this by adding a sclang running script that has a 90s timeout.

lnihlen commented 4 years ago

Considered resolved in #67 for now.