mirror of
https://github.com/rust-vmm/rust-vmm-ci.git
synced 2026-08-05 03:08:31 +00:00
Add test for commit message format
Added test that checks if commits follow the 50/72 git commit rule and if they are signed (git commit -s). Fixes: #9, #14. Signed-off-by: Laura Loghin <lauralg@amazon.com>
This commit is contained in:
committed by
Andreea Florescu
parent
fe859f4f75
commit
abd2c90d9f
@@ -1,6 +1,8 @@
|
||||
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
|
||||
def get_repo_root_path():
|
||||
@@ -9,3 +11,11 @@ def get_repo_root_path():
|
||||
rust_vmm_ci_path = os.path.dirname(integration_tests_path)
|
||||
|
||||
return os.path.dirname(rust_vmm_ci_path)
|
||||
|
||||
|
||||
def get_cmd_output(cmd):
|
||||
"""Returns stdout content of `cmd` command."""
|
||||
cmd_out = subprocess.run(cmd, shell=True, check=True,
|
||||
stdout=subprocess.PIPE)
|
||||
stdout = cmd_out.stdout.decode('utf-8')
|
||||
return stdout
|
||||
|
||||
Reference in New Issue
Block a user