C++ how to run tests optionally

acgetchell's Avatar

acgetchell

21 Oct, 2019 09:14 PM

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?

  1. 1 Posted by acgetchell on 21 Oct, 2019 09:20 PM

    acgetchell's Avatar

    N.B. I've tried on_success and on_finish.

  2. 2 Posted by acgetchell on 21 Oct, 2019 09:42 PM

    acgetchell's Avatar

    In Travis-CI, after_success allows this functionality.

    https://travis-ci.com/acgetchell/CDT-test/jobs/248066114#L3020

  3. Support Staff 3 Posted by Feodor Fitsner on 22 Oct, 2019 12:16 AM

    Feodor Fitsner's Avatar

    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. 4 Posted by acgetchell on 22 Oct, 2019 05:51 PM

    acgetchell's Avatar

    Great, thanks! make --build . --target test & exit 0 worked!

    Powershell still failed the build.

  5. Support Staff 5 Posted by Feodor Fitsner on 22 Oct, 2019 06:47 PM

    Feodor Fitsner's Avatar

    OK, nice. Most probably PowerShell was failing because the process was writing to StdErr which is interpreted by PS as an exception.

  6. Feodor Fitsner closed this discussion on 03 Apr, 2020 06:45 PM.

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

Recent Discussions

07 Jul, 2020 06:21 PM
07 Jul, 2020 03:15 PM
05 Jul, 2020 02:33 AM
03 Jul, 2020 07:29 PM
03 Jul, 2020 03:53 AM

 

02 Jul, 2020 09:09 PM
02 Jul, 2020 03:24 PM
01 Jul, 2020 01:12 PM
30 Jun, 2020 04:26 PM
25 Jun, 2020 05:54 PM
24 Jun, 2020 08:11 AM