mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-13 17:22:15 -05:00
Upload user dir from test runs (#13326)
* Add archive logs step to linux build * right file * try * try this * correct order * build artifact * export * log * use tmp * zip up all * Remove extra publish * other scripts * add test name to dir
This commit is contained in:
@@ -117,8 +117,10 @@ if "%RUN_DBPROJECT_TESTS%" == "true" (
|
||||
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
rmdir /s /q %VSCODEUSERDATADIR%
|
||||
rmdir /s /q %VSCODEEXTENSIONSDIR%
|
||||
if "%NO_CLEANUP%"=="" (
|
||||
rmdir /s /q %VSCODEUSERDATADIR%
|
||||
rmdir /s /q %VSCODEEXTENSIONSDIR%
|
||||
)
|
||||
|
||||
popd
|
||||
|
||||
|
||||
@@ -33,14 +33,6 @@ let argv = require('yargs')
|
||||
.default('extensions', extensionList)
|
||||
.strict().help().wrap(null).version(false).argv;
|
||||
|
||||
// set up environment
|
||||
|
||||
const VSCODEUSERDATADIR = tmp.dirSync({ prefix: 'adsuser' }).name;
|
||||
const VSCODEEXTENSIONSDIR = tmp.dirSync({ prefix: 'adsext' }).name;
|
||||
|
||||
console.log(VSCODEUSERDATADIR);
|
||||
console.log(VSCODEEXTENSIONSDIR);
|
||||
|
||||
if (!process.env.INTEGRATION_TEST_ELECTRON_PATH) {
|
||||
process.env.INTEGRATION_TEST_ELECTRON_PATH = path.join(__dirname, '..', 'scripts', os.platform() === 'win32' ? 'code.bat' : 'code.sh');
|
||||
console.log('Running unit tests out of sources.');
|
||||
@@ -67,6 +59,14 @@ for (const ext of argv.extensions) {
|
||||
console.log(`*** starting ${ext} tests ***`);
|
||||
console.log('*'.repeat(ext.length + 23));
|
||||
|
||||
// set up environment
|
||||
|
||||
const VSCODEUSERDATADIR = tmp.dirSync({ prefix: `adsuser_${ext}` }).name;
|
||||
const VSCODEEXTENSIONSDIR = tmp.dirSync({ prefix: `adsext_${ext}` }).name;
|
||||
|
||||
console.log(`VSCODEUSERDATADIR : ${VSCODEUSERDATADIR}`);
|
||||
console.log(`VSCODEEXTENSIONSDIR : ${VSCODEEXTENSIONSDIR}`);
|
||||
|
||||
const command = `${process.env.INTEGRATION_TEST_ELECTRON_PATH} --no-sandbox --extensionDevelopmentPath=${path.join(__dirname, '..', 'extensions', ext)} --extensionTestsPath=${path.join(__dirname, '..', 'extensions', ext, 'out', 'test')} --user-data-dir=${VSCODEUSERDATADIR} --extensions-dir=${VSCODEEXTENSIONSDIR} --remote-debugging-port=9222 --disable-telemetry --disable-crash-reporter --disable-updates --nogpu`;
|
||||
console.log(`Command used: ${command}`);
|
||||
console.log(execSync(command, { stdio: 'inherit' }));
|
||||
@@ -74,5 +74,7 @@ for (const ext of argv.extensions) {
|
||||
|
||||
// clean up
|
||||
|
||||
fs.remove(VSCODEUSERDATADIR, { recursive: true }).catch(console.error);
|
||||
fs.remove(VSCODEEXTENSIONSDIR, { recursive: true }).catch(console.error);
|
||||
if (!process.env.NO_CLEANUP) {
|
||||
fs.remove(VSCODEUSERDATADIR, { recursive: true }).catch(console.error);
|
||||
fs.remove(VSCODEEXTENSIONSDIR, { recursive: true }).catch(console.error);
|
||||
}
|
||||
|
||||
@@ -111,5 +111,7 @@ if [[ "$RUN_DBPROJECT_TESTS" == "true" ]]; then
|
||||
"$INTEGRATION_TEST_ELECTRON_PATH" $LINUX_NO_SANDBOX --extensionDevelopmentPath=$ROOT/extensions/sql-database-projects --extensionTestsPath=$ROOT/extensions/sql-database-projects/out/test --user-data-dir=$VSCODEUSERDATADIR --extensions-dir=$VSCODEEXTDIR --disable-telemetry --disable-crash-reporter --disable-updates --nogpu
|
||||
fi
|
||||
|
||||
rm -r $VSCODEUSERDATADIR
|
||||
rm -r $VSCODEEXTDIR
|
||||
if [[ "$NO_CLEANUP" == "" ]]; then
|
||||
rm -r $VSCODEUSERDATADIR
|
||||
rm -r $VSCODEEXTDIR
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user