C++ how to run tests optionally
I have some tests that may fail/segfault, which causes a build failure:
https://ci.appveyor.com/project/acgetchell/cdt-test/builds/28271980...
Is there a way to run make --build . --target test
such that errors or segfaults don't cause a build failure?
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by acgetchell on 21 Oct, 2019 09:20 PM
N.B. I've tried
on_success
andon_finish
.2 Posted by acgetchell on 21 Oct, 2019 09:42 PM
In Travis-CI,
after_success
allows this functionality.https://travis-ci.com/acgetchell/CDT-test/jobs/248066114#L3020
Support Staff 3 Posted by Feodor Fitsner on 22 Oct, 2019 12:16 AM
Right, in AppVeyor failing command in
on_success
fails the build.However, you may try something like
make --build . --target test & exit 0
or run it as PowerShell:- ps: make --build . --target test
.4 Posted by acgetchell on 22 Oct, 2019 05:51 PM
Great, thanks!
make --build . --target test & exit 0
worked!Powershell still failed the build.
Support Staff 5 Posted by Feodor Fitsner on 22 Oct, 2019 06:47 PM
OK, nice. Most probably PowerShell was failing because the process was writing to StdErr which is interpreted by PS as an exception.
Feodor Fitsner closed this discussion on 03 Apr, 2020 06:45 PM.