rosie-ci.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:rosie-ci 作者: adafruit 项目源码 文件源码
def finish_test(results, repo, ref):
    base_repo = redis.get("source:" + repo).decode("utf-8")
    l = redis.lock(base_repo)
    l.local.token = results[0][0]
    print("releasing lock " + base_repo)
    try:
        l.release()
    except redis.exceptions.LockError:
        print("lock already released")

    test_config_ok = True
    tests_ok = True
    for result in results:
        test_config_ok = test_config_ok and result[1]
        tests_ok = tests_ok and result[2]

    if not test_config_ok:
        final_status(repo, ref, "error", "An error occurred while running the tests.")
    elif not tests_ok:
        final_status(repo, ref, "failure", "One or more tests failed.")
    else:
        final_status(repo, ref, "success", "All tests passed.")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号