diff --git a/kclvm/cmd/src/tests.rs b/kclvm/cmd/src/tests.rs index 656bf0648..a07bf355d 100644 --- a/kclvm/cmd/src/tests.rs +++ b/kclvm/cmd/src/tests.rs @@ -64,7 +64,6 @@ fn test_fmt_cmd() { assert!(fmt_command(&matches).is_ok()) } -#[test] fn test_vet_cmd() { let test_path = std::path::Path::new(".") .join("src") @@ -188,8 +187,9 @@ fn test_external_cmd_invalid() { } #[test] -// +// All the unit test cases in [`test_run_command`] can not be executed concurrently. fn test_run_command() { + test_vet_cmd(); test_run_command_with_import(); test_run_command_with_konfig(); } diff --git a/kclvm/parser/src/lib.rs b/kclvm/parser/src/lib.rs index ef303f759..481d16004 100644 --- a/kclvm/parser/src/lib.rs +++ b/kclvm/parser/src/lib.rs @@ -571,24 +571,6 @@ impl Loader { Ok(Some(pkg_info)) } - fn get_import_list(&self, pkgroot: &str, pkg: &[ast::Module]) -> Vec<(String, ast::Pos)> { - let mut import_list = Vec::new(); - for m in pkg { - for stmt in &m.body { - if let ast::Stmt::Import(import_spec) = &stmt.node { - let mut import_spec = import_spec.clone(); - import_spec.path = kclvm_config::vfs::fix_import_path( - pkgroot, - &m.filename, - import_spec.path.as_str(), - ); - import_list.push((import_spec.path, stmt.pos().into())); - } - } - } - import_list - } - fn get_pkg_kfile_list(&self, pkgroot: &str, pkgpath: &str) -> Result, String> { // plugin pkgs if self.is_plugin_pkg(pkgpath) {