【发布时间】:2025-12-12 05:55:02
【问题描述】:
我目前正在用 C (https://github.com/Srekel/sralloc) 编写一个开源库,并且正在运行一个简单的单元测试解决方案/项目。它使用一个简单的 C 单元测试框架并生成一个 unittest.exe 打印出结果并根据是否成功返回 1 或 0。
我的问题是我不确定如何配置 Appveyor 以在构建后运行此可执行文件。 Appveyor 可执行文件生成于C:\projects\sralloc\examples\Build\x64_Debug\unittest.exe
所以我尝试了这个:
test_script:
- '%APPVEYOR_BUILD_FOLDER%\examples\build\%PLATFORM%_%CONFIGURATION%\unittest.exe'
但是 Appveyor 说:The system cannot find the path specified.
我在网上搜索了相当多的东西,但没有真正找到任何东西。
这是我的完整 appveyor.xml
version: 1.0.{build}
image: Visual Studio 2017
configuration:
- Debug
- Release
build:
parallel: true
project: examples/sralloc.sln
test_script:
- '%APPVEYOR_BUILD_FOLDER%\examples\build\%PLATFORM%_%CONFIGURATION%\unittest.exe'
【问题讨论】:
标签: c unit-testing appveyor