smoke tests - drop 'tmp' and try to deal with tmp path ourself (#130102)

This commit is contained in:
Benjamin Pasero 2021-08-05 10:03:55 +02:00
parent 0f99773ce9
commit b96644b15f
No known key found for this signature in database
GPG key ID: E6380CC4C8219E65
4 changed files with 8 additions and 18 deletions

View file

@ -294,8 +294,8 @@ export class Code {
}
async exit(): Promise<void> {
const success = await this.driver.exitApplication();
if (success === false) {
const veto = await this.driver.exitApplication();
if (veto === true) {
throw new Error('Code exit was blocked by a veto.');
}
}

View file

@ -26,7 +26,6 @@
"portastic": "^1.0.1",
"rimraf": "^2.6.1",
"strip-json-comments": "^2.0.1",
"tmp": "0.0.33",
"typescript": "^4.3.2",
"vscode-test": "^1.6.1",
"watch": "^1.0.2"

View file

@ -8,7 +8,6 @@ import * as cp from 'child_process';
import * as path from 'path';
import * as os from 'os';
import * as minimist from 'minimist';
import * as tmp from 'tmp';
import * as rimraf from 'rimraf';
import * as mkdirp from 'mkdirp';
import { ncp } from 'ncp';
@ -29,8 +28,12 @@ import { setup as setupDataMultirootTests } from './areas/multiroot/multiroot.te
import { setup as setupDataLocalizationTests } from './areas/workbench/localization.test';
import { setup as setupLaunchTests } from './areas/workbench/launch.test';
const tmpDir = tmp.dirSync({ name: 't' }) as { name: string; removeCallback: Function; };
const testDataPath = tmpDir.name;
const testDataPath = path.join(os.tmpdir(), 'vscsmoke');
if (fs.existsSync(testDataPath)) {
rimraf.sync(testDataPath);
} else {
fs.mkdirSync(testDataPath);
}
process.once('exit', () => {
try {
rimraf.sync(testDataPath);

View file

@ -655,11 +655,6 @@ once@^1.3.0:
dependencies:
wrappy "1"
os-tmpdir@~1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=
parse-json@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0"
@ -886,13 +881,6 @@ supports-color@^5.3.0:
dependencies:
has-flag "^3.0.0"
tmp@0.0.33:
version "0.0.33"
resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9"
integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==
dependencies:
os-tmpdir "~1.0.2"
"traverse@>=0.3.0 <0.4":
version "0.3.9"
resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.3.9.tgz#717b8f220cc0bb7b44e40514c22b2e8bbc70d8b9"