File tree Expand file tree Collapse file tree 4 files changed +54
-7
lines changed
stm32cubeprogrammer-cli/src Expand file tree Collapse file tree 4 files changed +54
-7
lines changed Original file line number Diff line number Diff line change 1
- # TODO
1
+ name : test suite
2
+ on : [push, pull_request]
3
+
4
+ env :
5
+ CLICOLOR : 1
6
+
7
+ jobs :
8
+ spelling :
9
+ name : Spell Check with Typos
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - name : Checkout Actions Repository
13
+ uses : actions/checkout@v4
14
+ - name : Spell Check Repo
15
+
16
+
17
+ clippy :
18
+ name : clippy
19
+ runs-on : ubuntu-latest
20
+ steps :
21
+ - uses : actions/checkout@v4
22
+ - uses : dtolnay/rust-toolchain@stable
23
+ - run : cargo clippy -- -D warnings
24
+
25
+ format :
26
+ name : format
27
+ runs-on : ubuntu-latest
28
+ steps :
29
+ - uses : actions/checkout@v4
30
+ - uses : dtolnay/rust-toolchain@stable
31
+ - run : cargo fmt -- --check
32
+
33
+ test_and_build :
34
+ strategy :
35
+ matrix :
36
+ os : [ubuntu-latest, windows-latest]
37
+
38
+ name : test_and_build
39
+ runs-on : ${{ matrix.os }}
40
+ steps :
41
+ - uses : actions/checkout@v4
42
+ - uses : dtolnay/rust-toolchain@stable
43
+ - run : cargo test --release
44
+ - run : cargo b --release
Original file line number Diff line number Diff line change
1
+ [files ]
2
+ extend-exclude = [
3
+ " stm32cubeprogrammer-sys/include" ,
4
+ " stm32cubeprogrammer-sys/src/bindings_unix.rs" ,
5
+ " stm32cubeprogrammer-sys/src/bindings_windows.rs" ,
6
+ ]
Original file line number Diff line number Diff line change 7
7
//! - Enabling read protection
8
8
//! - Disabling read protection
9
9
//! - Resetting target
10
- //!
10
+ //!
11
11
//! All commands above can be combined in a single command line invocation by chaining them.
12
- //!
12
+ //!
13
13
//! If you need other commands, feel free to open an issue or a pull request. :smile:
14
14
//!
15
15
//! # Example usage:
28
28
//! ```sh
29
29
//! STM32_CUBE_PROGRAMMER_DIR=`installation_dir` stm32cubeprogrammer-cli unprotect reset flash-hex `path_to_hex_file` protect
30
30
//! ```
31
- //!
31
+ //!
32
32
//! Use the `--list` flag to list available probes.
33
33
//! ```sh
34
34
//! stm32cubeprogrammer-cli --stm32-cube-programmer-dir `installation_dir` --list
Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ mod test {
165
165
166
166
#[ test]
167
167
fn parse_reset ( ) {
168
- dotenvy :: dotenv ( ) . expect ( "Failed to load .env file ") ;
168
+ std :: env :: set_var ( "STM32_CUBE_PROGRAMMER_DIR" , "some/dir ") ;
169
169
170
170
let value = options ( ) . run_inner ( & [ "reset" ] ) . unwrap ( ) ;
171
171
println ! ( "{:?}" , value) ;
@@ -198,8 +198,6 @@ mod test {
198
198
199
199
#[ test]
200
200
fn parse_multi ( ) {
201
- dotenvy:: dotenv ( ) . expect ( "Failed to load .env file" ) ;
202
-
203
201
let value = options ( )
204
202
. run_inner ( & [
205
203
"--stm32-cube-programmer-dir" ,
You can’t perform that action at this time.
0 commit comments