File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ static void Main(string[] args)
2727 var cSharpcodeExecutor = new CSharpCodeExecutor ( "" , "" , false ) ;
2828 var jsCodeExecutor = new JavaScriptCodeExecutor ( ) ;
2929 var testOutput = new StringBuilder ( ) ;
30+ var testOutputDirectory = Path . Combine ( Directory . GetCurrentDirectory ( ) , "Outputs" ) ;
3031 foreach ( var test in tests )
3132 {
3233 Console . WriteLine ( $ "Executing test : { test . FileName } , code type : { test . CodeType } ") ;
@@ -54,8 +55,11 @@ static void Main(string[] args)
5455 testOutput . AppendLine ( ) ;
5556 Console . WriteLine ( ) ;
5657 }
57-
58- var filePath = Path . Combine ( Directory . GetCurrentDirectory ( ) , DateTime . UtcNow . ToString ( "yyyyMMddHHmmssffff" ) + ".txt" ) ;
58+ if ( ! Directory . Exists ( testOutputDirectory ) )
59+ {
60+ Directory . CreateDirectory ( testOutputDirectory ) ;
61+ }
62+ var filePath = Path . Combine ( testOutputDirectory , DateTime . UtcNow . ToString ( "yyyyMMddHHmmssffff" ) + ".txt" ) ;
5963 File . WriteAllText ( filePath , testOutput . ToString ( ) ) ;
6064 Console . WriteLine ( $ "Test output is generated at { filePath } ") ;
6165 }
You can’t perform that action at this time.
0 commit comments