File tree Expand file tree Collapse file tree 3 files changed +43
-12
lines changed Expand file tree Collapse file tree 3 files changed +43
-12
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ cargo:check:
118
118
<< : *script-cargo-check
119
119
script :
120
120
# enable property tests for the stable 'pipeline'
121
- - scripts/bigdecimal-property-tests cargo check --all-targets
121
+ - scripts/bigdecimal-property-tests run cargo check --all-targets
122
122
123
123
cargo:clippy :
124
124
stage : check
@@ -158,7 +158,7 @@ cargo:build-stable:
158
158
<< : *script-cargo-build
159
159
script :
160
160
# enable property tests for the stable 'pipeline'
161
- - scripts/bigdecimal-property-tests cargo build --all-targets
161
+ - scripts/bigdecimal-property-tests run cargo build --all-targets
162
162
163
163
164
164
cargo:test-stable :
@@ -171,7 +171,7 @@ cargo:test-stable:
171
171
<< : *script-cargo-test
172
172
script :
173
173
# enable property tests for the stable 'pipeline'
174
- - scripts/bigdecimal-property-tests cargo test
174
+ - scripts/bigdecimal-property-tests run cargo test
175
175
176
176
177
177
cargo:build:no-std :
Original file line number Diff line number Diff line change 5
5
# Tests are defined in src/lib.tests.property-test.rs
6
6
#
7
7
8
- # enable property-test dependencies in Cargo
9
- sed -i.bak -e ' s|# PROPERTY-TESTS: ||' Cargo.toml
8
+ function enable_property_tests() {
9
+ # enable property-test dependencies in Cargo
10
+ sed -i.bak -e ' s|# PROPERTY-TESTS: ||' Cargo.toml
10
11
11
- # include the property-test file in lib.rs
12
- sed -i.bak -e ' s|// ::PROPERTY-TESTS:: ||' build.rs
12
+ # add the property-test configuration in build.rs
13
+ sed -i.bak -e ' s|// ::PROPERTY-TESTS:: ||' build.rs
14
+ }
13
15
14
- # Run commands
15
- " $@ "
16
16
17
- # Restore Cargo.toml with backup
18
- mv Cargo.toml.bak Cargo.toml
19
- mv src/lib.rs.bak src/lib.rs
17
+ function restore_disabled_property_tests() {
18
+ # Restore Cargo.toml with backup
19
+ mv Cargo.toml.bak Cargo.toml
20
+ mv build.rs.bak build.rs
21
+ }
22
+
23
+
24
+ DEFAULT_CMD=run
25
+ CMD=${1:- $DEFAULT_CMD }
26
+ shift
27
+
28
+ case " ${CMD} " in
29
+ run)
30
+ enable_property_tests
31
+ # Run commands
32
+ " $@ "
33
+ restore_disabled_property_tests
34
+ ;;
35
+
36
+ test)
37
+ enable_property_tests
38
+ cargo test $@
39
+ restore_disabled_property_tests
40
+ ;;
41
+
42
+ enable)
43
+ enable_property_tests
44
+ ;;
45
+
46
+ disable)
47
+ restore_disabled_property_tests
48
+ ;;
49
+ esac
Original file line number Diff line number Diff line change @@ -3364,6 +3364,7 @@ extern crate proptest;
3364
3364
mod proptests {
3365
3365
use super :: * ;
3366
3366
use paste:: paste;
3367
+ use proptest:: * ;
3367
3368
3368
3369
include ! ( "lib.tests.property-tests.rs" ) ;
3369
3370
}
You can’t perform that action at this time.
0 commit comments