gpt4 book ai didi

makefile - GNU make : inverting sub-process success?

转载 作者:行者123 更新时间:2023-12-02 12:49:52 25 4
gpt4 key购买 nike

我有一个脚本系统的 make 文件,其中有很多应该通过的测试。每个测试都是对脚本应用程序的单独调用:

#----------------------------------------------------------------------------
# run test scripts in the module::test
#----------------------------------------------------------------------------
scripted_tests: bin/kin modules/test/actor_equality.kin modules/test/actor_fibre.kin ...
bin/kin modules/test/actor_equality.kin
bin/kin modules/test/actor_fibre.kin
...

这很好。我也有一些类似的测试应该返回失败。我知道 - 将忽略返回状态,但必须有一些简单的方法可以反转返回状态,以便我可以运行

#----------------------------------------------------------------------------
# run test scripts in the module::test::errors
#----------------------------------------------------------------------------
inverse_tests: bin/kin modules/test/error/bad_function.kin ...
not bin/kin modules/test/error/bad_function.kin
...

最佳答案

使用!命令。

echo This returns success
! echo This returns failure

关于makefile - GNU make : inverting sub-process success?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1545985/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com