Skip to content

Commit a7e00d7

Browse files
mayastor-borstiagolobocastro
mayastor-bors
andcommitted
Merge #1694
1694: ci: ensure fmt fails on jenkins r=tiagolobocastro a=tiagolobocastro Co-authored-by: Tiago Castro <tiagolobocastro@gmail.com>
2 parents 6b4def0 + 41a3b33 commit a7e00d7

16 files changed

+29
-178
lines changed

Cargo.lock

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Jenkinsfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,10 @@ pipeline {
138138
steps {
139139
cleanWs()
140140
unstash 'source'
141-
sh 'nix-shell --run "./scripts/rust-style.sh" ci.nix'
141+
sh 'nix-shell --run "FMT_OPTS=--check ./scripts/rust-style.sh" ci.nix'
142142
sh 'nix-shell --run "./scripts/rust-linter.sh" ci.nix'
143143
sh 'nix-shell --run "./scripts/js-check.sh" ci.nix'
144+
sh 'nix-shell --run "nixpkgs-fmt --check ." ci.nix'
144145
script {
145146
if (env.BRANCH_NAME != "trying") {
146147
sh 'nix-shell --run "./scripts/check-submodule-branches.sh" ci.nix'

ci.nix

+6-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ let
3737
numactl
3838
pytest_inputs
3939
udev
40+
libnvme
41+
nvme-cli
4042
xfsprogs
43+
nixpkgs-fmt
4144
];
4245

4346
shellEnv = with pkgs; {
@@ -67,6 +70,6 @@ let
6770
};
6871
};
6972
in
70-
pkgs.mkShell shellAttrs // {
71-
name = "io-engine-dev-shell";
72-
}
73+
pkgs.mkShell shellAttrs // {
74+
name = "io-engine-dev-shell";
75+
}

ide.nix

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
, spdk ? "develop"
33
, spdk-path ? null
44
} @ args:
5-
import ./ci.nix {
6-
inherit rust;
7-
inherit spdk;
8-
inherit spdk-path;
9-
}
5+
import ./ci.nix {
6+
inherit rust;
7+
inherit spdk;
8+
inherit spdk-path;
9+
}

io-engine/src/bdev/nvmx/qpair.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ use spdk_rs::libspdk::{
2222
spdk_nvme_qpair_set_abort_dnr,
2323
};
2424

25+
use std::mem::zeroed;
2526
#[cfg(feature = "spdk-async-qpair-connect")]
2627
use std::{os::raw::c_void, time::Duration};
27-
use std::mem::zeroed;
2828

2929
#[cfg(feature = "spdk-async-qpair-connect")]
3030
use spdk_rs::{

io-engine/src/core/env.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ use spdk_rs::{
2727
libspdk::{
2828
spdk_app_shutdown_cb,
2929
spdk_env_dpdk_post_init,
30+
spdk_env_dpdk_rte_eal_init,
3031
spdk_env_fini,
3132
spdk_log_close,
3233
spdk_log_level,
@@ -43,7 +44,6 @@ use spdk_rs::{
4344
spdk_thread_lib_fini,
4445
spdk_thread_send_critical_msg,
4546
spdk_trace_cleanup,
46-
spdk_env_dpdk_rte_eal_init,
4747
SPDK_LOG_DEBUG,
4848
SPDK_LOG_INFO,
4949
SPDK_RPC_RUNTIME,

nix/overlay.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ self: super: rec {
1414
nvmet-cli = super.callPackage ./pkgs/nvmet-cli { };
1515
units = (super.callPackage ./pkgs/io-engine/units.nix { inherit tag sourcer; });
1616
}
17-
// (import ../spdk-rs/nix/overlay.nix { } self super)
17+
// (import ../spdk-rs/nix/overlay.nix { } self super)

nix/pkgs/io-engine/cargo-package.nix

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
, targetPlatform
2828
, versions
2929
, systemdMinimal
30+
, rdma-core
3031
, cargoBuildFlags ? [ ]
3132
}:
3233
let
@@ -87,6 +88,7 @@ let
8788
protobuf
8889
systemdMinimal.dev
8990
utillinux.dev
91+
rdma-core
9092
];
9193
cargoLock = {
9294
lockFile = ../../../Cargo.lock;

nix/pkgs/io-engine/default.nix

-22
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,5 @@
11
{ stdenv
2-
, clang
3-
, dockerTools
4-
, e2fsprogs
52
, lib
6-
, libaio
7-
, libbsd
8-
, libspdk
9-
, libspdk-dev
10-
, libpcap
11-
, udev
12-
, liburing
13-
, makeRustPlatform
14-
, numactl
15-
, openssl
16-
, pkg-config
17-
, protobuf
18-
, sources
19-
, xfsprogs
20-
, utillinux
21-
, llvmPackages
22-
, targetPackages
23-
, buildPackages
24-
, targetPlatform
253
, pkgs
264
, git
275
, tag

nix/sources.nix

-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
21
# Redirects to `spdk-rs`.
32
import ../spdk-rs/nix/sources.nix

scripts/rust-linter-env.sh

-134
This file was deleted.

scripts/rust-linter.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
source ${BASH_SOURCE%/*}/rust-linter-env.sh
3+
source ${BASH_SOURCE%/*}/../spdk-rs/scripts/rust-linter-env.sh
44
$CARGO clippy --all --all-targets --features=io-engine-testing -- -D warnings \
55
-A clippy::await-holding-lock \
66
-A clippy::await-holding-refcell-ref \

scripts/rust-style.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
FMT_OPTS=${FMT_OPTS:-""}
44

5-
source ${BASH_SOURCE%/*}/rust-linter-env.sh
5+
source ${BASH_SOURCE%/*}/../spdk-rs/scripts/rust-linter-env.sh
66
$CARGO fmt --all -- $FMT_OPTS

shell.nix

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
, spdk ? "develop"
33
, spdk-path ? null
44
} @ args:
5-
import ./ci.nix {
6-
inherit rust;
7-
inherit spdk;
8-
inherit spdk-path;
9-
}
5+
import ./ci.nix {
6+
inherit rust;
7+
inherit spdk;
8+
inherit spdk-path;
9+
}

0 commit comments

Comments
 (0)