|
| 1 | +# DejaGnu equivalvent directives for Rustc test headers: |
| 2 | + |
| 3 | +Rust compiletest tool uses a set of directives in the test headers to control the behavior of the test. See rustc dev guide for more information on the [test directives](https://rustc-dev-guide.rust-lang.org/tests/headers.html#header-commands). |
| 4 | + |
| 5 | +Equivalent DejaGnu directives are used to control the behavior of the test in the `gccrs` test suite |
| 6 | + |
| 7 | +### [Controlling pass/fail expectations](https://rustc-dev-guide.rust-lang.org/tests/ui.html#controlling-passfail-expectations) |
| 8 | + |
| 9 | +- **Pass headers**: |
| 10 | + |
| 11 | + | Rustc Directive | DejaGnu Directive | |
| 12 | + | --------------- | ---------------------------------------------------- | |
| 13 | + | check-pass | | |
| 14 | + | build-pass | | |
| 15 | + | run-pass | target (compilation,linking and running should pass) | |
| 16 | + |
| 17 | +- **Fail headers**: |
| 18 | + |
| 19 | + | Rustc Directive | DejaGnu Directive | |
| 20 | + | --------------- | ----------------- | |
| 21 | + | check-fail | | |
| 22 | + | build-fail | | |
| 23 | + | run-fail | | |
| 24 | + |
| 25 | +The `run-pass` and `run-fail` tests in rust compiletest tool doesn't check the output of program. But dejagnu gives verdict based on the output of the program. So, the `run-pass` and `run-fail` tests in rustc are converted to `target` and `xfail` tests in dejagnu directives. |
| 26 | + |
| 27 | +- **Other headers**: |
| 28 | + |
| 29 | + | Rustc Directive | DejaGnu Directive | |
| 30 | + | ----------------- | --------------------------------------------------------- | |
| 31 | + | ignore-pass | | |
| 32 | + | check-run-results | xfail (thil will also compare the output of the compiler) | |
| 33 | + |
| 34 | +## [UI](https://rustc-dev-guide.rust-lang.org/tests/ui.html) headers |
| 35 | + |
| 36 | +| Rustc Directive | DejaGnu Directive | |
| 37 | +| ------------------------------- | ----------------- | |
| 38 | +| normalize-stderr-32bit | | |
| 39 | +| normalize-stderr-64bit | | |
| 40 | +| normalize-stderr-test | | |
| 41 | +| normalize-stdout-test | | |
| 42 | +| run-rustfix | | |
| 43 | +| rustfix-only-machine-applicable | | |
| 44 | +| stderr-per-bitwidth | | |
| 45 | +| dont-check-compiler-stderr | | |
| 46 | +| dont-check-compiler-stdout | | |
| 47 | +| compare-output-lines-by-subset | | |
| 48 | + |
| 49 | +## [Building auxiliary crates](https://rustc-dev-guide.rust-lang.org/tests/compiletest.html#building-auxiliary-crates) |
| 50 | + |
| 51 | +| Rustc Directive | DejaGnu Directive | |
| 52 | +| ------------------- | ----------------- | |
| 53 | +| aux-build | | |
| 54 | +| aux-crate | | |
| 55 | +| aux-bin | | |
| 56 | +| aux-codegen-backend | | |
| 57 | + |
| 58 | +## [Pretty-printer](https://rustc-dev-guide.rust-lang.org/tests/compiletest.html#pretty-printer-tests) headers |
| 59 | + |
| 60 | +| Rustc Directive | DejaGnu Directive | |
| 61 | +| ------------------- | ----------------- | |
| 62 | +| pretty-compare-only | | |
| 63 | +| pretty-expanded | | |
| 64 | +| pretty-mode | | |
| 65 | +| pp-exact | | |
| 66 | + |
| 67 | +## [Ignoring tests](https://rustc-dev-guide.rust-lang.org/tests/headers.html#ignoring-tests) |
| 68 | + |
| 69 | +| Rustc Directive | DejaGnu Directive | |
| 70 | +| ---------------------------------- | ----------------- | |
| 71 | +| ignore-16bit | | |
| 72 | +| ignore-32bit | | |
| 73 | +| ignore-64bit | | |
| 74 | +| ignore-aarch64 | | |
| 75 | +| ignore-aarch64-unknown-linux-gnu | | |
| 76 | +| ignore-android | | |
| 77 | +| ignore-apple | | |
| 78 | +| ignore-arm | | |
| 79 | +| ignore-avr | | |
| 80 | +| ignore-beta | | |
| 81 | +| ignore-cdb | | |
| 82 | +| ignore-compare-mode-next-solver | | |
| 83 | +| ignore-compare-mode-polonius | | |
| 84 | +| ignore-cross-compile | | |
| 85 | +| ignore-debug | | |
| 86 | +| ignore-eabi | | |
| 87 | +| ignore-emscripten | | |
| 88 | +| ignore-endian-big | | |
| 89 | +| ignore-freebsd | | |
| 90 | +| ignore-fuchsia | | |
| 91 | +| ignore-gdb | | |
| 92 | +| ignore-gdb-version | | |
| 93 | +| ignore-gnu | | |
| 94 | +| ignore-haiku | | |
| 95 | +| ignore-horizon | | |
| 96 | +| ignore-i686-pc-windows-gnu | | |
| 97 | +| ignore-i686-pc-windows-msvc | | |
| 98 | +| ignore-illumos | | |
| 99 | +| ignore-ios | | |
| 100 | +| ignore-linux | | |
| 101 | +| ignore-lldb | | |
| 102 | +| ignore-llvm-version | | |
| 103 | +| ignore-loongarch64 | | |
| 104 | +| ignore-macabi | | |
| 105 | +| ignore-macos | | |
| 106 | +| ignore-mode-assembly | | |
| 107 | +| ignore-mode-codegen | | |
| 108 | +| ignore-mode-codegen-units | | |
| 109 | +| ignore-mode-coverage-map | | |
| 110 | +| ignore-mode-coverage-run | | |
| 111 | +| ignore-mode-crashes | | |
| 112 | +| ignore-mode-debuginfo | | |
| 113 | +| ignore-mode-incremental | | |
| 114 | +| ignore-mode-js-doc-test | | |
| 115 | +| ignore-mode-mir-opt | | |
| 116 | +| ignore-mode-pretty | | |
| 117 | +| ignore-mode-run-make | | |
| 118 | +| ignore-mode-run-pass-valgrind | | |
| 119 | +| ignore-mode-rustdoc | | |
| 120 | +| ignore-mode-rustdoc-json | | |
| 121 | +| ignore-mode-ui | | |
| 122 | +| ignore-mode-ui-fulldeps | | |
| 123 | +| ignore-msp430 | | |
| 124 | +| ignore-msvc | | |
| 125 | +| ignore-musl | | |
| 126 | +| ignore-netbsd | | |
| 127 | +| ignore-nightly | | |
| 128 | +| ignore-none | | |
| 129 | +| ignore-nto | | |
| 130 | +| ignore-nvptx64 | | |
| 131 | +| ignore-nvptx64-nvidia-cuda | | |
| 132 | +| ignore-openbsd | | |
| 133 | +| ignore-pass | | |
| 134 | +| ignore-powerpc | | |
| 135 | +| ignore-remote | | |
| 136 | +| ignore-riscv64 | | |
| 137 | +| ignore-s390x | | |
| 138 | +| ignore-sgx | | |
| 139 | +| ignore-sparc64 | | |
| 140 | +| ignore-spirv | | |
| 141 | +| ignore-stable | | |
| 142 | +| ignore-stage1 | | |
| 143 | +| ignore-stage2 | | |
| 144 | +| ignore-test | | |
| 145 | +| ignore-thumb | | |
| 146 | +| ignore-thumbv8m.base-none-eabi | | |
| 147 | +| ignore-thumbv8m.main-none-eabi | | |
| 148 | +| ignore-tvos | | |
| 149 | +| ignore-unix | | |
| 150 | +| ignore-unknown | | |
| 151 | +| ignore-uwp | | |
| 152 | +| ignore-visionos | | |
| 153 | +| ignore-vxworks | | |
| 154 | +| ignore-wasi | | |
| 155 | +| ignore-wasm | | |
| 156 | +| ignore-wasm32 | | |
| 157 | +| ignore-wasm32-bare | | |
| 158 | +| ignore-wasm64 | | |
| 159 | +| ignore-watchos | | |
| 160 | +| ignore-windows | | |
| 161 | +| ignore-windows-gnu | | |
| 162 | +| ignore-windows-msvc | | |
| 163 | +| ignore-x32 | | |
| 164 | +| ignore-x86 | | |
| 165 | +| ignore-x86_64 | | |
| 166 | +| ignore-x86_64-apple-darwin | | |
| 167 | +| ignore-x86_64-pc-windows-gnu | | |
| 168 | +| ignore-x86_64-unknown-linux-gnu | | |
| 169 | +| only-16bit | | |
| 170 | +| only-32bit | | |
| 171 | +| only-64bit | | |
| 172 | +| only-aarch64 | | |
| 173 | +| only-aarch64-unknown-linux-gnu | | |
| 174 | +| only-apple | | |
| 175 | +| only-arm | | |
| 176 | +| only-avr | | |
| 177 | +| only-beta | | |
| 178 | +| only-bpf | | |
| 179 | +| only-cdb | | |
| 180 | +| only-gnu | | |
| 181 | +| only-i686-pc-windows-gnu | | |
| 182 | +| only-i686-pc-windows-msvc | | |
| 183 | +| only-ios | | |
| 184 | +| only-linux | | |
| 185 | +| only-loongarch64 | | |
| 186 | +| only-loongarch64-unknown-linux-gnu | | |
| 187 | +| only-macos | | |
| 188 | +| only-mips | | |
| 189 | +| only-mips64 | | |
| 190 | +| only-msp430 | | |
| 191 | +| only-msvc | | |
| 192 | +| only-nightly | | |
| 193 | +| only-nvptx64 | | |
| 194 | +| only-powerpc | | |
| 195 | +| only-riscv64 | | |
| 196 | +| only-s390x | | |
| 197 | +| only-sparc | | |
| 198 | +| only-sparc64 | | |
| 199 | +| only-stable | | |
| 200 | +| only-thumb | | |
| 201 | +| only-tvos | | |
| 202 | +| only-unix | | |
| 203 | +| only-visionos | | |
| 204 | +| only-wasm32 | | |
| 205 | +| only-wasm32-bare | | |
| 206 | +| only-wasm32-wasip1 | | |
| 207 | +| only-watchos | | |
| 208 | +| only-windows | | |
| 209 | +| only-windows-gnu | | |
| 210 | +| only-windows-msvc | | |
| 211 | +| only-x86 | | |
| 212 | +| only-x86_64 | | |
| 213 | +| only-x86_64-fortanix-unknown-sgx | | |
| 214 | +| only-x86_64-pc-windows-gnu | | |
| 215 | +| only-x86_64-pc-windows-msvc | | |
| 216 | +| only-x86_64-unknown-linux-gnu | | |
| 217 | +| needs-asm-support | | |
| 218 | +| needs-deterministic-layouts | | |
| 219 | +| needs-dlltool | | |
| 220 | +| needs-dynamic-linking | | |
| 221 | +| needs-force-clang-based-tests | | |
| 222 | +| needs-git-hash | | |
| 223 | +| needs-llvm-components | | |
| 224 | +| needs-llvm-zstd | | |
| 225 | +| needs-profiler-support | | |
| 226 | +| needs-relocation-model-pic | | |
| 227 | +| needs-run-enabled | | |
| 228 | +| needs-rust-lld | | |
| 229 | +| needs-sanitizer-address | | |
| 230 | +| needs-sanitizer-cfi | | |
| 231 | +| needs-sanitizer-dataflow | | |
| 232 | +| needs-sanitizer-hwaddress | | |
| 233 | +| needs-sanitizer-kcfi | | |
| 234 | +| needs-sanitizer-leak | | |
| 235 | +| needs-sanitizer-memory | | |
| 236 | +| needs-sanitizer-memtag | | |
| 237 | +| needs-sanitizer-safestack | | |
| 238 | +| needs-sanitizer-shadow-call-stack | | |
| 239 | +| needs-sanitizer-support | | |
| 240 | +| needs-sanitizer-thread | | |
| 241 | +| needs-symlink | | |
| 242 | +| needs-threads | | |
| 243 | +| needs-unwind | | |
| 244 | +| needs-wasmtime | | |
| 245 | +| needs-xray | | |
| 246 | +| no-system-llvm | | |
| 247 | +| min-llvm-version | | |
| 248 | +| min-system-llvm-version | | |
| 249 | + |
| 250 | +## [Environment variable headers](https://rustc-dev-guide.rust-lang.org/tests/headers.html#environment-variable-headers) |
| 251 | + |
| 252 | +| Rustc Directive | DejaGnu Directive | |
| 253 | +| --------------- | ----------------- | |
| 254 | +| rustc-env | | |
| 255 | +| exec-env | | |
| 256 | +| unset-exec-env | | |
| 257 | +| unset-rustc-env | | |
| 258 | + |
| 259 | +## [Miscellaneous headers](https://rustc-dev-guide.rust-lang.org/tests/headers.html#miscellaneous-headers) |
| 260 | + |
| 261 | +| Rustc Directive | DejaGnu Directive | |
| 262 | +| --------------------- | -------------------------------------------- | |
| 263 | +| compile-flags | | |
| 264 | +| run-flags | | |
| 265 | +| edition | "dg-additional-options "-frust-edition=2018" | |
| 266 | +| failure-status | | |
| 267 | +| should-fail | | |
| 268 | +| gate-test-X | | |
| 269 | +| error-pattern | | |
| 270 | +| incremental | | |
| 271 | +| no-prefer-dynamic | | |
| 272 | +| no-auto-check-cfg | | |
| 273 | +| force-host | | |
| 274 | +| revisions | | |
| 275 | +| unused-revision-names | | |
| 276 | +| forbid-output | | |
| 277 | +| should-ice | | |
| 278 | +| known-bug | | |
| 279 | + |
| 280 | +## [Assembly](https://rustc-dev-guide.rust-lang.org/tests/compiletest.html#assembly-tests) headers |
| 281 | + |
| 282 | +| Rustc Directive | DejaGnu Directive | |
| 283 | +| --------------- | ----------------- | |
| 284 | +| assembly-output | | |
| 285 | + |
| 286 | +## [Tool-specific headers](https://rustc-dev-guide.rust-lang.org/tests/headers.html#tool-specific-headers) |
| 287 | + |
| 288 | +| Rustc Directive | DejaGnu Directive | |
| 289 | +| --------------- | ----------------- | |
| 290 | +| filecheck-flags | | |
| 291 | +| llvm-cov-flags | | |
0 commit comments