Skip to content

Commit 54007fa

Browse files
committed
fix git smoketests
1 parent a861520 commit 54007fa

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

extensions/git/src/test/smoke.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { GitExtension, API, Repository, Status } from '../api/git';
1313
import { eventToPromise } from '../util';
1414

1515
suite('git smoke test', function () {
16-
const cwd = workspace.workspaceFolders![0].uri.path;
16+
const cwd = fs.realpathSync(workspace.workspaceFolders![0].uri.fsPath);
1717
const file = (relativePath: string) => path.join(cwd, relativePath);
1818
const uri = (relativePath: string) => Uri.file(file(relativePath));
1919
const open = async (relativePath: string) => {
@@ -47,7 +47,7 @@ suite('git smoke test', function () {
4747
}
4848

4949
assert.equal(git.repositories.length, 1);
50-
assert.equal(git.repositories[0].rootUri.path, cwd);
50+
assert.equal(git.repositories[0].rootUri.fsPath, cwd);
5151

5252
repository = git.repositories[0];
5353
});

scripts/test-integration.bat

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ setlocal
33

44
pushd %~dp0\..
55

6-
set VSCODEUSERDATADIR=%TMP%\vscodeuserfolder-%RANDOM%-%TIME:~6,5%
6+
set VSCODEUSERDATADIR=%TMP%\vscodeuserfolder-%RANDOM%-%TIME:~6,2%
77

88
:: Figure out which Electron to use for running tests
99
if "%INTEGRATION_TEST_ELECTRON_PATH%"=="" (
@@ -12,7 +12,7 @@ if "%INTEGRATION_TEST_ELECTRON_PATH%"=="" (
1212
set INTEGRATION_TEST_ELECTRON_PATH=.\scripts\code.bat
1313
set VSCODE_BUILD_BUILTIN_EXTENSIONS_SILENCE_PLEASE=1
1414

15-
echo "Running integration tests out of sources."
15+
echo Running integration tests out of sources.
1616
) else (
1717
:: Run from a built: need to compile all test extensions
1818
call yarn gulp compile-extension:vscode-api-tests
@@ -29,7 +29,7 @@ if "%INTEGRATION_TEST_ELECTRON_PATH%"=="" (
2929
set ELECTRON_ENABLE_LOGGING=1
3030
set ELECTRON_ENABLE_STACK_DUMPING=1
3131

32-
echo "Running integration tests with '%INTEGRATION_TEST_ELECTRON_PATH%' as build."
32+
echo Running integration tests with '%INTEGRATION_TEST_ELECTRON_PATH%' as build.
3333
)
3434

3535
:: Integration & performance tests in AMD
@@ -50,7 +50,9 @@ if %errorlevel% neq 0 exit /b %errorlevel%
5050
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% .
5151
if %errorlevel% neq 0 exit /b %errorlevel%
5252

53-
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% .
53+
set GITWORKSPACE=%TMP%\git-%RANDOM%
54+
mkdir %GITWORKSPACE%
55+
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%
5456
if %errorlevel% neq 0 exit /b %errorlevel%
5557

5658
:: Tests in commonJS (HTML, CSS, JSON language server tests...)

0 commit comments

Comments
 (0)