@@ -226,7 +226,7 @@ class instance {
226
226
this . jwtFiles = null ;
227
227
228
228
this . sanOptions = _ . clone ( this . options . sanOptions ) ;
229
- this . sanFiles = [ ] ;
229
+ this . sanitizerLogPaths = { } ;
230
230
231
231
this . _makeArgsArangod ( ) ;
232
232
@@ -473,8 +473,9 @@ class instance {
473
473
}
474
474
for ( const [ key , value ] of Object . entries ( this . sanOptions ) ) {
475
475
let oneLogFile = fs . join ( rootDir , key . toLowerCase ( ) . split ( '_' ) [ 0 ] + '.log' ) ;
476
+ const origPath = this . sanOptions [ key ] [ 'log_path' ] ;
476
477
this . sanOptions [ key ] [ 'log_path' ] = oneLogFile ;
477
- this . sanFiles . push ( oneLogFile ) ;
478
+ this . sanitizerLogPaths [ key ] = { upstream : origPath , local : oneLogFile } ;
478
479
}
479
480
}
480
481
}
@@ -789,23 +790,30 @@ class instance {
789
790
} ;
790
791
791
792
fetchSanFileAfterExit ( ) {
792
- if ( this . options . isSan ) {
793
- this . sanFiles . forEach ( fileName => {
794
- let fn = `${ fileName } .arangod.${ this . pid } ` ;
795
- if ( this . options . extremeVerbosity ) {
796
- print ( `checking for ${ fn } : ${ fs . exists ( fn ) } ` ) ;
793
+ if ( ! this . options . isSan ) {
794
+ return ;
795
+ }
796
+
797
+ for ( const [ key , value ] of Object . entries ( this . sanitizerLogPaths ) ) {
798
+ const { upstream, local } = value ;
799
+ let fn = `${ local } .arangod.${ this . pid } ` ;
800
+ if ( this . options . extremeVerbosity ) {
801
+ print ( `checking for ${ fn } : ${ fs . exists ( fn ) } ` ) ;
802
+ }
803
+ if ( fs . exists ( fn ) ) {
804
+ let content = fs . read ( fn ) ;
805
+ if ( upstream ) {
806
+ fs . write ( `${ upstream } .arangod.${ this . pid } ` , content ) ;
797
807
}
798
- if ( fs . exists ( fn ) ) {
799
- let content = fs . read ( fn ) ;
800
- if ( content . length > 10 ) {
801
- crashUtils . GDB_OUTPUT += `Report of '${ this . name } ' in ${ fn } contains: \n` ;
802
- crashUtils . GDB_OUTPUT += content ;
803
- this . serverCrashedLocal = true ;
804
- }
808
+ if ( content . length > 10 ) {
809
+ crashUtils . GDB_OUTPUT += `Report of '${ this . name } ' in ${ fn } contains: \n` ;
810
+ crashUtils . GDB_OUTPUT += content ;
811
+ this . serverCrashedLocal = true ;
805
812
}
806
- } ) ;
813
+ }
807
814
}
808
815
}
816
+
809
817
waitForExitAfterDebugKill ( ) {
810
818
// Crashutils debugger kills our instance, but we neet to get
811
819
// testing.js sapwned-PID-monitoring adjusted.
0 commit comments