Xpra: Ticket #1653: simulate_console_user.py automated test failing

As mentioned before one of the console tests is failing with a bash exit code of 127 - here's what the test outputs:

starting server: ['/usr/bin/xpra', '--no-daemon', '--bind-tcp=', '--no-notifications', '--password-file=./test-password.txt', '--auth=file', '--auth=none', '--tcp-auth=file', '--no-pulseaudio', 'start', ':10']
starting test command: ['/usr/bin/vglrun', '-d', ':0', ' -- ', '/usr/bin/xterm', '-geometry', '160x60', '-e', 'PYTHONPATH=`pwd` ./tests/xpra/test_apps/simulate_console_user.py'] with env={'TERM': 'xterm-256colTraceback (most recent call last):
  File "test_measure_perf.py", line 475, in with_server
    assert code is None, "test command %s failed to start: exit code is %s" % (cmd, code)
AssertionError: test command ['/usr/bin/vglrun', '-d', ':0', ' -- ', '/usr/bin/xterm', '-geometry', '160x60', '-e', 'PYTHONPATH=`pwd` ./tests/xpra/test_apps/simulate_console_user.py'] failed to start: exit code is 127

I'm not sure what the actual cause is - I don't think it's the relative folder (I hardcoded the file path), maybe it's a PATH issue? Or maybe it's a pathing issue in that the system can't find the test? I've tried hard-coding the file location into the test and it still fails, so I'm not sure.

I re-ran the test without VirtualGL and it fails with exit code 0...so VirtualGL isn't it.

Just running python simulate_console_user.py works fine, so the python file itself is okay.

I'll keep poking at it today and see if I can get it working, but I'm not sure how much use I'll be as I'm still learning Python.

Of note:

The xterm tests work fine (for example, the while true; do dmesg; done) - it's just the one that loads the Python file that is being problematic.

Wed, 20 Sep 2017 19:13:39 GMT - Antoine Martin: owner changed

That command line is wrong and is never going to work:

['/usr/bin/vglrun', '-d', ':0', ' -- ', '/usr/bin/xterm', '-geometry', '160x60', '-e', 'PYTHONPATH=`pwd` ./tests/xpra/test_apps/simulate_console_user.py']

The PYTHONPATH=`pwd` part will fail, you can try running it from a regular xterm to verify. It needs to be added to the environment that executes this command, not nested in it.

Wed, 20 Sep 2017 19:42:26 GMT - J. Max Mena:

Okay I removed the 'PYTHONPATH=`pwd bit and added it to the environment of the bash script that runs the file and that fixed it.

Do you want to remove it from the default config.py file and make a note for others?

FWIW I'm running with PYTHONPATH=/usr/lib/python2.7.

Wed, 20 Sep 2017 19:42:56 GMT - J. Max Mena: cc set

Smo was interested in this as well.

Thu, 21 Sep 2017 04:41:36 GMT - Antoine Martin:

How about just r16939?

Fri, 22 Sep 2017 16:48:27 GMT - J. Max Mena: status changed; resolution set

That works much better.


Sat, 23 Jan 2021 05:30:10 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1653