Any way to skip unit tests for certain build configs?

liam.kennedy's Avatar

liam.kennedy

15 Mar, 2017 05:42 PM

Hey

Is there any way to not run unit tests for a certain build configuration?

Liam

  1. 1 Posted by Ilya Finkelshte... on 15 Mar, 2017 06:11 PM

    Ilya Finkelshteyn's Avatar

    You can switch from auto discovery to test script and call tests for specific configuration. YAML part might look like this:

    test_script:
    - ps: IF ($envCONFIGURATION -eq "Release") {<test_command_appveyor_calls>}
    

    <test_command_appveyor_calls> is what AppVeyor is calling when tests are auto-discovered. Or you can create .ps1 test script and call it here.

    Also if you decide to switch to test script, you will be needed to upload test results to AppVeyor, according to documentation

    Thanks!
    Ilya.

  2. 2 Posted by liam.kennedy on 16 Mar, 2017 11:46 AM

    liam.kennedy's Avatar

    why do the following test scripts produce no output?

    test_script:
    - ps: write-host $envCONFIGURATION

    test_script:
    - ps: write-host $CONFIGURATION

    Liam

  3. 3 Posted by liam.kennedy on 16 Mar, 2017 11:51 AM

    liam.kennedy's Avatar

    ah, got it: $env:CONFIGURATION

  4. 4 Posted by liam.kennedy on 16 Mar, 2017 12:02 PM

    liam.kennedy's Avatar

    Working fine now.

    Thanks!

  5. liam.kennedy closed this discussion on 16 Mar, 2017 12:02 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