-
Notifications
You must be signed in to change notification settings - Fork 59
test-case/check-audio-equalizer.sh: Restore config after test #1288
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
Conversation
|
Can one of the admins verify this patch?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, the code is much more readable now.
One comment though, please change the commit title from test-case/check-audio-equalizer.sh: Restore config after test to test-case: check-audio-equalizer.sh: Restore config after test
7fe64cc to
53c4d5a
Compare
53c4d5a to
1c931e6
Compare
1c931e6 to
d4a05f4
Compare
|
@golowanow I applied your suggestions. Could you take a look again? |
marc-hb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor codestyle suggestions
test-case/check-audio-equalizer.sh
Outdated
|
|
||
| if [ $ret -ne 0 ]; then | ||
| dloge "Equalizer test failure with $conf" | ||
| return 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[ "$ret" -eq 0 ] || die ...d4a05f4 to
2f95066
Compare
|
@marc-hb Fixed, could you look again? |
test-case/check-audio-equalizer.sh
Outdated
|
|
||
| sof-ctl -Dhw:"$sofcard" -c name="$double_quoted_id" -s "$eq_last_conf" || die "Failed to restore equalizer config from $eq_last_conf" | ||
|
|
||
| [ "$ret" -eq 0 ] || die "Equalizer test failure with $conf" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| [ "$ret" -eq 0 ] || die "Equalizer test failure with $conf" | |
| [ "$ret" -eq 0 ] || die "$cmd with $conf returned $ret" |
test-case/check-audio-equalizer.sh
Outdated
| $cmd -D "$dev" -f "$fmt" -c "$channel" -r "$rate" -d "$duration" "$dummy_file" || ret=$? | ||
|
|
||
| [ -r "$eq_last_conf" ] || | ||
| die "Failed to read equalizer config from $eq_last_conf" | ||
|
|
||
| sof-ctl -Dhw:"$sofcard" -c name="$double_quoted_id" -s "$eq_last_conf" || die "Failed to restore equalizer config from $eq_last_conf" | ||
|
|
||
| [ "$ret" -eq 0 ] || die "Equalizer test failure with $conf" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| $cmd -D "$dev" -f "$fmt" -c "$channel" -r "$rate" -d "$duration" "$dummy_file" || ret=$? | |
| [ -r "$eq_last_conf" ] || | |
| die "Failed to read equalizer config from $eq_last_conf" | |
| sof-ctl -Dhw:"$sofcard" -c name="$double_quoted_id" -s "$eq_last_conf" || die "Failed to restore equalizer config from $eq_last_conf" | |
| [ "$ret" -eq 0 ] || die "Equalizer test failure with $conf" | |
| $cmd -D "$dev" -f "$fmt" -c "$channel" -r "$rate" -d "$duration" "$dummy_file" || ret=$? | |
| [ -r "$eq_last_conf" ] || | |
| die "Failed to read equalizer config from $eq_last_conf" | |
| sof-ctl -Dhw:"$sofcard" -c name="$double_quoted_id" -s "$eq_last_conf" || die "Failed to restore equalizer config from $eq_last_conf" | |
| [ "$ret" -eq 0 ] || return 1 |
to keep the current expectation at the caller function.
|
@PLangowski - I don't see results from this changed test probe on our CI, please run it there and let me know where to check. |
Save the initial equalizer config to a temporary file and restore it after each test Signed-off-by: Pawel Langowski <pawelx.langowski@intel.com>
2f95066 to
b65cd74
Compare
|
@golowanow I'm not sure if it's possible to run a test on CI before merging it. Do you know how to do that? |
Restore the equalizer config to its previous state after test