@@ -43,17 +43,18 @@ jobs:
4343 export PATH="/home/docker/.cargo/bin:$PATH"
4444 export RUSTUP_HOME=/home/docker/.rustup
4545 export CARGO_HOME=$AGENT_TEMPDIRECTORY/.cargo
46- export RUSTFLAGS="-D warnings"
47- export RUSTDOCFLAGS="-D warnings"
4846 cargo fmt --check
4947 displayName: 'cargo fmt --check'
5048
5149 - script : |
5250 export PATH="/home/docker/.cargo/bin:$PATH"
5351 export RUSTUP_HOME=/home/docker/.rustup
5452 export CARGO_HOME=$AGENT_TEMPDIRECTORY/.cargo
53+ # Soon to be superceded by the commented out `cargo clippy` below.
54+ # This is different from `cargo build`
55+ # as that uses `--features dynamic-instrumention` (see below)
56+ # and this uses `--all-features` to check everything.
5557 export RUSTFLAGS="-D warnings"
56- export RUSTDOCFLAGS="-D warnings"
5758 cargo check --tests --all-features
5859 displayName: 'cargo check'
5960
@@ -62,32 +63,40 @@ jobs:
6263 # export RUSTUP_HOME=/home/docker/.rustup
6364 # export CARGO_HOME=$AGENT_TEMPDIRECTORY/.cargo
6465 # export RUSTFLAGS="-D warnings"
65- # export RUSTDOCFLAGS="-D warnings"
6666 # cargo clippy --tests --all-features
6767 # displayName: 'cargo clippy'
6868
6969 - script : |
7070 export PATH="/home/docker/.cargo/bin:$PATH"
7171 export RUSTUP_HOME=/home/docker/.rustup
7272 export CARGO_HOME=$AGENT_TEMPDIRECTORY/.cargo
73+ # Build these with `--features dynamic-instrumentation`
74+ # instead of `--all-features` as `--all-features` includes `--features llvm-static`,
75+ # which we don't want to test here (it doesn't work out of the box on Arch and Fedora;
76+ # see https://github.com/immunant/c2rust/issues/500).
7377 export RUSTFLAGS="-D warnings"
74- export RUSTDOCFLAGS="-D warnings"
7578 cargo build --release --features dynamic-instrumentation
7679 displayName: 'cargo build against host clang/LLVM (fast build)'
7780
7881 - script : |
7982 export PATH="/home/docker/.cargo/bin:$PATH"
8083 export RUSTUP_HOME=/home/docker/.rustup
8184 export CARGO_HOME=$AGENT_TEMPDIRECTORY/.cargo
85+ # Build these with `--features dynamic-instrumentation`
86+ # instead of `--all-features` as `--all-features` includes `--features llvm-static`,
87+ # which we don't want to test here (it doesn't work out of the box on Arch and Fedora;
88+ # see https://github.com/immunant/c2rust/issues/500).
8289 export RUSTFLAGS="-D warnings"
83- export RUSTDOCFLAGS="-D warnings"
8490 cargo test --release --features dynamic-instrumentation
8591 displayName: 'cargo test'
8692
8793 - script : |
8894 export PATH="/home/docker/.cargo/bin:$PATH"
8995 export RUSTUP_HOME=/home/docker/.rustup
9096 export CARGO_HOME=$AGENT_TEMPDIRECTORY/.cargo
97+ # `test_translatory.py` compiles translated code,
98+ # which has tons of warnings, so don't set `RUSTFLAGS="-D warnings"`,
99+ # which would be inherited by that, causing tons of errors.
91100 python3 ./scripts/test_translator.py ./tests
92101 displayName: 'Test translator (fast build)'
93102
@@ -122,40 +131,50 @@ jobs:
122131
123132 - script : |
124133 export LLVM_CONFIG_PATH=$(brew --prefix llvm)/bin/llvm-config
125- export RUSTFLAGS="-D warnings"
126- export RUSTDOCFLAGS="-D warnings"
127134 cargo fmt --check
128135 displayName: 'cargo fmt --check'
129136
130137 - script : |
131138 export LLVM_CONFIG_PATH=$(brew --prefix llvm)/bin/llvm-config
139+ # Soon to be superceded by the commented out `cargo clippy` below.
140+ # This is different from `cargo build`
141+ # as that uses `--features dynamic-instrumention` (see below)
142+ # and this uses `--all-features` to check everything.
132143 export RUSTFLAGS="-D warnings"
133- export RUSTDOCFLAGS="-D warnings"
134144 cargo check --tests --all-features
135145 displayName: 'cargo check'
136146
137147 # - script: |
138148 # export LLVM_CONFIG_PATH=$(brew --prefix llvm)/bin/llvm-config
139149 # export RUSTFLAGS="-D warnings"
140- # export RUSTDOCFLAGS="-D warnings"
141150 # cargo clippy --tests --all-features
142151 # displayName: 'cargo clippy'
143152
144153 - script : |
145154 export LLVM_CONFIG_PATH=$(brew --prefix llvm)/bin/llvm-config
155+ # Build these with `--features dynamic-instrumentation`
156+ # instead of `--all-features` as `--all-features` includes `--features llvm-static`,
157+ # which we don't want to test here (it doesn't work out of the box on Arch and Fedora;
158+ # see https://github.com/immunant/c2rust/issues/500).
146159 export RUSTFLAGS="-D warnings"
147- export RUSTDOCFLAGS="-D warnings"
148160 cargo build --release --features dynamic-instrumentation
149161 displayName: 'cargo build against host clang/LLVM (fast build)'
150162
151163 - script : |
152164 export LLVM_CONFIG_PATH=$(brew --prefix llvm)/bin/llvm-config
165+ # Build these with `--features dynamic-instrumentation`
166+ # instead of `--all-features` as `--all-features` includes `--features llvm-static`,
167+ # which we don't want to test here (it doesn't work out of the box on Arch and Fedora;
168+ # see https://github.com/immunant/c2rust/issues/500).
153169 export RUSTFLAGS="-D warnings"
154- export RUSTDOCFLAGS="-D warnings"
155170 cargo test --release --features dynamic-instrumentation
156171 displayName: 'cargo test'
157172
158- - script : python3 ./scripts/test_translator.py ./tests
173+ - script : |
174+ # `test_translatory.py` compiles translated code,
175+ # which has tons of warnings, so don't set `RUSTFLAGS="-D warnings"`,
176+ # which would be inherited by that, causing tons of errors.
177+ python3 ./scripts/test_translator.py ./tests
159178 displayName: 'Test translator (fast build)'
160179
161180 - script : |
0 commit comments