File tree Expand file tree Collapse file tree 1 file changed +22
-8
lines changed
src/tests/nativeaot/SmokeTests/DwarfDump Expand file tree Collapse file tree 1 file changed +22
-8
lines changed Original file line number Diff line number Diff line change @@ -50,23 +50,37 @@ public static int Main(string[] args)
5050 } ) ;
5151
5252 // Just count the number of warnings and errors. There are so many right now that it's not worth enumerating the list
53- #if DEBUG
54- const int MinWarnings = 2000 ;
55- const int MaxWarnings = 4000 ;
56- #else
57- const int MinWarnings = 3000 ;
58- const int MaxWarnings = 5000 ;
59- #endif
53+ const int MinWarnings = 15 ;
54+ const int MaxWarnings = 150 ;
6055 int count = 0 ;
56+ bool foundIlCpp = false ;
57+ bool insideIlCpp = false ;
6158 string line ;
6259 while ( ( line = proc . StandardOutput . ReadLine ( ) ) != null )
6360 {
64- if ( line . Contains ( "warning:" ) || line . Contains ( "error:" ) )
61+ if ( line . StartsWith ( "Verifying unit:" ) )
62+ {
63+ if ( line . EndsWith ( "\" il.cpp\" " ) )
64+ {
65+ foundIlCpp = true ;
66+ insideIlCpp = true ;
67+ }
68+ else
69+ {
70+ insideIlCpp = false ;
71+ }
72+ }
73+ if ( ( line . Contains ( "warning:" ) || line . Contains ( "error:" ) ) && insideIlCpp )
6574 {
6675 count ++ ;
6776 }
6877 }
6978
79+ if ( ! foundIlCpp )
80+ {
81+ Console . Error . WriteLine ( $ "llvm-dwarfdump failed. Cound not find unit named \" il.cpp\" .") ;
82+ return 10 ;
83+ }
7084
7185 if ( count == 0 )
7286 {
You can’t perform that action at this time.
0 commit comments