Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix the log output of integration tests and output more logs #2454

Conversation

yangby-cryptape
Copy link
Collaborator

  • In Makefile we set RUST_LOG but in main.rs we parse CKB_LOG for the log filter.

    ckb/Makefile

    Lines 37 to 43 in d04f413

    integration: submodule-init setup-ckb-test ## Run integration tests in "test" dir.
    cargo build --features deadlock_detection
    RUST_BACKTRACE=1 RUST_LOG=${INTEGRATION_RUST_LOG} test/run.sh -- --bin ../target/debug/ckb ${CKB_TEST_ARGS}
    .PHONY: integration-release
    integration-release: submodule-init setup-ckb-test prod
    RUST_BACKTRACE=1 RUST_LOG=${INTEGRATION_RUST_LOG} test/run.sh --release -- --bin ../target/release/ckb ${CKB_TEST_ARGS}

    ckb/test/src/main.rs

    Lines 39 to 42 in d04f413

    let _ = {
    let filter = env::var("CKB_LOG").unwrap_or_else(|_| "info".to_string());
    env_logger::builder().parse_filters(&filter).try_init()
    };
  • Use RUST_LOG not CKB_LOG, because CKB_LOG will override the configurations of nodes which started by ckb-tests.
  • Add more log outputs.

@doitian doitian added this to 😴 Awaiting Review in CKB - Pull Requests Dec 24, 2020
@yangby-cryptape
Copy link
Collaborator Author

bors r=keroro520,chuijiaolianying,quake

bors bot added a commit that referenced this pull request Dec 25, 2020
2454: ci: fix the log output of integration tests and output more logs r=keroro520,chuijiaolianying,quake a=yangby-cryptape

- In `Makefile` we set `RUST_LOG` but in `main.rs` we parse `CKB_LOG` for the log filter.
    https://github.com/nervosnetwork/ckb/blob/d04f413879a7e62d2f21eebefda9c4f58cec22f2/Makefile#L37-L43
    https://github.com/nervosnetwork/ckb/blob/d04f413879a7e62d2f21eebefda9c4f58cec22f2/test/src/main.rs#L39-L42
- Use `RUST_LOG` not `CKB_LOG`, because `CKB_LOG` will override the configurations of nodes which started by `ckb-tests`.
- Add more log outputs.

Co-authored-by: Boyu Yang <yangby@cryptape.com>
@yangby-cryptape
Copy link
Collaborator Author

yangby-cryptape commented Dec 25, 2020

Requires the approving review from @doitian as a code owner .

@yangby-cryptape
Copy link
Collaborator Author

ping @doitian

CKB - Pull Requests automation moved this from 😴 Awaiting Review to ✅ Reviewer approved Jan 4, 2021
@doitian
Copy link
Member

doitian commented Jan 4, 2021

bors retry

@bors
Copy link
Contributor

bors bot commented Jan 4, 2021

Build succeeded:

  • continuous-integration/travis-ci/push

@bors bors bot merged commit 6f64db4 into nervosnetwork:develop Jan 4, 2021
CKB - Pull Requests automation moved this from ✅ Reviewer approved to Done Jan 4, 2021
@yangby-cryptape yangby-cryptape deleted the pr/fix-integration-tests-log-output branch January 28, 2021 05:07
bors bot added a commit that referenced this pull request Nov 26, 2021
3198: chore: upgrade deps r=zhangsoledad,yangby-cryptape a=driftluo

### What problem does this PR solve?

ipnetwork 0.14 -> 0.18

There is no security fix, only partially optimized code

achanda/ipnetwork@v0.14.0...v0.18.0

futures 0.3.12 -> 0.3.18
```
# 0.3.18 - 2021-11-23

* Fix unusable `Sink` implementation on `stream::Scan` (#2499)
* Make `task::noop_waker_ref` available without `std` feature (#2505)
* Add async `LineWriter` (#2477)
* Remove dependency on `proc-macro-hack`. This raises MSRV of utility crates to 1.45. (#2520)

# 0.3.17 - 2021-08-30

* Use `FuturesOrdered` in `join_all` (#2412)
* Add `{future, stream}::poll_immediate` (#2452)
* Add `stream_select!` macro (#2262)
* Implement `Default` for `OptionFuture` (#2471)
* Add `Peekable::{peek_mut, poll_peek_mut}` (#2488)
* Add `BufReader::seek_relative` (#2489)

# 0.3.16 - 2021-07-23

* Add `TryStreamExt::try_chunks` (#2438)
* Add `StreamExt::{all, any}` (#2460)
* Add `stream::select_with_strategy` (#2450)
* Update to new `io_slice_advance` interface (#2454)

# 0.3.15 - 2021-05-11

* Use `#[proc_macro]` at Rust 1.45+ to fix an issue where proc macros don't work with rust-analyzer (#2407)
* Support targets that do not have atomic CAS on stable Rust (#2400)
* futures-test: Add async `#[test]` function attribute (#2409)
* Add `stream::abortable` (#2410)
* Add `FuturesUnordered::clear` (#2415)
* Implement `IntoIterator` for `FuturesUnordered` (#2423)
* Implement `Send` and `Sync` for `FuturesUnordered` iterators (#2416)
* Make `FuturesUnordered::iter_pin_ref` public (#2423)
* Add `SelectAll::clear` (#2430)
* Add `SelectAll::{iter, iter_mut}` (#2428)
* Implement `IntoIterator` for `SelectAll` (#2428)
* Implement `Clone` for `WeakShared` (#2396)

# 0.3.14 - 2021-04-10

* Add `future::SelectAll::into_inner` (#2363)
* Allow calling `UnboundedReceiver::try_next` after `None` (#2369)
* Reexport non-Ext traits from the root of `futures_util` (#2377)
* Add `AsyncSeekExt::stream_position` (#2380)
* Add `stream::Peekable::{next_if, next_if_eq}` (#2379)

# 0.3.13 - 2021-02-23

* Mitigated starvation issues in `FuturesUnordered` (#2333)
* Fixed race with dropping `mpsc::Receiver` (#2304)
* Added `Shared::{strong_count, weak_count}` (#2346)
* Added `no_std` support for `task::noop_waker_ref` (#2332)
* Implemented `Stream::size_hint` for `Either` (#2325)
```

### Check List

Tests

- Unit test
- Integration test

### Release note

```release-note
None: Exclude this PR from the release note.
```



Co-authored-by: driftluo <driftluo@foxmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

5 participants