使用 omake 进行构建后测试

发布于 2024-08-08 01:21:05 字数 73 浏览 4 评论 0原文

有什么方法可以将构建后命令添加到 omakefile 中吗?我希望它在每次构建成功时自动运行单元测试,但不确定执行此操作的最佳方法。

Is there any way to add a post build command to an omakefile? I want it to automatically run unit tests everytime a build is successful, but am not sure of the best way to do this.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

寻梦旅人 2024-08-15 01:21:05

您可以将命令添加到 .DEFAULT 目标。例如:

FILES[] =
    ...

CXXProgram(unittests, $(FILES))

.DEFAULT: unittests$(EXE)
    ./unittests$(EXE)

当在没有任何特定目标的情况下调用时,Omake 将构建所有默认目标,然后运行关联的命令。

You can add commands to the .DEFAULT target. For example:

FILES[] =
    ...

CXXProgram(unittests, $(FILES))

.DEFAULT: unittests$(EXE)
    ./unittests$(EXE)

When invoked without any particular target, Omake will build all default targets, then run associated commands.

囍笑 2024-08-15 01:21:05

我认为您可以使用 .BUILD_SUCCESS 和 .BUILD_FAILURE 目标来实现此目的。
请参阅此处了解详细信息。

I think you can use .BUILD_SUCCESS and .BUILD_FAILURE targets for that purpose.
See details here.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文