@@ -67,6 +67,7 @@ describe('Remote queries', function() {
67
67
const fileUri = getFile ( 'data-remote-qlpack/in-pack.ql' ) ;
68
68
69
69
const queryPackRootDir = ( await runRemoteQuery ( cli , credentials , fileUri , true , progress , token ) ) ! ;
70
+ printDirectoryContents ( queryPackRootDir ) ;
70
71
71
72
// to retrieve the list of repositories
72
73
expect ( showQuickPickSpy ) . to . have . been . calledOnce ;
@@ -77,6 +78,8 @@ describe('Remote queries', function() {
77
78
expect ( fs . readdirSync ( queryPackRootDir ) . find ( f => f . startsWith ( 'qlpack-' ) && f . endsWith ( '-generated.tgz' ) ) ) . not . to . be . undefined ;
78
79
79
80
const queryPackDir = path . join ( queryPackRootDir , 'query-pack' ) ;
81
+ printDirectoryContents ( queryPackDir ) ;
82
+
80
83
// in-pack.ql renamed to query.ql
81
84
expect ( fs . existsSync ( path . join ( queryPackDir , 'query.ql' ) ) ) . to . be . true ;
82
85
expect ( fs . existsSync ( path . join ( queryPackDir , 'lib.qll' ) ) ) . to . be . true ;
@@ -89,6 +92,8 @@ describe('Remote queries', function() {
89
92
90
93
// the compiled pack
91
94
const compiledPackDir = path . join ( queryPackDir , '.codeql/pack/github/remote-query-pack/0.0.0/' ) ;
95
+ printDirectoryContents ( compiledPackDir ) ;
96
+
92
97
expect ( fs . existsSync ( path . join ( compiledPackDir , 'query.ql' ) ) ) . to . be . true ;
93
98
expect ( fs . existsSync ( path . join ( compiledPackDir , 'lib.qll' ) ) ) . to . be . true ;
94
99
expect ( fs . existsSync ( path . join ( compiledPackDir , 'qlpack.yml' ) ) ) . to . be . true ;
@@ -116,9 +121,11 @@ describe('Remote queries', function() {
116
121
// check a few files that we know should exist and others that we know should not
117
122
118
123
// the tarball to deliver to the server
124
+ printDirectoryContents ( queryPackRootDir ) ;
119
125
expect ( fs . readdirSync ( queryPackRootDir ) . find ( f => f . startsWith ( 'qlpack-' ) && f . endsWith ( '-generated.tgz' ) ) ) . not . to . be . undefined ;
120
126
121
127
const queryPackDir = path . join ( queryPackRootDir , 'query-pack' ) ;
128
+ printDirectoryContents ( queryPackDir ) ;
122
129
// in-pack.ql renamed to query.ql
123
130
expect ( fs . existsSync ( path . join ( queryPackDir , 'query.ql' ) ) ) . to . be . true ;
124
131
expect ( fs . existsSync ( path . join ( queryPackDir , 'qlpack.yml' ) ) ) . to . be . true ;
@@ -131,6 +138,7 @@ describe('Remote queries', function() {
131
138
132
139
// the compiled pack
133
140
const compiledPackDir = path . join ( queryPackDir , '.codeql/pack/codeql-remote/query/1.0.0/' ) ;
141
+ printDirectoryContents ( compiledPackDir ) ;
134
142
expect ( fs . existsSync ( path . join ( compiledPackDir , 'query.ql' ) ) ) . to . be . true ;
135
143
expect ( fs . existsSync ( path . join ( compiledPackDir , 'qlpack.yml' ) ) ) . to . be . true ;
136
144
expect ( fs . existsSync (
@@ -147,6 +155,7 @@ describe('Remote queries', function() {
147
155
148
156
// dependencies
149
157
const libraryDir = path . join ( compiledPackDir , '.codeql/libraries/codeql' ) ;
158
+ printDirectoryContents ( libraryDir ) ;
150
159
const packNames = fs . readdirSync ( libraryDir ) . sort ( ) ;
151
160
expect ( packNames ) . to . deep . equal ( [ 'javascript-all' , 'javascript-upgrades' ] ) ;
152
161
} ) ;
@@ -169,4 +178,12 @@ describe('Remote queries', function() {
169
178
function getFile ( file : string ) : Uri {
170
179
return Uri . file ( path . join ( baseDir , file ) ) ;
171
180
}
181
+
182
+ function printDirectoryContents ( dir : string ) {
183
+ console . log ( `DIR ${ dir } ` ) ;
184
+ if ( ! fs . existsSync ( dir ) ) {
185
+ console . log ( `DIR ${ dir } does not exist` ) ;
186
+ }
187
+ fs . readdirSync ( dir ) . sort ( ) . forEach ( f => console . log ( ` ${ f } ` ) ) ;
188
+ }
172
189
} ) ;
0 commit comments