Skip to content

lib.sh: log git version of the tests at the start of every test - #544

Closed
marc-hb wants to merge 1 commit into
thesofproject:mainfrom
marc-hb:log-git-version
Closed

marc-hb wants to merge 1 commit into
thesofproject:mainfrom
marc-hb:log-git-version

Conversation

@marc-hb

@marc-hb marc-hb commented Dec 2, 2020

Copy link
Copy Markdown
Collaborator

While there is generally in test results some version information about
firmware and kernel (except for force-pushes, merges with target
branch,... I digress) we had absolutely none about the version of
sof-test itself. This made it very difficult to monitor sof-test fixes
and other sof-test changes. This is also useful when someone shares the
log of a local test run.

Signed-off-by: Marc Herbert marc.herbert@intel.com

While there is generally in test results some version information about
firmware and kernel (except for force-pushes, merges with target
branch,... I digress) we had absolutely none about the version of
sof-test itself. This made it very difficult to monitor sof-test fixes
and other sof-test changes. This is also useful when someone shares the
log of a local test run.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
@marc-hb
marc-hb marked this pull request as ready for review December 2, 2020 22:10
@marc-hb
marc-hb requested a review from a team as a code owner December 2, 2020 22:10
@xiulipan

xiulipan commented Dec 3, 2020

Copy link
Copy Markdown
Contributor

@marc-hb This version logging looks good. Could you help to check

sof-test/case-lib/opt.sh

Lines 144 to 156 in 8a21c09

[ "${OPT_VALUE_lst['h']}" -eq 1 ] && _func_opt_dump_help
# record the full parameter to the cmd
if [[ ! -f "$LOG_ROOT/version.txt" ]] && [[ -f "$SCRIPT_HOME/.git/config" ]]; then
{
printf "Command:\n"
[[ "$TPLG" ]] && printf "TPLG=%s" "$TPLG "
printf '%s %s' "$SCRIPT_NAME" "$SCRIPT_PRAM"
printf 'Branch:\n'
git -C "$SCRIPT_HOME" branch
printf 'Commit:\n'
git -C "$SCRIPT_HOME" log --branches --oneline -n 5
} >> "$LOG_ROOT/version.txt"
fi

And make some update and unify for the version dump to file feature?

@marc-hb

marc-hb commented Dec 3, 2020 •

Copy link
Copy Markdown
Collaborator Author

Thanks, I did not notice that. Will take a look.

EDIT: https://sof-ci.01.org/softestpr/PR544/build483/devicetest is all green

@marc-hb

marc-hb commented May 13, 2021

Copy link
Copy Markdown
Collaborator Author

SOFCI TEST

@plbossart

Copy link
Copy Markdown
Member

@marc-hb is this still relevant? I see no update since December but a test run mid-May?

@marc-hb

marc-hb commented Jun 24, 2021

Copy link
Copy Markdown
Collaborator Author

There is a similar "version" tab in Jenkins results now, example:
https://sof-ci.01.org/sofpr/PR4389/build9449/devicetest/?model=GLK_BOB_DA7219&testcase=verify-tplg-binary

It's Jenkins-specific but probably enough, closing.

@marc-hb marc-hb closed this Jun 24, 2021
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

Successfully merging this pull request may close these issues.

3 participants