Skip to content

Commit

Permalink
[Toolchain] Add test for prerequisitesForGetToolchains
Browse files Browse the repository at this point in the history
This commit adds test case of prerequisitesForGetToolchian

ONE-vscode-DCO-1.0-Signed-off-by: profornnan <[email protected]>
  • Loading branch information
profornnan authored and dayo09 committed Nov 3, 2023
1 parent 3851a75 commit 678e5b5
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/Tests/Backend/One/OneToolchain.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,26 @@ suite("OneCompiler", function () {
});
});

suite("#prerequisitesForGetToolchains", function () {
test("returns a command which executes a shell script for prerequisites", function () {
const oneCompiler = new OneCompiler();
const extensionId = "Samsung.one-vscode";
const ext = vscode.extensions.getExtension(
extensionId
) as vscode.Extension<any>;
const scriptPath = vscode.Uri.joinPath(
ext!.extensionUri,
"script",
"prerequisitesForGetOneToolchain.sh"
).fsPath;
const cmd = `sudo /bin/sh ${scriptPath}`;
assert.deepStrictEqual(
oneCompiler.prerequisitesForGetToolchains().str(),
cmd
);
});
});

suite("OneToolchain", function () {
suite("#constructor()", function () {
test("Create dummy OneToolchain backend", function (pass) {
Expand Down

0 comments on commit 678e5b5

Please sign in to comment.