Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add commit info. to test.log #150

Open
hiption opened this issue Feb 24, 2025 · 0 comments
Open

add commit info. to test.log #150

hiption opened this issue Feb 24, 2025 · 0 comments

Comments

@hiption
Copy link

hiption commented Feb 24, 2025

Hi all

Including commit information in test.log would be beneficial for traceability.

There are two options for adding commit information to test.log

Option 1 : Using popen
popen("git rev-parse HEAD", "r")

Option 2 : Using CMAKE
execute_process(
COMMAND git rev-parse HEAD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_COMMIT_SHA
OUTPUT_STRIP_TRAILING_WHITESPACE
)
add_definitions(-DGIT_COMMIT_SHA="${GIT_COMMIT_SHA}")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant