From de81174c33691e9c3f656f43c5e117861e68264d Mon Sep 17 00:00:00 2001 From: zzz701 Date: Tue, 2 Sep 2025 14:40:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=BF=E6=8D=A2ets1.1=E5=92=8Cets1.2=20Signe?= =?UTF-8?q?d-off-by:=20zzz701=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit update ets2panda/bindings/test/run_tests.ts. Signed-off-by: zzz701 <13747853+zzz701@user.noreply.gitee.com> --- ets2panda/bindings/src/common/preDefine.ts | 2 +- ets2panda/bindings/test/prepare.ps1 | 2 +- ets2panda/bindings/test/prepare.sh | 2 +- ets2panda/bindings/test/run_tests.ts | 2 +- .../driver/build_system/src/init/process_build_config.ts | 2 +- ets2panda/driver/build_system/src/pre_define.ts | 6 +++--- .../test/e2e/demo_file1.2_file1.1_file1.1/build_config.json | 4 ++-- ets2panda/driver/build_system/testSuite_ch.md | 2 +- ets2panda/driver/build_system/testSuite_en.md | 2 +- ets2panda/linter/homecheck/src/utils/common/SDKUtils.ts | 4 ++-- ets2panda/lsp/src/get_safe_delete_info.cpp | 2 +- 11 files changed, 15 insertions(+), 15 deletions(-) diff --git a/ets2panda/bindings/src/common/preDefine.ts b/ets2panda/bindings/src/common/preDefine.ts index 30bec4a221..a2cb5244c5 100644 --- a/ets2panda/bindings/src/common/preDefine.ts +++ b/ets2panda/bindings/src/common/preDefine.ts @@ -25,7 +25,7 @@ export const DECL_ETS_SUFFIX: string = '.d.ets'; export const PANDA_SDK_PATH_FROM_SDK: string = './build-tools/ets2panda'; export const SYSTEM_SDK_PATH_FROM_SDK: string = './'; export const EXTERNAL_API_PATH_FROM_SDK: string = '../../../hms/ets/ets1.2'; -export const INTEROP_API_PATH_FROM_SDK: string = '../ets1.1/build-tools/interop'; +export const INTEROP_API_PATH_FROM_SDK: string = '../dynamic/build-tools/interop'; export const DEFAULT_CACHE_DIR: string = './.idea/.deveco'; export const ETS_SUFFIX: string = '.ets'; export const TS_SUFFIX: string = '.ts'; diff --git a/ets2panda/bindings/test/prepare.ps1 b/ets2panda/bindings/test/prepare.ps1 index ac679d55c1..b23ce0d34e 100644 --- a/ets2panda/bindings/test/prepare.ps1 +++ b/ets2panda/bindings/test/prepare.ps1 @@ -36,7 +36,7 @@ if ($RestoreMode -eq 1) { } } else { - $sourceDir = "$ScriptDir\ets\ets1.2\build-tools\ets2panda" + $sourceDir = "$ScriptDir\ets\static\build-tools\ets2panda" $destinationDir = "$ScriptDir\..\ets2panda" # Check if source directory exists diff --git a/ets2panda/bindings/test/prepare.sh b/ets2panda/bindings/test/prepare.sh index c56f56120a..c257896ca2 100755 --- a/ets2panda/bindings/test/prepare.sh +++ b/ets2panda/bindings/test/prepare.sh @@ -35,7 +35,7 @@ if [ $RESTORE_MODE -eq 1 ]; then rm "${SCRIPT_DIR}/../ets2panda" echo 'Remove the symbolic link to ets2panda' else - ln -s "${SCRIPT_DIR}/ets/ets1.2/build-tools/ets2panda" "${SCRIPT_DIR}/../ets2panda" + ln -s "${SCRIPT_DIR}/ets/static/build-tools/ets2panda" "${SCRIPT_DIR}/../ets2panda" echo 'Create a symbolic link to ets2panda' fi diff --git a/ets2panda/bindings/test/run_tests.ts b/ets2panda/bindings/test/run_tests.ts index f76d28a066..36470c173c 100644 --- a/ets2panda/bindings/test/run_tests.ts +++ b/ets2panda/bindings/test/run_tests.ts @@ -471,7 +471,7 @@ if (require.main === module) { const testDir = path.resolve(process.argv[2]); const pathConfig: PathConfig = { - buildSdkPath: path.join(testDir, 'ets', 'ets1.2'), + buildSdkPath: path.join(testDir, 'ets', 'static'), projectPath: path.join(testDir, 'testcases'), declgenOutDir: path.join(testDir, 'testcases', '.idea', '.deveco') }; diff --git a/ets2panda/driver/build_system/src/init/process_build_config.ts b/ets2panda/driver/build_system/src/init/process_build_config.ts index 09c0d539d8..7211e68faf 100644 --- a/ets2panda/driver/build_system/src/init/process_build_config.ts +++ b/ets2panda/driver/build_system/src/init/process_build_config.ts @@ -183,7 +183,7 @@ function initInteropSDKInfo(buildConfig: BuildConfig): void { const basePaths = buildConfig.interopApiPaths?.length ? buildConfig.interopApiPaths - : [path.resolve(buildConfig.buildSdkPath as string, '../ets1.1/build-tools/interop')]; + : [path.resolve(buildConfig.buildSdkPath as string, '../dynamic/build-tools/interop')]; for (const basePath of basePaths) { /** diff --git a/ets2panda/driver/build_system/src/pre_define.ts b/ets2panda/driver/build_system/src/pre_define.ts index a434824c5a..fca8818343 100644 --- a/ets2panda/driver/build_system/src/pre_define.ts +++ b/ets2panda/driver/build_system/src/pre_define.ts @@ -36,12 +36,12 @@ export enum LANGUAGE_VERSION { export const PANDA_SDK_PATH_FROM_SDK: string = './build-tools/ets2panda'; export const SYSTEM_SDK_PATH_FROM_SDK: string = './'; -export const KIT_CONFIGS_PATH_FROM_SDK: string = '../ets1.1/build-tools/ets-loader/kit_configs'; +export const KIT_CONFIGS_PATH_FROM_SDK: string = '../dynamic/build-tools/ets-loader/kit_configs'; export const DEFAULT_WOKER_NUMS: number = 6; -export const ETS_1_1 = 'ets1.1'; -export const ETS_1_1_INTEROP = 'ets1.1interop'; +export const ETS_1_1 = 'dynamic'; +export const ETS_1_1_INTEROP = 'dynamic-interop'; export const sdkConfigPrefix = 'ohos|system|kit|arkts'; export const NATIVE_MODULE: Set = new Set( diff --git a/ets2panda/driver/build_system/test/e2e/demo_file1.2_file1.1_file1.1/build_config.json b/ets2panda/driver/build_system/test/e2e/demo_file1.2_file1.1_file1.1/build_config.json index 616c892c35..223e517106 100644 --- a/ets2panda/driver/build_system/test/e2e/demo_file1.2_file1.1_file1.1/build_config.json +++ b/ets2panda/driver/build_system/test/e2e/demo_file1.2_file1.1_file1.1/build_config.json @@ -1,8 +1,8 @@ { "plugins": { - "ArkUI": "${absolute_path_to_build_system}/test/mock_sdk/ets/ets1.2/build-tools/ui-plugins/lib/ui-plugins/index.js", - "ArkUI-Memo": "${absolute_path_to_build_system}/test/mock_sdk/ets/ets1.2/build-tools/ui-plugins/lib/memo-plugins/index.js" + "ArkUI": "${absolute_path_to_build_system}/test/mock_sdk/ets/static/build-tools/ui-plugins/lib/ui-plugins/index.js", + "ArkUI-Memo": "${absolute_path_to_build_system}/test/mock_sdk/ets/static/build-tools/ui-plugins/lib/memo-plugins/index.js" }, "compileFiles": [ "${absolute_path_to_build_system}/test/e2e/demo_file1.2_file1.1_file1.1/library/file1.ets" diff --git a/ets2panda/driver/build_system/testSuite_ch.md b/ets2panda/driver/build_system/testSuite_ch.md index fc4646ecc4..a693d56301 100644 --- a/ets2panda/driver/build_system/testSuite_ch.md +++ b/ets2panda/driver/build_system/testSuite_ch.md @@ -161,7 +161,7 @@ E2E 测试前的配置步骤如下: - 执行mock_sdk操作,保证本地可以编译 build_system 本身和利用 build_system 编译 hap 包: * SDK可以从[每日构建](https://ci.openharmony.cn/workbench/cicd/dailybuild/dailylist)下载,或者自行编译。 * 下载`ohos-sdk-pulib_0328`,解压获得`ohos-sdk`目录,进入`ohos-sdk/Linux`解压`ets-linux-x64-6.0.0.36-Canary1.zip`获得`ets`目录。 - * `ets/ets1.2`即为SDK目录,将其中的内容复制进 `build_system/test/mock_sdk`即可。 + * `ets/static`即为SDK目录,将其中的内容复制进 `build_system/test/mock_sdk`即可。 * 复制完成后mock_sdk目录下应存在`api`,`arkts`,`build-tools`,`kits`四个文件夹。 - 为mock_sdk/build-tools/ets2panda/bin下的几个可执行文件提供执行权限。 diff --git a/ets2panda/driver/build_system/testSuite_en.md b/ets2panda/driver/build_system/testSuite_en.md index 0cf2e569e4..f064e43f7d 100644 --- a/ets2panda/driver/build_system/testSuite_en.md +++ b/ets2panda/driver/build_system/testSuite_en.md @@ -166,7 +166,7 @@ The configuration steps before E2E testing are as follows: * You can get the SDK for Linux from the [DailyBuild](https://ci.openharmony.cn/workbench/cicd/dailybuild/dailylist). [*Build the SDK from scratch is also an option.*] * Download the `ohos-sdk-public_0328` package and extract it, get `ohos-sdk`. - * Extract `ohos-sdk/linux/ets-linux-x64-6.0.0.36-Canary1.zip`, get `ets` and move `ets/ets1.2` to the `build_system/test/mock_sdk` directory. + * Extract `ohos-sdk/linux/ets-linux-x64-6.0.0.36-Canary1.zip`, get `ets` and move `ets/static` to the `build_system/test/mock_sdk` directory. * After that, the mock_sdk directory should contain the folders `api`, `arkts`, `build-tools`, and `kits`. - Grant execute permissions to the executables under `mock_sdk/build-tools/ets2panda/bin`: diff --git a/ets2panda/linter/homecheck/src/utils/common/SDKUtils.ts b/ets2panda/linter/homecheck/src/utils/common/SDKUtils.ts index f094b9e132..cbee081c95 100644 --- a/ets2panda/linter/homecheck/src/utils/common/SDKUtils.ts +++ b/ets2panda/linter/homecheck/src/utils/common/SDKUtils.ts @@ -24,8 +24,8 @@ export class SdkUtils { static HmsSdkName = 'hmsSdk'; static getEts2SdksWithSdkRelativePath(sdkMap: Map): Sdk[] | null { - const Ets1DirName = 'ets1.1'; - const Ets2DirName = 'ets1.2'; + const Ets1DirName = 'dynamic'; + const Ets2DirName = 'static'; const ets1OhosSdk = sdkMap.get(this.OhosSdkName); const ets1HmsSdk = sdkMap.get(this.HmsSdkName); let sdks: Sdk[] = []; diff --git a/ets2panda/lsp/src/get_safe_delete_info.cpp b/ets2panda/lsp/src/get_safe_delete_info.cpp index ddeeb93dde..fa7d778264 100644 --- a/ets2panda/lsp/src/get_safe_delete_info.cpp +++ b/ets2panda/lsp/src/get_safe_delete_info.cpp @@ -122,7 +122,7 @@ bool GetSafeDeleteInfoImpl(es2panda_Context *context, size_t position) auto declInfo = GetDeclInfoImpl(astNode); auto fileName = std::get<0>(declInfo); std::string normFileName = NormalizeFilePath(fileName); - if (!normFileName.empty() && normFileName.find("ets1.2/build-tools/ets2panda/lib/stdlib") != std::string::npos) { + if (!normFileName.empty() && normFileName.find("static/build-tools/ets2panda/lib/stdlib") != std::string::npos) { return false; } if (!normFileName.empty() && normFileName.find("/sdk/") != std::string::npos) { -- Gitee