Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
aos
GitHub Repository: aos/firecracker
Path: blob/main/tests/integration_tests/style/test_gitlint.py
1958 views
1
# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
# SPDX-License-Identifier: Apache-2.0
3
"""Tests ensuring desired style for commit messages."""
4
5
import os
6
import framework.utils as utils
7
8
9
def test_gitlint():
10
"""Fail if the default gitlint rules do not apply."""
11
os.environ['LC_ALL'] = 'C.UTF-8'
12
os.environ['LANG'] = 'C.UTF-8'
13
try:
14
utils.run_cmd('gitlint --commits origin/main..HEAD'
15
' -C ../.gitlint'
16
' --extra-path framework/gitlint_rules.py')
17
except ChildProcessError as error:
18
assert False, "Commit message violates gitlint rules: {}".format(error)
19
20