@@ -93,33 +93,40 @@ def expected_from_artifacts(build_root: Path) -> dict[tuple[str, str, str, str],
9393 test_type = m .group (2 )
9494 print (f"[DEBUG] Artifact group target={ target } type={ test_type } dir={ artifact_dir } " , file = sys .stderr )
9595
96- # Group build*.tmp directories by sketch to avoid processing same ci.yml multiple times
96+ # Group build*.tmp directories by sketch
9797 # Structure: test-bin-<target>-<type>/<sketch>/build*.tmp/
9898 sketches_processed = set ()
9999
100- for ci_path in artifact_dir .rglob ("ci.yml" ):
101- if not ci_path .is_file ():
100+ # Find all build*.tmp directories and process each sketch once
101+ for build_tmp in artifact_dir .rglob ("build*.tmp" ):
102+ if not build_tmp .is_dir ():
102103 continue
103- build_tmp = ci_path .parent
104104 if not re .search (r"build\d*\.tmp$" , build_tmp .name ):
105105 continue
106106
107- # Path structure is: test-bin-<target>-<type>/<sketch>/build*.tmp/ci.yml
107+ # Path structure is: test-bin-<target>-<type>/<sketch>/build*.tmp/
108108 sketch = build_tmp .parent .name
109109
110- # Skip if we already processed this sketch (same ci.yml in multiple build*.tmp)
110+ # Skip if we already processed this sketch
111111 if sketch in sketches_processed :
112112 continue
113113 sketches_processed .add (sketch )
114114
115115 print (f"[DEBUG] Processing sketch={ sketch } from artifact { artifact_dir .name } " , file = sys .stderr )
116116
117+ ci_path = build_tmp / "ci.yml"
117118 sdk_path = build_tmp / "sdkconfig"
118- try :
119- ci_text = ci_path .read_text (encoding = "utf-8" )
120- except Exception as e :
121- print (f"[DEBUG] Skip (failed to read ci.yml: { e } )" , file = sys .stderr )
122- continue
119+
120+ # Read ci.yml if it exists, otherwise use empty (defaults)
121+ ci_text = ""
122+ if ci_path .exists ():
123+ try :
124+ ci_text = ci_path .read_text (encoding = "utf-8" )
125+ except Exception as e :
126+ print (f"[DEBUG] Warning: failed to read ci.yml: { e } " , file = sys .stderr )
127+ else :
128+ print (f"[DEBUG] No ci.yml found, using defaults" , file = sys .stderr )
129+
123130 try :
124131 sdk_text = sdk_path .read_text (encoding = "utf-8" , errors = "ignore" ) if sdk_path .exists () else ""
125132 except Exception :
0 commit comments