Comments (7)
Opened: nvim-lua/plenary.nvim#331
from neovim-cmake.
No issues, thanks for the plugin. It makes nvim much closer to IDE like experience. Appreciate it. Thanks.
from neovim-cmake.
Thanks for the report! I noticed that it works correctly (exists with code 1) if I comment out this part:
TEST(NvimCMakePlugin, ReportsFailedTestCorrectly) {
int divisor = 0;
ASSERT_EQ(10, 100/divisor);
}
The following program is also exits with the expected exit code:
int main()
{
return 1;
}
I use exit codes that returned by Plenary.Job, so I assume that it's an upstream issue.
from neovim-cmake.
Thanks @Shatur. This fixes the issue, but I don't see complete crash log in CMake build_and_run
output.
In shell I see this extra info Floating point exception (core dumped)
, so it's not super explicit about crash. (exit code 136
vs crashed exit 136
).
from neovim-cmake.
In shell I see this extra info Floating point exception (core dumped)
Not sure why it not displayed... I catching all stdout and stderr.
from neovim-cmake.
Yes indeed both stderr and stdout is captures. Looks like is something to do with the shell (see last arg to subprocess.Popen).
#!/bin/python3
import subprocess
def print_lines(lines):
if lines:
print(lines.decode('utf-8'))
else:
print('None\n')
p = subprocess.Popen('./build/bin/nvim-cmake-plugin-test', stdout=subprocess.PIPE, stderr=subprocess.STDOUT, start_new_session=False, shell=True)
stdout, stderror = p.communicate()
p.wait();
print('shell=True-------------------------------')
print_lines (stdout)
print_lines (stderror)
print ('shell=True exit code', p.returncode)
print('-----------------------------------------')
p = subprocess.Popen('./build/bin/nvim-cmake-plugin-test', stdout=subprocess.PIPE, stderr=subprocess.STDOUT, start_new_session=False, shell=False)
stdout, stderror = p.communicate()
p.wait();
print('shell=False-------------------------------')
print_lines (stdout)
print_lines (stderror)
print ('exit code', p.returncode)
print('-----------------------------------------')
Output
shell=True-------------------------------
update : 0
[==========] Running 2 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 2 tests from NvimCMakePlugin
[ RUN ] NvimCMakePlugin.ReportsNonZeroValueForFailedTest
/home/skamath/Projects/NVimCMakePluginTests/test.cpp:4: Failure
Value of: false
Actual: false
Expected: true
[ FAILED ] NvimCMakePlugin.ReportsNonZeroValueForFailedTest (0 ms)
[ RUN ] NvimCMakePlugin.ReportsCrashedTestIncorrectly
Floating point exception (core dumped)
None
shell=True exit code 136
-----------------------------------------
shell=False-------------------------------
update : 0
[==========] Running 2 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 2 tests from NvimCMakePlugin
[ RUN ] NvimCMakePlugin.ReportsNonZeroValueForFailedTest
/home/skamath/Projects/NVimCMakePluginTests/test.cpp:4: Failure
Value of: false
Actual: false
Expected: true
[ FAILED ] NvimCMakePlugin.ReportsNonZeroValueForFailedTest (0 ms)
[ RUN ] NvimCMakePlugin.ReportsCrashedTestIncorrectly
None
exit code -8
-----------------------------------------
With shell=False even the exit code looks very different. Not sure what to infer from this.
from neovim-cmake.
Can't help you here, Plenary don't have such option: https://github.com/nvim-lua/plenary.nvim/blob/9069d14a120cadb4f6825f76821533f2babcab92/lua/plenary/job.lua#L6
from neovim-cmake.
Related Issues (20)
- Allow customizing of CMake executable
- CMake select_target fails with error HOT 2
- No output after CMake Run HOT 3
- Support lazy loading with vim-plug HOT 5
- Provide a suitable command to run `cmake --install [build_dir]` within neovim HOT 5
- Support the :CTest command HOT 1
- execute command :CMake run, report err HOT 2
- Support for setting environment variables during launch/debug HOT 3
- Pass build_args while executing build_all command HOT 4
- Add support for CMake presets HOT 3
- Add the ability to run program in built-in terminal HOT 4
- Position of the quickfix window HOT 6
- Questions about dap configurations HOT 2
- Integration with 'trouble.nvim'
- 'CMake build_all' does not respect 'build_args' HOT 1
- Breaking change: after 23a63ffd7b709b0f9f407c47523e9bbe322cde37 HOT 7
- API For Fetching Build Targets HOT 7
- The program is not entering the directory HOT 1
- 'run_dir' is not actually missing by default
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neovim-cmake.