File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 3030 ghc-version : ${{ matrix.ghc }}
3131 - run : |
3232 mkdir -p test-workspace/bin/
33- export GHCUP_USE_XDG_DIRS=1
34- export XDG_BIN_HOME=$(pwd)/test-workspace/bin/.ghcup/bin
3533 export GHCUP_INSTALL_BASE_PREFIX=$(pwd)/test-workspace/bin
3634 echo $XDG_BIN_HOME $GHCUP_INSTALL_BASE_PREFIX
3735 ghcup --no-verbose prefetch hls 1.4.0
Original file line number Diff line number Diff line change @@ -32,6 +32,11 @@ function getWorkspaceFile(name: string) {
3232 return wsroot . with ( { path : path . posix . join ( wsroot . path , name ) } ) ;
3333}
3434
35+ // function getWorkspaceGhcupCacheDirectory() {
36+ // const wsroot = getWorkspaceRoot().uri;
37+ // return wsroot.with({ path: path.posix.join(wsroot.path, 'bin/.ghcup/cache') });
38+ // }
39+
3540async function deleteWorkspaceFiles ( pred ?: ( fileType : [ string , vscode . FileType ] ) => boolean ) {
3641 await deleteFiles ( getWorkspaceRoot ( ) . uri , pred ) ;
3742}
@@ -83,7 +88,21 @@ suite('Extension Test Suite', () => {
8388 vscode . window . showInformationMessage ( 'Start all tests.' ) ;
8489
8590 suiteSetup ( async ( ) => {
86- await deleteWorkspaceFiles ( ( [ fp , _ ] ) => fp !== 'settings.json' ) ;
91+ await deleteWorkspaceFiles ( ( [ fp , type ] ) => {
92+ if ( type === vscode . FileType . Directory && fp === '.vscode' ) {
93+ return false ;
94+ }
95+ if ( type === vscode . FileType . Directory && fp === 'bin' ) {
96+ return false ;
97+ }
98+ if ( type === vscode . FileType . Directory && fp === '.ghcup' ) {
99+ return false ;
100+ }
101+ if ( type === vscode . FileType . Directory && fp === 'cache' ) {
102+ return false ;
103+ }
104+ return true ;
105+ } ) ;
87106 await getHaskellConfig ( ) . update ( 'logFile' , 'hls.log' ) ;
88107 await getHaskellConfig ( ) . update ( 'trace.server' , 'messages' ) ;
89108 await getHaskellConfig ( ) . update ( 'releasesDownloadStoragePath' , path . normalize ( getWorkspaceFile ( 'bin' ) . fsPath ) ) ;
You can’t perform that action at this time.
0 commit comments