0

试图mstest.exe通过 gitlab ci yml 中的 powershell 调用。当我给出路径时,我会C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\mstest.exe powershellC:\program no such cmdlet function exists.

当我在引号中给出路径时,我得到一个无效的 yml 错误:

This GitLab CI configuration is invalid: (<unknown>): found unknown escape character while parsing a quoted scalar at line 26 column 17
test_job:
  stage: test
  variables:
    MSTestPath: "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\mstest.exe"
    TestContainer: "/testcontainer: +$ProjectDLL"
    TestName: "/test:+$TestName"
    TestSettings: "/testsettings: +$TestSettingsPath"
  script:
    - echo "testing..."
    - powershell '&' $MSTestPatch  $TestContainer $TestName $TestSettings
  only:
    - master
  tags:
    - migration

我想在我的跑步者(这是我的 Windows 机器)中使用 gitlab CI 执行我的 mstests,使用 powershell 作为 shell。

4

1 回答 1

0

您可以使用 \"C:\Program Files (x86)\Microsoft Visual Studio 14.0\"

于 2019-09-24T08:03:56.627 回答