Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 34cdc61

Browse files
author
Akos Kitta
committed
test: added compiler + build output path test
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
1 parent 6140ae5 commit 34cdc61

File tree

8 files changed

+341
-18
lines changed

8 files changed

+341
-18
lines changed

‎arduino-ide-extension/package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"build": "tsc && ncp ./src/node/cli-protocol/ ./lib/node/cli-protocol/ && yarn lint",
1818
"watch": "tsc -w",
1919
"test": "mocha \"./lib/test/**/*.test.js\"",
20+
"test:slow": "mocha \"./lib/test/**/*.slow-test.js\"",
2021
"test:watch": "mocha --watch --watch-files lib \"./lib/test/**/*.test.js\""
2122
},
2223
"dependencies": {

‎arduino-ide-extension/src/common/protocol/boards-service.ts‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,16 @@ export const BoardsService = Symbol('BoardsService');
141141
export interface BoardsService
142142
extends Installable<BoardsPackage>,
143143
Searchable<BoardsPackage, BoardSearch> {
144+
install(options: {
145+
item: BoardsPackage;
146+
progressId?: string;
147+
version?: Installable.Version;
148+
noOverwrite?: boolean;
149+
/**
150+
* Only for testing to avoid confirmation dialogs from Windows User Access Control when installing a platform.
151+
*/
152+
skipPostInstall?: boolean;
153+
}): Promise<void>;
144154
getState(): Promise<AvailablePorts>;
145155
getBoardDetails(options: { fqbn: string }): Promise<BoardDetails | undefined>;
146156
getBoardPackage(options: { id: string }): Promise<BoardsPackage | undefined>;

‎arduino-ide-extension/src/node/boards-service-impl.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,7 @@ export class BoardsServiceImpl
434434
progressId?: string;
435435
version?: Installable.Version;
436436
noOverwrite?: boolean;
437+
skipPostInstall?: boolean;
437438
}): Promise<void> {
438439
const item = options.item;
439440
const version = !!options.version
@@ -450,6 +451,9 @@ export class BoardsServiceImpl
450451
req.setPlatformPackage(platform);
451452
req.setVersion(version);
452453
req.setNoOverwrite(Boolean(options.noOverwrite));
454+
if (options.skipPostInstall) {
455+
req.setSkipPostInstall(true);
456+
}
453457

454458
console.info('>>> Starting boards package installation...', item);
455459

‎arduino-ide-extension/src/node/core-client-provider.ts‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ export class CoreClientProvider {
6363
new Emitter<CoreClientProvider.Client>();
6464
private readonly onClientReady = this.onClientReadyEmitter.event;
6565

66-
private ready = new Deferred<void>();
6766
private pending: Deferred<CoreClientProvider.Client> | undefined;
6867
private _client: CoreClientProvider.Client | undefined;
6968

@@ -135,14 +134,6 @@ export class CoreClientProvider {
135134
const client = await this.createClient(address);
136135
this.toDisposeOnCloseClient.pushAll([
137136
Disposable.create(() => client.client.close()),
138-
Disposable.create(() => {
139-
this.ready.reject(
140-
new Error(
141-
`Disposed. Creating a new gRPC core client on address ${address}.`
142-
)
143-
);
144-
this.ready = new Deferred();
145-
}),
146137
]);
147138
await this.initInstanceWithFallback(client);
148139
return this.useClient(client);

‎arduino-ide-extension/src/node/sketches-service-impl.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import {
1919
SketchContainer,
2020
SketchesError,
2121
} from '../common/protocol/sketches-service';
22-
import { NotificationServiceServerImpl } from './notification-service-server';
22+
import { NotificationServiceServer } from '../common/protocol';
2323
import { EnvVariablesServer } from '@theia/core/lib/common/env-variables';
2424
import { CoreClientAware } from './core-client-provider';
2525
import {
@@ -77,8 +77,8 @@ export class SketchesServiceImpl
7777
@inject(ConfigServiceImpl)
7878
private readonly configService: ConfigServiceImpl;
7979

80-
@inject(NotificationServiceServerImpl)
81-
private readonly notificationService: NotificationServiceServerImpl;
80+
@inject(NotificationServiceServer)
81+
private readonly notificationService: NotificationServiceServer;
8282

8383
@inject(EnvVariablesServer)
8484
private readonly envVariableServer: EnvVariablesServer;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /