tag:help.appveyor.com,2012-11-13:/discussions/questions/42970-c-how-to-run-tests-optionallyAppVeyor: Discussion 2020-04-03T18:45:52Ztag:help.appveyor.com,2012-11-13:Comment/477529212019-10-21T21:20:55Z2019-10-21T21:20:55ZC++ how to run tests optionally<div><p>N.B. I've tried <code>on_success</code> and <code>on_finish</code>.</p></div>acgetchelltag:help.appveyor.com,2012-11-13:Comment/477529212019-10-21T21:42:18Z2019-10-21T22:29:15ZC++ how to run tests optionally<div><p>In Travis-CI, <code>after_success</code> allows this functionality.</p>
<p><a href="https://travis-ci.com/acgetchell/CDT-test/jobs/248066114#L3020">https://travis-ci.com/acgetchell/CDT-test/jobs/248066114#L3020</a></p></div>acgetchelltag:help.appveyor.com,2012-11-13:Comment/477529212019-10-22T00:16:11Z2019-10-22T00:16:11ZC++ how to run tests optionally<div><p>Right, in AppVeyor failing command in <code>on_success</code> fails the build.</p>
<p>However, you may try something like <code>make --build . --target test & exit 0</code> or run it as PowerShell: <code>- ps: make --build . --target test</code>.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/477529212019-10-22T17:51:20Z2019-10-22T17:51:39ZC++ how to run tests optionally<div><p>Great, thanks! <code>make --build . --target test & exit 0</code> worked!</p>
<p>Powershell still failed the build.</p></div>acgetchelltag:help.appveyor.com,2012-11-13:Comment/477529212019-10-22T18:47:55Z2019-10-22T18:47:55ZC++ how to run tests optionally<div><p>OK, nice. Most probably PowerShell was failing because the process was writing to StdErr which is interpreted by PS as an exception.</p></div>Feodor Fitsner