Update UCM validation
Run on pull requests and check for empty EnableSequence and DisableSequencepull/4/head
parent
99f82355cd
commit
9513c2ce94
|
@ -3,6 +3,7 @@ name: Validate UCM
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ["main"]
|
branches: ["main"]
|
||||||
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
validate:
|
validate:
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Script to check each HiFi file for any keywords from the ChromeOS UCM
|
# Script to check each HiFi file for any keywords from the ChromeOS UCM
|
||||||
# that should have been removed
|
# that should have been removed, and also checks for any empty EnableSequence
|
||||||
|
# and disable Sequence lines
|
||||||
|
|
||||||
failed=0
|
failed=0
|
||||||
filtered_keywords=('cdev' 'FullySpecifiedUCM' 'DspName' 'sof' 'JackDev' 'JackSwitch' 'Line Out' 'CaptureChannelMap' 'IntrinsicSensitivity')
|
filtered_keywords=('cdev' 'FullySpecifiedUCM' 'DspName' 'sof' 'JackDev' 'JackSwitch' 'Line Out' 'CaptureChannelMap' 'IntrinsicSensitivity')
|
||||||
|
@ -10,6 +11,9 @@ for keyword in "${filtered_keywords[@]}"; do
|
||||||
find -name "HiFi*.conf" -exec grep "${keyword}" {} + && failed=1
|
find -name "HiFi*.conf" -exec grep "${keyword}" {} + && failed=1
|
||||||
done
|
done
|
||||||
|
|
||||||
|
find -name "HiFi*.conf" -exec pcregrep -M 'EnableSequence \[(\n|.)\t\]' {} + && failed=1
|
||||||
|
find -name "HiFi*.conf" -exec pcregrep -M 'DisableSequence \[(\n|.)\t\]' {} + && failed=1
|
||||||
|
|
||||||
if [ $failed = 1 ]; then
|
if [ $failed = 1 ]; then
|
||||||
echo "UCM validation failed"
|
echo "UCM validation failed"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in New Issue