@@ -100,7 +100,6 @@ describe('Remote queries', function() {
100100 const querySubmissionResult = await runRemoteQuery ( cli , credentials , fileUri , true , progress , cancellationTokenSource . token , variantAnalysisManager ) ;
101101 expect ( querySubmissionResult ) . to . be . ok ;
102102 const queryPackRootDir = querySubmissionResult ! . queryDirPath ! ;
103- printDirectoryContents ( queryPackRootDir ) ;
104103
105104 // to retrieve the list of repositories
106105 expect ( showQuickPickSpy ) . to . have . been . calledOnce ;
@@ -113,7 +112,6 @@ describe('Remote queries', function() {
113112 expect ( fs . readdirSync ( queryPackRootDir ) . find ( f => f . startsWith ( 'qlpack-' ) && f . endsWith ( '-generated.tgz' ) ) ) . not . to . be . undefined ;
114113
115114 const queryPackDir = path . join ( queryPackRootDir , 'query-pack' ) ;
116- printDirectoryContents ( queryPackDir ) ;
117115
118116 expect ( fs . existsSync ( path . join ( queryPackDir , 'in-pack.ql' ) ) ) . to . be . true ;
119117 expect ( fs . existsSync ( path . join ( queryPackDir , 'lib.qll' ) ) ) . to . be . true ;
@@ -128,7 +126,6 @@ describe('Remote queries', function() {
128126
129127 // the compiled pack
130128 const compiledPackDir = path . join ( queryPackDir , '.codeql/pack/codeql-remote/query/0.0.0/' ) ;
131- printDirectoryContents ( compiledPackDir ) ;
132129
133130 expect ( fs . existsSync ( path . join ( compiledPackDir , 'in-pack.ql' ) ) ) . to . be . true ;
134131 expect ( fs . existsSync ( path . join ( compiledPackDir , 'lib.qll' ) ) ) . to . be . true ;
@@ -171,11 +168,9 @@ describe('Remote queries', function() {
171168 // check a few files that we know should exist and others that we know should not
172169
173170 // the tarball to deliver to the server
174- printDirectoryContents ( queryPackRootDir ) ;
175171 expect ( fs . readdirSync ( queryPackRootDir ) . find ( f => f . startsWith ( 'qlpack-' ) && f . endsWith ( '-generated.tgz' ) ) ) . not . to . be . undefined ;
176172
177173 const queryPackDir = path . join ( queryPackRootDir , 'query-pack' ) ;
178- printDirectoryContents ( queryPackDir ) ;
179174
180175 expect ( fs . existsSync ( path . join ( queryPackDir , 'in-pack.ql' ) ) ) . to . be . true ;
181176 expect ( fs . existsSync ( path . join ( queryPackDir , 'qlpack.yml' ) ) ) . to . be . true ;
@@ -189,7 +184,6 @@ describe('Remote queries', function() {
189184
190185 // the compiled pack
191186 const compiledPackDir = path . join ( queryPackDir , '.codeql/pack/codeql-remote/query/0.0.0/' ) ;
192- printDirectoryContents ( compiledPackDir ) ;
193187 expect ( fs . existsSync ( path . join ( compiledPackDir , 'in-pack.ql' ) ) ) . to . be . true ;
194188 expect ( fs . existsSync ( path . join ( compiledPackDir , 'qlpack.yml' ) ) ) . to . be . true ;
195189 verifyQlPack ( path . join ( compiledPackDir , 'qlpack.yml' ) , 'in-pack.ql' , '0.0.0' , await pathSerializationBroken ( ) ) ;
@@ -208,7 +202,6 @@ describe('Remote queries', function() {
208202 expect ( qlpackContents . dependencies ?. [ 'codeql/javascript-all' ] ) . to . equal ( '*' ) ;
209203
210204 const libraryDir = path . join ( compiledPackDir , '.codeql/libraries/codeql' ) ;
211- printDirectoryContents ( libraryDir ) ;
212205 const packNames = fs . readdirSync ( libraryDir ) . sort ( ) ;
213206
214207 // check dependencies.
@@ -233,11 +226,9 @@ describe('Remote queries', function() {
233226 // check a few files that we know should exist and others that we know should not
234227
235228 // the tarball to deliver to the server
236- printDirectoryContents ( queryPackRootDir ) ;
237229 expect ( fs . readdirSync ( queryPackRootDir ) . find ( f => f . startsWith ( 'qlpack-' ) && f . endsWith ( '-generated.tgz' ) ) ) . not . to . be . undefined ;
238230
239231 const queryPackDir = path . join ( queryPackRootDir , 'query-pack' ) ;
240- printDirectoryContents ( queryPackDir ) ;
241232
242233 expect ( fs . existsSync ( path . join ( queryPackDir , 'subfolder/in-pack.ql' ) ) ) . to . be . true ;
243234 expect ( fs . existsSync ( path . join ( queryPackDir , 'qlpack.yml' ) ) ) . to . be . true ;
@@ -251,7 +242,6 @@ describe('Remote queries', function() {
251242
252243 // the compiled pack
253244 const compiledPackDir = path . join ( queryPackDir , '.codeql/pack/codeql-remote/query/0.0.0/' ) ;
254- printDirectoryContents ( compiledPackDir ) ;
255245 expect ( fs . existsSync ( path . join ( compiledPackDir , 'otherfolder/lib.qll' ) ) ) . to . be . true ;
256246 expect ( fs . existsSync ( path . join ( compiledPackDir , 'subfolder/in-pack.ql' ) ) ) . to . be . true ;
257247 expect ( fs . existsSync ( path . join ( compiledPackDir , 'qlpack.yml' ) ) ) . to . be . true ;
@@ -270,7 +260,6 @@ describe('Remote queries', function() {
270260 expect ( qlpackContents . dependencies ?. [ 'codeql/javascript-all' ] ) . to . equal ( '*' ) ;
271261
272262 const libraryDir = path . join ( compiledPackDir , '.codeql/libraries/codeql' ) ;
273- printDirectoryContents ( libraryDir ) ;
274263 const packNames = fs . readdirSync ( libraryDir ) . sort ( ) ;
275264
276265 // check dependencies.
@@ -399,12 +388,4 @@ describe('Remote queries', function() {
399388 function getFile ( file : string ) : Uri {
400389 return Uri . file ( path . join ( baseDir , file ) ) ;
401390 }
402-
403- function printDirectoryContents ( dir : string ) {
404- console . log ( `DIR ${ dir } ` ) ;
405- if ( ! fs . existsSync ( dir ) ) {
406- console . log ( `DIR ${ dir } does not exist` ) ;
407- }
408- fs . readdirSync ( dir ) . sort ( ) . forEach ( f => console . log ( ` ${ f } ` ) ) ;
409- }
410391} ) ;
0 commit comments