Pārlūkot izejas kodu

sbi-testing: use `dep:` prefix on cargo configuration

Signed-off-by: Zhouqi Jiang <luojia@hust.edu.cn>
Zhouqi Jiang 3 mēneši atpakaļ
vecāks
revīzija
b2589c8018

+ 4 - 1
.github/workflows/ci.yml

@@ -120,9 +120,12 @@ jobs:
           target: ${{ matrix.TARGET }}
           toolchain: nightly
       - uses: Swatinem/rust-cache@v2
-      - name: Build
+      - name: Build (no default features)
         run: |
           cargo build --target ${{ matrix.TARGET }} --verbose -p sbi-testing
+      - name: Build (log)
+        run: |
+          cargo build --target ${{ matrix.TARGET }} --verbose -p sbi-testing --features "log"
 
 # sbi-testing:
 #     name: Run rust-clippy analyzing

+ 2 - 2
sbi-testing/Cargo.toml

@@ -21,7 +21,7 @@ targets = ["riscv32imac-unknown-none-elf", "riscv64imac-unknown-none-elf"]
 sbi-rt = { version = "0.0.3", path = "../sbi-rt" }
 sbi-spec = { version = "0.0.7", path = "../sbi-spec" }
 riscv = "0.11.0"
-log_crate = { version = "0.4", package = "log", optional = true }
+log = { version = "0.4", package = "log", optional = true }
 
 [features]
-log = ["log_crate"]
+log = ["dep:log"]

+ 0 - 3
sbi-testing/src/lib.rs

@@ -8,9 +8,6 @@ mod thread;
 
 pub extern crate sbi_rt as sbi;
 
-#[cfg(feature = "log")]
-pub extern crate log_crate as log;
-
 #[cfg(feature = "log")]
 mod log_test;
 

+ 1 - 1
sbi-testing/src/log_test.rs

@@ -1,5 +1,5 @@
 use crate::{base, dbcn, hsm, spi, time};
-use log_crate::*;
+use log::*;
 
 /// Automatic SBI testing with logging enabled.
 pub struct Testing {