File tree 3 files changed +20
-4
lines changed
3 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 5
5
* .tgz
6
6
* .log
7
7
/out /
8
+ /src /* .js
Original file line number Diff line number Diff line change @@ -49,9 +49,16 @@ class CMakeTests {
49
49
child . stdout . on ( "data" , ( chunk ) => {
50
50
output += chunk . toString ( ) ;
51
51
} ) ;
52
- child . on ( "exit " , ( code ) => {
52
+ child . on ( "close " , ( code ) => {
53
53
if ( code === 0 ) {
54
- resolve ( this . ctestJsonToList ( output ) ) ;
54
+ if ( output . length == 0 ) {
55
+ console . error ( "ctestJsonToList: Empty json output. Command was ctest --show-only=json-v1 , in " +
56
+ this . buildDirPath ) ;
57
+ reject ( new Error ( "Failed to get ctest JSON output" ) ) ;
58
+ }
59
+ else {
60
+ resolve ( this . ctestJsonToList ( output ) ) ;
61
+ }
55
62
}
56
63
else {
57
64
reject ( new Error ( "Failed to run ctest" ) ) ;
Original file line number Diff line number Diff line change @@ -44,9 +44,17 @@ export class CMakeTests {
44
44
output += chunk . toString ( ) ;
45
45
} ) ;
46
46
47
- child . on ( "exit " , ( code ) => {
47
+ child . on ( "close " , ( code ) => {
48
48
if ( code === 0 ) {
49
- resolve ( this . ctestJsonToList ( output ) ) ;
49
+ if ( output . length == 0 ) {
50
+ console . error (
51
+ "ctestJsonToList: Empty json output. Command was ctest --show-only=json-v1 , in " +
52
+ this . buildDirPath ,
53
+ ) ;
54
+ reject ( new Error ( "Failed to get ctest JSON output" ) ) ;
55
+ } else {
56
+ resolve ( this . ctestJsonToList ( output ) ) ;
57
+ }
50
58
} else {
51
59
reject ( new Error ( "Failed to run ctest" ) ) ;
52
60
}
You can’t perform that action at this time.
0 commit comments