File tree Expand file tree Collapse file tree
tests/FlowTime.Adapters.Synthetic.Tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11using FlowTime . Adapters . Synthetic ;
2+ using System . Linq ;
23using Xunit ;
34
45namespace FlowTime . Adapters . Synthetic . Tests ;
@@ -40,10 +41,19 @@ public async Task CanReadCliProducedArtifacts()
4041 throw new Exception ( $ "CLI failed: { error } ") ;
4142 }
4243
43- // Extract the run directory from output
44- var outputLine = output . Trim ( ) ;
45- var runPath = outputLine . Replace ( "Wrote artifacts to " , "" ) ;
46-
44+ // Extract the run directory from output (ignore build warnings/noise)
45+ var outputLines = output
46+ . Split ( new [ ] { '\r ' , '\n ' } , StringSplitOptions . RemoveEmptyEntries )
47+ . Select ( line => line . Trim ( ) ) ;
48+
49+ var runPathLine = outputLines . LastOrDefault ( line => line . StartsWith ( "Wrote artifacts to " ) ) ;
50+ if ( string . IsNullOrWhiteSpace ( runPathLine ) )
51+ {
52+ throw new Exception ( $ "CLI output did not include run directory. STDOUT: { output } \n STDERR: { error } ") ;
53+ }
54+
55+ var runPath = runPathLine [ "Wrote artifacts to " . Length ..] . Trim ( ) ;
56+
4757 try
4858 {
4959 // Use our adapter to read the CLI artifacts
You can’t perform that action at this time.
0 commit comments