@@ -67,21 +67,21 @@ INTEGRATION_TEST_BIN := ${BUILD_DIR}/cassandra-integration-tests
67
67
clean :
68
68
rm -rf " ${BUILD_DIR} "
69
69
70
- update-repo -cache-if-needed :
70
+ update-apt -cache-if-needed :
71
71
@{\
72
72
@sudo find /var/cache/apt -type f -mtime -1 2> /dev/null | grep -c " " 2> /dev/null | grep 0 > /dev/null 2>&1 || (\
73
73
echo " Apt cache is outdated, update it." ; \
74
74
sudo apt-get update || true ; \
75
75
)\
76
76
}
77
77
78
- install-cargo-if-missing : update-repo -cache-if-needed
78
+ install-cargo-if-missing : update-apt -cache-if-needed
79
79
@cargo --version > /dev/null 2>&1 || (\
80
80
echo " Cargo not found in the system, install it." ; \
81
81
sudo apt-get install -y cargo; \
82
82
)
83
83
84
- install-valgrind-if-missing : update-repo -cache-if-needed
84
+ install-valgrind-if-missing : update-apt -cache-if-needed
85
85
@valgrind --version > /dev/null 2>&1 || (\
86
86
echo " Valgrind not found in the system, install it." ; \
87
87
sudo snap install valgrind --classic; \
@@ -103,10 +103,10 @@ install-java8-if-missing:
103
103
sudo apt install -y openjdk-8-jre; \
104
104
}
105
105
106
- install-build-dependencies : update-repo -cache-if-needed
106
+ install-build-dependencies : update-apt -cache-if-needed
107
107
@sudo apt-get install -y libssl1.1 libuv1-dev libkrb5-dev libc6-dbg
108
108
109
- install-bin-dependencies : update-repo -cache-if-needed
109
+ install-bin-dependencies : update-apt -cache-if-needed
110
110
@sudo apt-get install -y libssl1.1 libuv1-dev libkrb5-dev libc6-dbg
111
111
112
112
build-integration-test-bin :
@@ -126,29 +126,39 @@ build-integration-test-bin-if-missing:
126
126
cmake -DCASS_BUILD_INTEGRATION_TESTS=ON .. && (make -j 4 || make); \
127
127
}
128
128
129
- check-cargo : install-cargo-if-missing
129
+ _update-rust-tooling :
130
+ @echo " Run rustup update"
131
+ @rustup update
132
+
133
+ check-cargo : install-cargo-if-missing _update-rust-tooling
134
+ @echo " Running \" cargo check\" in ./scylla-rust-wrapper"
130
135
@cd ${CURRENT_DIR} /scylla-rust-wrapper; cargo check
131
136
132
137
fix-cargo :
138
+ @echo " Running \" cargo fix --verbose --all\" in ./scylla-rust-wrapper"
133
139
@cd ${CURRENT_DIR} /scylla-rust-wrapper; cargo fix --verbose --all
134
140
135
- check-cargo-clippy : install-cargo-if-missing
141
+ check-cargo-clippy : install-cargo-if-missing _update-rust-tooling
142
+ @echo " Running \" cargo clippy --verbose --all-targets -- -D warnings -Aclippy::uninlined_format_args\" in ./scylla-rust-wrapper"
136
143
@cd ${CURRENT_DIR} /scylla-rust-wrapper; cargo clippy --verbose --all-targets -- -D warnings -Aclippy::uninlined_format_args
137
144
138
- fix-cargo-clippy : install-cargo-if-missing
145
+ fix-cargo-clippy : install-cargo-if-missing _update-rust-tooling
146
+ @echo " Running \" cargo clippy --verbose --all-targets --fix -- -D warnings -Aclippy::uninlined_format_args\" in ./scylla-rust-wrapper"
139
147
@cd ${CURRENT_DIR} /scylla-rust-wrapper; cargo clippy --verbose --all-targets --fix -- -D warnings -Aclippy::uninlined_format_args
140
148
141
- check-cargo-fmt : install-cargo-if-missing
149
+ check-cargo-fmt : install-cargo-if-missing _update-rust-tooling
150
+ @echo " Running \" cargo fmt --verbose --all -- --check\" in ./scylla-rust-wrapper"
142
151
@cd ${CURRENT_DIR} /scylla-rust-wrapper; cargo fmt --verbose --all -- --check
143
152
144
- fix-cargo-fmt : install-cargo-if-missing
153
+ fix-cargo-fmt : install-cargo-if-missing _update-rust-tooling
154
+ @echo " Running \" cargo fmt --verbose --all\" in ./scylla-rust-wrapper"
145
155
@cd ${CURRENT_DIR} /scylla-rust-wrapper; cargo fmt --verbose --all
146
156
147
157
check : check-cargo check-cargo-clippy check-cargo-fmt
148
158
149
159
fix : fix-cargo fix-cargo-clippy fix-cargo-fmt
150
160
151
- prepare-integration-test : update-repo -cache-if-needed install-valgrind-if-missing
161
+ prepare-integration-test : update-apt -cache-if-needed install-valgrind-if-missing install-cargo-if-missing _update-rust-tooling
152
162
@sudo sh -c " echo 2097152 >> /proc/sys/fs/aio-max-nr"
153
163
@dpkg -l libc6-dbg > /dev/null 2>&1 || sudo apt-get install -y libc6-dbg
154
164
@@ -184,5 +194,5 @@ endif
184
194
@echo "Running integration tests on cassandra ${CASSANDRA_VERSION}"
185
195
valgrind --error-exitcode=123 --leak-check=full --errors-for-leak-kinds=definite build/cassandra-integration-tests --version=${CASSANDRA_VERSION} --category=CASSANDRA --verbose=ccm --gtest_filter="${CASSANDRA_TEST_FILTER}"
186
196
187
- run-test-unit : install-cargo-if-missing
197
+ run-test-unit : install-cargo-if-missing _update-rust-tooling
188
198
@cd ${CURRENT_DIR} /scylla-rust-wrapper; cargo test
0 commit comments