diff --git a/src/installService.py b/src/installService.py index 0c9d890b1d9408dfbe241179d430977526305058..8b2b75feaa424f938fc7286899fd6cde0b9bda82 100644 --- a/src/installService.py +++ b/src/installService.py @@ -108,8 +108,6 @@ class InstallService: version = self.get_version_info(file_name) if version in ver_dict: return ver_dict[version] - elif version: - break return version def get_hmpi_info(self): @@ -158,7 +156,7 @@ class InstallService: abs_software_path = os.path.join(self.PACKAGE_PATH, software_path) if not os.path.exists(abs_software_path): print(f"{software_path} not exist, are you sure the software lies in package dir?") - return False + return None return abs_software_path def check_compiler_mpi(self, compiler_list, compiler_mpi_info): @@ -176,7 +174,7 @@ class InstallService: break if not is_valid: print(f"compiler or mpi info error, Only {valid_list.join('/').lower()} is supported") - return False + return None return compiler_mpi_info def get_used_compiler(self, compiler_mpi_info): @@ -439,9 +437,9 @@ chmod +x {install_script} software_path = self.remove_prefix(software_path) # software_path should exists abs_software_path = self.check_software_path(software_path) - if not abs_software_path: return + if abs_software_path is not None: return compiler_mpi_info = self.check_compiler_mpi(compilers.keys(), compiler_mpi_info) - if not compiler_mpi_info: return + if compiler_mpi_info is not None: return software_info = self.get_software_info(software_path, compiler_mpi_info) stype = software_info['type'] # get compiler name and version diff --git a/test/test-git.sh b/test/test-git.sh new file mode 100644 index 0000000000000000000000000000000000000000..9f8e941accf18b24a3c9afccb3bf21fd29441e42 --- /dev/null +++ b/test/test-git.sh @@ -0,0 +1,16 @@ +#!/bin/bash +cd .. +# release git src code +rm -rf tmp/git-2.35.1 +# copy templates +cp -rf templates/git/2.35.1/data.git.arm.bisheng.config ./ +# switch to config +./jarvis -use data.git.arm.bisheng.config +# download git src code +./jarvis -d +# install dependency +./jarvis -dp +# build +./jarvis -b +# run +./jarvis -r \ No newline at end of file