From f0f019b89893e4bf790ebb12e3b39b0a8c6869b4 Mon Sep 17 00:00:00 2001 From: Fabricio-ESP Date: Mon, 25 Nov 2024 14:55:17 +0000 Subject: [PATCH] Fix CN test script, improve error handling. --- tests/runs/CNmirrors.test.js | 4 +++- tests/runs/CNmirrors2.test.js | 4 +++- tests/runs/nonInteractiveInstall.test.js | 4 ++-- tests/runs/variation1.test.js | 4 ++-- tests/script/postInstall.test.js | 5 ++--- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/tests/runs/CNmirrors.test.js b/tests/runs/CNmirrors.test.js index d5c77c5..3492164 100644 --- a/tests/runs/CNmirrors.test.js +++ b/tests/runs/CNmirrors.test.js @@ -33,9 +33,11 @@ const projectFolder = "project"; let installArgs = []; installArgs.push(` -p ${path.join(os.homedir(), installFolder)}`); // Install Path +// installArgs.push(` -t ${targetList.join(",")}`); // Targets // removed to install for all targets +// installArgs.push(` -i ${idfVersionList.join(",")}`); // IDF versions Removed to install latest version installArgs.push(` -m https://dl.espressif.com/github_assets`); // IDF tools mirror installArgs.push(` --idf-mirror https://jihulab.com/esp-mirror`); // ESP-IDF mirror -installArgs.push(` -r true`); // recursive submodules init +installArgs.push(` -r false`); // recursive submodules init const pathToIDFScript = os.platform() !== "win32" diff --git a/tests/runs/CNmirrors2.test.js b/tests/runs/CNmirrors2.test.js index f56bbd1..5191752 100644 --- a/tests/runs/CNmirrors2.test.js +++ b/tests/runs/CNmirrors2.test.js @@ -33,9 +33,11 @@ const projectFolder = "project"; let installArgs = []; installArgs.push(` -p ${path.join(os.homedir(), installFolder)}`); // Install Path +installArgs.push(` -t ${targetList.join(",")}`); // Targets +installArgs.push(` -i ${idfVersionList.join(",")}`); // IDF versions installArgs.push(` -m https://dl.espressif.cn/github_assets`); // IDF tools mirror installArgs.push(` --idf-mirror https://jihulab.com/esp-mirror`); // ESP-IDF mirror -installArgs.push(` -r true`); // recursive submodules init +installArgs.push(` -r false`); // recursive submodules init const pathToIDFScript = os.platform() !== "win32" diff --git a/tests/runs/nonInteractiveInstall.test.js b/tests/runs/nonInteractiveInstall.test.js index f61da5f..63a1971 100644 --- a/tests/runs/nonInteractiveInstall.test.js +++ b/tests/runs/nonInteractiveInstall.test.js @@ -33,8 +33,8 @@ const projectFolder = "project"; let installArgs = []; installArgs.push(` -p ${path.join(os.homedir(), installFolder)}`); // Install Path -installArgs.push(` -t ${targetList.join(",")}`); // Targets (in case of multiple separate with ,) -installArgs.push(` -i ${idfVersionList.join(",")}`); // IDF versions (in case of multiple separate with ,) +installArgs.push(` -t ${targetList.join(",")}`); // Targets +installArgs.push(` -i ${idfVersionList.join(",")}`); // IDF versions installArgs.push(` -m https://github.com`); // IDF tools mirror installArgs.push(` --idf-mirror https://github.com`); // ESP-IDF mirror installArgs.push(` -r true`); // recursive submodules init diff --git a/tests/runs/variation1.test.js b/tests/runs/variation1.test.js index 334b803..6cd98fa 100644 --- a/tests/runs/variation1.test.js +++ b/tests/runs/variation1.test.js @@ -33,8 +33,8 @@ const projectFolder = "project"; let installArgs = []; installArgs.push(` -p ${path.join(os.homedir(), installFolder)}`); // Install Path -installArgs.push(` -t ${targetList.join(",")}`); // Targets (in case of multiple separate with ,) -installArgs.push(` -i ${idfVersionList.join(",")}`); // IDF versions (in case of multiple separate with ,) +installArgs.push(` -t ${targetList.join(",")}`); // Targets +installArgs.push(` -i ${idfVersionList.join(",")}`); // IDF versions installArgs.push(` -m https://github.com`); // IDF tools mirror installArgs.push(` --idf-mirror https://github.com`); // ESP-IDF mirror installArgs.push(` -r true`); // recursive submodules init diff --git a/tests/script/postInstall.test.js b/tests/script/postInstall.test.js index 2c5542c..78a14f5 100644 --- a/tests/script/postInstall.test.js +++ b/tests/script/postInstall.test.js @@ -26,9 +26,8 @@ export function runPostInstallTest( } catch { logger.info("Error to start IDF terminal"); logger.info(testRunner.output); - throw new Error( - "One test in the chain failed, aborting the entire suite." - ); + this.test.error(new Error("Error starting IDF Terminal")); + throw error; } });