开发者

Post build testing with omake

开发者 https://www.devze.com 2022-12-08 00:39 出处:网络
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 suc开发者_C百科cessful, but am not sure of the best way to do this.You can a

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 suc开发者_C百科cessful, but am not sure of the best way to do this.


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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消