Skip to content

Commit

Permalink
ci: try fix ci hang
Browse files Browse the repository at this point in the history
  • Loading branch information
Chronostasys committed May 17, 2024
1 parent feb2806 commit 8024989
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: llvm-cov
args: nextest --workspace --all-features --lcov --output-path lcov.info --profile ci -vv --no-capture
args: nextest --workspace --all-features --lcov --output-path lcov.info --profile ci -vv

- name: Upload coverage to Codecov
uses: codecov/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ ignore:
- "src/lsp/wasm.rs"
- "src/lsp/wasm.rs"
- "src/repl/editor.rs"
- "src/repl/*.rs"
# - "src/repl/*.rs"
14 changes: 8 additions & 6 deletions src/ast/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
use std::{
fs::remove_file,
path::PathBuf,
process::Stdio,
sync::{Arc, Mutex},
};

Expand Down Expand Up @@ -506,14 +507,15 @@ fn test_compile() {
.unwrap_or_else(|_| panic!("static compiled file not found {:?}", exe));
eprintln!("exec: {:?}", exe);
let o = Command::new(exe.to_str().unwrap())
.output()
.stdout(Stdio::null())
.stderr(Stdio::null())
.status()
.expect("failed to execute compiled program");

assert!(
o.status.success(),
"static compiled program failed with status {:?} and output {:?} and error {:?}",
o.status,
String::from_utf8_lossy(&o.stdout),
String::from_utf8_lossy(&o.stderr)
o.success(),
"static compiled program failed with status {:?}",
o,
);
drop(l);
}
Expand Down
2 changes: 1 addition & 1 deletion src/repl/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl super::editor::TermEditor for TestEditor {
}
}

#[ignore]
// #[ignore]
#[test]
fn test_repl() {
let rl = TestEditor::new(
Expand Down
3 changes: 3 additions & 0 deletions vm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ fn new_thread(f: *mut i128) {

#[is_runtime]
fn sleep(secs: u64) {
if secs > 100 {
panic!("sleep too long {}", secs);
}
// gc::DioGC__stuck_begin(sp);
println!("sleeping for {} secs", secs);
thread::sleep(std::time::Duration::from_secs(secs));
Expand Down

0 comments on commit 8024989

Please sign in to comment.