From 54007fa545faab402022ce4de7d0079ae62a6a76 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 4 Feb 2020 20:26:12 +0100 Subject: [PATCH] fix git smoketests --- extensions/git/src/test/smoke.test.ts | 4 ++-- scripts/test-integration.bat | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/extensions/git/src/test/smoke.test.ts b/extensions/git/src/test/smoke.test.ts index c7450780cef..47031bbb1fd 100644 --- a/extensions/git/src/test/smoke.test.ts +++ b/extensions/git/src/test/smoke.test.ts @@ -13,7 +13,7 @@ import { GitExtension, API, Repository, Status } from '../api/git'; import { eventToPromise } from '../util'; suite('git smoke test', function () { - const cwd = workspace.workspaceFolders![0].uri.path; + const cwd = fs.realpathSync(workspace.workspaceFolders![0].uri.fsPath); const file = (relativePath: string) => path.join(cwd, relativePath); const uri = (relativePath: string) => Uri.file(file(relativePath)); const open = async (relativePath: string) => { @@ -47,7 +47,7 @@ suite('git smoke test', function () { } assert.equal(git.repositories.length, 1); - assert.equal(git.repositories[0].rootUri.path, cwd); + assert.equal(git.repositories[0].rootUri.fsPath, cwd); repository = git.repositories[0]; }); diff --git a/scripts/test-integration.bat b/scripts/test-integration.bat index 9d439a2d191..bc79961a6d7 100644 --- a/scripts/test-integration.bat +++ b/scripts/test-integration.bat @@ -3,7 +3,7 @@ setlocal pushd %~dp0\.. -set VSCODEUSERDATADIR=%TMP%\vscodeuserfolder-%RANDOM%-%TIME:~6,5% +set VSCODEUSERDATADIR=%TMP%\vscodeuserfolder-%RANDOM%-%TIME:~6,2% :: Figure out which Electron to use for running tests if "%INTEGRATION_TEST_ELECTRON_PATH%"=="" ( @@ -12,7 +12,7 @@ if "%INTEGRATION_TEST_ELECTRON_PATH%"=="" ( set INTEGRATION_TEST_ELECTRON_PATH=.\scripts\code.bat set VSCODE_BUILD_BUILTIN_EXTENSIONS_SILENCE_PLEASE=1 - echo "Running integration tests out of sources." + echo Running integration tests out of sources. ) else ( :: Run from a built: need to compile all test extensions call yarn gulp compile-extension:vscode-api-tests @@ -29,7 +29,7 @@ if "%INTEGRATION_TEST_ELECTRON_PATH%"=="" ( set ELECTRON_ENABLE_LOGGING=1 set ELECTRON_ENABLE_STACK_DUMPING=1 - echo "Running integration tests with '%INTEGRATION_TEST_ELECTRON_PATH%' as build." + echo Running integration tests with '%INTEGRATION_TEST_ELECTRON_PATH%' as build. ) :: Integration & performance tests in AMD @@ -50,7 +50,9 @@ if %errorlevel% neq 0 exit /b %errorlevel% call "%INTEGRATION_TEST_ELECTRON_PATH%" $%~dp0\..\extensions\emmet\test-fixtures --extensionDevelopmentPath=%~dp0\..\extensions\emmet --extensionTestsPath=%~dp0\..\extensions\emmet\out\test --disable-telemetry --disable-crash-reporter --disable-updates --disable-extensions --user-data-dir=%VSCODEUSERDATADIR% . if %errorlevel% neq 0 exit /b %errorlevel% -call "%INTEGRATION_TEST_ELECTRON_PATH%" %TMP%\git-%RANDOM%-%TIME:~6,5% --extensionDevelopmentPath=%~dp0\..\extensions\git --extensionTestsPath=%~dp0\..\extensions\git\out\test --disable-telemetry --disable-crash-reporter --disable-updates --disable-extensions --user-data-dir=%VSCODEUSERDATADIR% . +set GITWORKSPACE=%TMP%\git-%RANDOM% +mkdir %GITWORKSPACE% +call "%INTEGRATION_TEST_ELECTRON_PATH%" %GITWORKSPACE% --extensionDevelopmentPath=%~dp0\..\extensions\git --extensionTestsPath=%~dp0\..\extensions\git\out\test --disable-telemetry --disable-crash-reporter --disable-updates --disable-extensions --user-data-dir=%VSCODEUSERDATADIR% if %errorlevel% neq 0 exit /b %errorlevel% :: Tests in commonJS (HTML, CSS, JSON language server tests...)