@@ -12,6 +12,8 @@ function parseArgs(argv) {
1212 fps : 60 ,
1313 recordingPath : null ,
1414 inputDir : null ,
15+ validate : true ,
16+ requireFormats : [ ] ,
1517 } ;
1618
1719 for ( let i = 2 ; i < argv . length ; i ++ ) {
@@ -51,14 +53,26 @@ function parseArgs(argv) {
5153 options . inputDir = argv [ ++ i ] ?? null ;
5254 continue ;
5355 }
56+ if ( arg === "--skip-validate" ) {
57+ options . validate = false ;
58+ continue ;
59+ }
60+ if ( arg === "--require-formats" ) {
61+ const value = argv [ ++ i ] ?? "" ;
62+ options . requireFormats = value
63+ . split ( "," )
64+ . map ( ( entry ) => entry . trim ( ) . toLowerCase ( ) )
65+ . filter ( Boolean ) ;
66+ continue ;
67+ }
5468 throw new Error ( `Unknown argument: ${ arg } ` ) ;
5569 }
5670
5771 return options ;
5872}
5973
6074function usage ( ) {
61- console . log ( `Usage: node scripts/run-playback-benchmark-matrix.js --platform <name> --gpu <name> --output-dir <dir> [--fps 60] [--recording-path <path>] [--input-dir <path>]
75+ console . log ( `Usage: node scripts/run-playback-benchmark-matrix.js --platform <name> --gpu <name> --output-dir <dir> [--fps 60] [--recording-path <path>] [--input-dir <path>] [--require-formats mp4,fragmented]
6276
6377Runs playback benchmark matrix scenarios and writes JSON outputs.
6478
@@ -70,7 +84,9 @@ Required:
7084Optional:
7185 --fps FPS for benchmark runs (default: 60)
7286 --recording-path Specific recording path
73- --input-dir Recording discovery directory` ) ;
87+ --input-dir Recording discovery directory
88+ --require-formats Required formats for local validation (comma-separated)
89+ --skip-validate Skip post-run validation` ) ;
7490}
7591
7692function run ( command , args ) {
@@ -156,6 +172,26 @@ function main() {
156172 aggregatePath ,
157173 ] ) ;
158174 console . log ( `Aggregate markdown: ${ aggregatePath } ` ) ;
175+
176+ if ( options . validate ) {
177+ const validateArgs = [
178+ "scripts/validate-playback-matrix.js" ,
179+ "--input" ,
180+ options . outputDir ,
181+ "--no-default-matrix" ,
182+ "--require-cell" ,
183+ `${ options . platform } :${ options . gpu } :full` ,
184+ "--require-cell" ,
185+ `${ options . platform } :${ options . gpu } :scrub` ,
186+ ] ;
187+
188+ if ( options . requireFormats . length > 0 ) {
189+ validateArgs . push ( "--require-formats" , options . requireFormats . join ( "," ) ) ;
190+ }
191+
192+ run ( "node" , validateArgs ) ;
193+ console . log ( "Matrix run validation passed" ) ;
194+ }
159195}
160196
161197try {
0 commit comments