diff --git a/.gitignore b/.gitignore index 31aec5cdf13fc2e970998ec30b8989c9cf4e790f..6093f6bb04ffb29a014cb2abc76c6d480f44dceb 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ component/LkpTests/compatibility_help/compatibility_testing component/LkpTests/compatibility_help/compatibility_testing.tar.gz component/LkpTests/lkp_help/lkp-tests.tar.gz component/DevkitDistribute/devkit_distribute/config/log.ini -component/DevkitDistribute/devkit_distribute/config/devkit_distribute.yaml \ No newline at end of file +component/DevkitDistribute/devkit_distribute/config/devkit_distribute.yaml +devkitdependencies \ No newline at end of file diff --git a/component/DevkitDistribute/check_install_result.sh b/component/DevkitDistribute/check_install_result.sh index 2f652085130000c9f49e08a16744342765098fbe..d04a89b29ab2826a86cf33a8d310dd0f500bb423 100644 --- a/component/DevkitDistribute/check_install_result.sh +++ b/component/DevkitDistribute/check_install_result.sh @@ -1,6 +1,6 @@ #!/bin/bash -if [ -e "${HOME}"/.local/lkp-tests/programs/devkit_distribute ] ; then +if [ -e "${HOME}"/.local/devkit_distribute ] ; then echo "true" else echo "false" diff --git a/component/DevkitDistribute/install.sh b/component/DevkitDistribute/install.sh index 3d2a3b8b74f2d68249753001a3e0a07da43d2466..1f4a0941f8d9329da99a0435349313ade2b7e850 100644 --- a/component/DevkitDistribute/install.sh +++ b/component/DevkitDistribute/install.sh @@ -4,11 +4,8 @@ set -e function main (){ - devkit_distribute_tar=$1 - echo "Decompress devkit_distribute.tar.gz to ${HOME}/.local/lkp-tests/programs" - tar --no-same-owner -zxf "${devkit_distribute_tar}" -C "${HOME}"/.local/lkp-tests/programs - chmod 755 "${HOME}"/.local/lkp-tests/programs/devkit_distribute/bin/start.sh - ln -s "${HOME}"/.local/lkp-tests/programs/devkit_distribute/bin/start.sh "${HOME}"/.local/lkp-tests/tests/devkit_distribute + echo "Decompress devkit_distribute.tar.gz to ${HOME}/.local/" + tar --no-same-owner -zxf /tmp/devkitdependencies/devkit_distribute.tar.gz -C ${HOME}/.local echo "Decompress devkit_distribute.tar.gz to ${HOME}/.local finished." } diff --git a/tools/install_dependency/src/constant.py b/tools/install_dependency/src/constant.py index c58f2795cfb1cc496e4defbdd947f963b3b19c1a..77cc4df039f0dedc3fbc84ea2987237788c14900 100644 --- a/tools/install_dependency/src/constant.py +++ b/tools/install_dependency/src/constant.py @@ -5,6 +5,7 @@ SCANNER = "scanner" JAVA_BUILDER = "java_builder" C_BUIDLER = "c_cpp_builder" EXECUTOR = "executor" +JAVA_EXECUTOR = "java_executor" DEVKIT = "devkit" MACHINE = "machine" DEPENDENCY_FILE = "devkitdependencies.tar.gz" @@ -16,11 +17,12 @@ ROLE_COMPONENT = { SCANNER: ["BiShengJDK17", "DevKitCLI"], C_BUIDLER: ["GCCforOpenEuler", "BiShengCompiler", "BiShengJDK17", "A-FOT", "NonInvasiveSwitching"], JAVA_BUILDER: ["BiShengJDK17", "BiShengJDK8"], - EXECUTOR: ["BiShengJDK17", "LkpTests"], + EXECUTOR: ["BiShengJDK17", "DevkitDistribute", "LkpTests"], + JAVA_EXECUTOR: ["BiShengJDK17", "DevkitDistribute", ], DEVKIT: ["DevKitWeb"] } -ROLE_LIST = [SCANNER, C_BUIDLER, JAVA_BUILDER, EXECUTOR, DEVKIT] +ROLE_LIST = [SCANNER, C_BUIDLER, JAVA_BUILDER, EXECUTOR, DEVKIT, JAVA_EXECUTOR] FILE = "file" SHA256 = "sha256" diff --git a/tools/install_dependency/src/download/download_config.py b/tools/install_dependency/src/download/download_config.py index ac84b37199f1944d097a64d4d189dccb69672da5..b9d16234893ae140aef73a4e96b8e57076599bfc 100644 --- a/tools/install_dependency/src/download/download_config.py +++ b/tools/install_dependency/src/download/download_config.py @@ -25,7 +25,11 @@ LkpTests = { "file": "https://gitee.com/openeuler/devkit-pipeline/releases/download/v0.2/lkp-tests.tar.gz", "GemDependency": "https://gitee.com/openeuler/devkit-pipeline/releases/download/v0.2/gem_dependencies.zip", "CompatibilityTesting": "https://gitee.com/openeuler/devkit-pipeline/releases/download/v0.2/compatibility_testing.tar.gz", - "DevkitDistribute": "https://gitee.com/openeuler/devkit-pipeline/releases/download/v0.2/devkit_distribute.tar.gz", +} + +DevkitDistribute = { + "component_name": "DevkitDistribute", + "file": "https://gitee.com/openeuler/devkit-pipeline/releases/download/v0.2/devkit_distribute.tar.gz", } A_FOT = { diff --git a/tools/install_dependency/src/download/download_utils.py b/tools/install_dependency/src/download/download_utils.py index 4be85f22db4a856a0acc5aefbe4919ba26efd73f..4080a255ab06508708d7c1fd1cc98500a8e757ec 100644 --- a/tools/install_dependency/src/download/download_utils.py +++ b/tools/install_dependency/src/download/download_utils.py @@ -79,9 +79,13 @@ component_collection_map = { SAVE_PATH: f"{os.path.join(DEFAULT_PATH, download_config.LkpTests.get('CompatibilityTesting').split('/')[-1])}", FILE_SIZE: "76645477", }, - "DevkitDistribute": { - URL: f"{download_config.LkpTests.get('DevkitDistribute')}", - SAVE_PATH: f"{os.path.join(DEFAULT_PATH, download_config.LkpTests.get('DevkitDistribute').split('/')[-1])}", + + }, + + "DevkitDistribute": { + "download file": { + URL: f"{download_config.DevkitDistribute.get(FILE)}", + SAVE_PATH: f"{os.path.join(DEFAULT_PATH, download_config.DevkitDistribute.get(FILE).split('/')[-1])}", FILE_SIZE: "13349694", } }, diff --git a/tools/install_dependency/src/handler/base_yaml_check.py b/tools/install_dependency/src/handler/base_yaml_check.py index 1f9d387647720e9a2ac3c53a6bb342ce8d2e64ae..1e9bc23e268d55ce16c360e20a3593e381ad62e5 100644 --- a/tools/install_dependency/src/handler/base_yaml_check.py +++ b/tools/install_dependency/src/handler/base_yaml_check.py @@ -8,7 +8,7 @@ from constant import ROLE_LIST LOGGER = logging.getLogger("install_dependency") MIN_SET = (constant.USER, constant.PKEY, constant.INSTRUCTION) MAX_SET = (constant.USER, constant.PKEY, constant.PASSWORD, - constant.SCANNER, constant.JAVA_BUILDER, constant.C_BUIDLER, constant.EXECUTOR, + constant.SCANNER, constant.JAVA_BUILDER, constant.C_BUIDLER, constant.EXECUTOR, constant.JAVA_EXECUTOR, constant.DEVKIT, constant.INSTRUCTION) diff --git a/tools/install_dependency/src/machine/machine.py b/tools/install_dependency/src/machine/machine.py index ed67933495394a13c63dddbbe99fbd46e6f5f97f..6bf8b7858c144624c7edc5cf27e790ad104f800c 100644 --- a/tools/install_dependency/src/machine/machine.py +++ b/tools/install_dependency/src/machine/machine.py @@ -136,6 +136,7 @@ class Machine: "BiShengCompiler": self.default_install_component_handle, "BiShengJDK17": self.default_install_component_handle, "BiShengJDK8": self.default_install_component_handle, + "DevkitDistribute": self.default_install_component_handle, "LkpTests": self.lkptest_install_component_handle, "NonInvasiveSwitching": self.nis_install_component_handle, "DevKitWeb": self.devkitweb_install_component_handle, @@ -248,7 +249,6 @@ class Machine: # 清理tmp临时文件 self.clear_tmp_file_at_remote_machine(ssh_client, remote_file_list) self.__install_component_on_lkptest("CompatibilityTesting", sftp_client, ssh_client) - self.__install_component_on_lkptest("DevkitDistribute", sftp_client, ssh_client) def __install_component_on_lkptest(self, sub_component_name, sftp_client, ssh_client): # 上传 tar.gz 文件