Skip to content

Commit

Permalink
fix: adjust test cases that need to run command to serial execution. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
zong-zhe authored May 9, 2023
1 parent 2ac73b2 commit e6f5806
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
4 changes: 2 additions & 2 deletions kclvm/cmd/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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();
}
Expand Down
18 changes: 0 additions & 18 deletions kclvm/parser/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Vec<String>, String> {
// plugin pkgs
if self.is_plugin_pkg(pkgpath) {
Expand Down

0 comments on commit e6f5806

Please sign in to comment.