Camelcade / Perl5-IDEA

Perl5 plugins for IntelliJ IDEA
https://plugins.jetbrains.com/plugin/7796-perl/
Other
407 stars 76 forks source link

Tests abort with "Test framework quit unexpectedly" #2506

Closed tomk3003 closed 2 years ago

tomk3003 commented 2 years ago

I just upgraded Pycharm to 2022.2 and updated the Perl plugin. I cannot get the tests to run. The only output is:

/opt/perl/bin/perlbrew exec -q --with perl-5.30.0 /opt/perl/perls/perl-5.30.0/bin/perl /opt/perl/perls/perl-5.30.0/bin/prove -PPassEnv --formatter TAP::Formatter::Camelcade --merge --recurse -Ilib --jobs 1 /home/thomas/PycharmProjects/devel-cover-report-sonargeneric/t
Testing started at 4:08 PM ...

Process finished with exit code 0

The shown command works when pasted into the terminal and produces the expected output:

##teamcity[enteredTheMatrix timestamp='2022-08-15T14:26:02.831']
##teamcity[testingStarted timestamp='2022-08-15T14:26:02.849']
...
##teamcity[testSuiteFinished locationHint='t/01_basic.t' name='t/01_basic.t' nodeId='06640bcab530e1912a66787ecc5e0736' parentNodeId='0' timestamp='2022-08-15T14:26:03.035']
All tests successful.
Files=1, Tests=4,  1 wallclock secs ( 0.02 usr  0.01 sys +  0.14 cusr  0.01 csys =  0.18 CPU)
Result: PASS
##teamcity[testingFinished timestamp='2022-08-15T14:26:03.036']

There is nothing additional in the Pycharm logs. This is happening for all my projects even for newly created ones.

Build version: PyCharm 2022.2 Build: #PY-222.3345.131 July 27, 2022 JRE: 17.0.3+7-b469.32, JetBrains s.r.o. JVM: 17.0.3+7-b469.32, OpenJDK 64-Bit Server VM, JetBrains s.r.o. Operating System: Linux 5.15.0-46-generic (amd64) Custom plugins: [Perl (222.2964.55-EAP-SNAPSHOT), Template Toolkit Support (222.2964.55-EAP-SNAPSHOT), Embedded Perl Support (222.2964.55-EAP-SNAPSHOT), Mojolicious Support (222.2964.55-EAP-SNAPSHOT)]

tomk3003 commented 2 years ago

This looks somewhat similar to #2463 This is not related to the upgrade. I just tested my previous Pycharm versions and the problem is the same. Strange is that the command is working fine in the Pycharm Terminal. So it doesn't look like a perlbrew problem.

tomk3003 commented 2 years ago

Verified. Adding the exact same perl as a new local interpreter in perl5.xml with "versionmanager" set to "system" works without problems. So executing the perlbrew command seems somehow broken.

tomk3003 commented 2 years ago

I have narrowed this down to the variables from perlbrews etc/bashrc not being available when pycharm is started from a gnome desktop file. The file is normally sourced from the user's .bashrc. Using perlbrew exec -q masks the error message No perl installation found. And getting a return code 0 doesn't help either. After making sure that the variables are set, everything works as expected.