-
Notifications
You must be signed in to change notification settings - Fork 20
Devtool debug build support and update dependencies #370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
deribaucourt
merged 11 commits into
yoctoproject:staging
from
savoirfairelinux:devtool-debug-build
Jan 10, 2025
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
0ccf5df
Install: add semver to client and update package-lock
deribaucourt 32fad95
Test: Move integrationBitbakeFolder to utils/bitbake.ts
deribaucourt 9fe6335
Scan: Add bitbake version to scan result
deribaucourt 88650fd
Scan: Read bitbake version from bitbake script
deribaucourt 5e21c0e
Refactor: Use bitbake version to detect devtool ide-sdk
deribaucourt cd8ee9d
Test: Mock bitbake version
deribaucourt 91911de
Settings: Add disableDevtoolDebugBuild setting
deribaucourt c950f19
Feat: Add devtool debug-build option to devtool modify command
deribaucourt a7a1316
Test: Add test for devtool debug build option
deribaucourt 50f3c5f
Fix: Revert devtool --help ide-sdk discovery for eSDKMode
deribaucourt e48a6c4
Test: BitBakeProjectScanner retrieves a valid bitbake version
deribaucourt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,12 +8,14 @@ import type childProcess from 'child_process' | |
| import { BitbakeWorkspace } from '../../../ui/BitbakeWorkspace' | ||
| import { BitBakeProjectScanner } from '../../../driver/BitBakeProjectScanner' | ||
| import { BitbakeDriver } from '../../../driver/BitbakeDriver' | ||
| import { registerDevtoolCommands } from '../../../ui/BitbakeCommands' | ||
| import { addDevtoolDebugBuild, registerDevtoolCommands } from '../../../ui/BitbakeCommands' | ||
| import { clientNotificationManager } from '../../../ui/ClientNotificationManager' | ||
| import * as BitbakeTerminal from '../../../ui/BitbakeTerminal' | ||
| import * as ProcessUtils from '../../../utils/ProcessUtils' | ||
| import { LanguageClient } from 'vscode-languageclient/node' | ||
| import { IPty } from 'node-pty' | ||
| import { BitbakeScanResult } from '../../../lib/src/types/BitbakeScanResult' | ||
| import { BitbakeSettings } from '../../../lib/src/BitbakeSettings' | ||
|
|
||
| jest.mock('vscode') | ||
|
|
||
|
|
@@ -58,6 +60,7 @@ describe('Devtool ide-sdk command', () => { | |
| pathToBitbakeFolder: '', | ||
| sdkImage: 'core-image-minimal' | ||
| } | ||
| jest.spyOn(bitBakeProjectScanner, 'scanResult', 'get').mockReturnValue({'_bitbakeVersion': '1.0.0'} as BitbakeScanResult) | ||
| const ideSDKCommand = mockExtensionContext(bitBakeProjectScanner) | ||
|
|
||
| jest.spyOn(BitbakeTerminal, 'runBitbakeTerminalCustomCommand').mockReturnValue(undefined as unknown as Promise<IPty>) | ||
|
|
@@ -75,6 +78,7 @@ describe('Devtool ide-sdk command', () => { | |
| sdkImage: 'core-image-minimal', | ||
| sshTarget: '[email protected]' | ||
| } | ||
| jest.spyOn(bitBakeProjectScanner, 'scanResult', 'get').mockReturnValue({'_bitbakeVersion': '3.0.0'} as BitbakeScanResult) | ||
| const ideSDKCommand = mockExtensionContext(bitBakeProjectScanner) | ||
|
|
||
| const commandSpy = jest.spyOn(BitbakeTerminal, 'runBitbakeTerminalCustomCommand').mockReturnValue(undefined as unknown as Promise<IPty>) | ||
|
|
@@ -84,4 +88,11 @@ describe('Devtool ide-sdk command', () => { | |
| await ideSDKCommand('busybox') | ||
| expect(commandSpy).toHaveBeenCalledWith(expect.anything(), 'devtool ide-sdk -i code busybox core-image-minimal -t [email protected]', expect.anything()) | ||
| }) | ||
|
|
||
| it('should properly detect devtool modify options', async () => { | ||
| // Test addDevtoolDebugBuild | ||
| expect(await addDevtoolDebugBuild('', {_bitbakeVersion: '3.0.0'} as BitbakeScanResult, {disableDevtoolDebugBuild: false} as BitbakeSettings, undefined as unknown as BitbakeDriver)).toBe(' --debug-build') | ||
| expect(await addDevtoolDebugBuild('', {_bitbakeVersion: '3.0.0'} as BitbakeScanResult, {disableDevtoolDebugBuild: true} as BitbakeSettings, undefined as unknown as BitbakeDriver)).toBe('') | ||
| expect(await addDevtoolDebugBuild('', {_bitbakeVersion: '1.0.0'} as BitbakeScanResult, {disableDevtoolDebugBuild: false} as BitbakeSettings, undefined as unknown as BitbakeDriver)).toBe('') | ||
| }) | ||
| }) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.