2017-09-08 3 views
1

Visual Studio의 디버그 빌드 구성에 대해 CTest에서 특정 테스트를 제외하려고합니다. 내 생각은AppVeyor에서 빌드 구성 종속 변수를 설정하는 방법

matrix: 
    - configuration: Release 
    environment: 
     EXCLUDETESTS: "" 
    - configuration: Debug 
    environment: 
     EXCLUDETESTS: "solver" 

구성EXCLUDETESTS라는 해당 문자열 환경 변수를 생성처럼 뭔가를했다. 하지만이 구문은 http://yaml-online-parser.appspot.com/

전체 appveyor.yml 파일에 따라 잘되어야하지만, 나에게 Error parsing appveyor.yml: "matrix" section must be a mapping. (Line: 15, Column: 3)을 제공

version: "{build}" 

os: 
    - Visual Studio 2017 
    - Visual Studio 2015 

# x64 is a CMake-compatible solution platform name. 
# This allows us to pass %PLATFORM% to CMake -A. 
platform: 
    - x64 

# Build Configurations, i.e. Debug, Release, etc. 
# EXCLUDETESTS determines which tests will not be run 
matrix: 
    - configuration: Release 
    environment: 
     EXCLUDETESTS: "" 
    - configuration: Debug 
    environment: 
     EXCLUDETESTS: "solver" 

environment: 
    - PYTHON: "C:\\Python36-x64" 

# Cmake will autodetect the compiler, but we set the arch 
before_build: 
    - set PATH=%PYTHON%;%PATH% 
    - set CXXFLAGS=%additional_flags% 
    - cmake -H. -BBuild -A%PLATFORM% -DUI_CXX_USE_QT=OFF 

# Build with MSBuild 
build: 
    project: Build\spirit.sln # path to Visual Studio solution or project 
    parallel: true   # enable MSBuild parallel builds 
    verbosity: normal   # MSBuild verbosity level {quiet|minimal|normal|detailed} 

install: 
    - "%PYTHON%/Scripts/pip.exe install numpy" 

test_script: 
    - cd Build 
    - ctest --output-on-failure -C %CONFIGURATION% -E %EXCLUDETESTS% 

답변

1

Exclude configuration from the matrix을 확인하시기 바랍니다 읽습니다. 이와 같은 것이 당신을 위해 일해야합니다 :

configuration: 
- Debug 
- Release 

environment: 
    matrix: 
    - EXCLUDETESTS: solver 
    - EXCLUDETESTS: 

matrix: 
    exclude: 
    - configuration: Release 
     EXCLUDETESTS: solver 
    - configuration: Debug 
     EXCLUDETESTS: