Lines Matching refs:result
128 result = subprocess.run("scripts/rust_is_available.sh", env=env, capture_output=True)
131 self.assertEqual(result.stdout, b"")
136 self.assertEqual(result.returncode, 0)
137 self.assertEqual(result.stderr, b"")
143 self.assertEqual(result.returncode, 0)
144 self.assertNotEqual(result.stderr, b"")
148 self.assertEqual(result.returncode, 0)
149 … self.assertIn(b"Please see Documentation/rust/quick-start.rst for details", result.stderr)
153 self.assertNotEqual(result.returncode, 0)
154 … self.assertIn(b"Please see Documentation/rust/quick-start.rst for details", result.stderr)
158 result.stderr = result.stderr.decode()
160 return result
163 result = self.run_script(self.Expected.FAILURE, { "RUSTC": None })
164 self.assertIn("Environment variable 'RUSTC' is not set.", result.stderr)
165 self.assertIn("This script is intended to be called from Kbuild.", result.stderr)
168 result = self.run_script(self.Expected.FAILURE, { "BINDGEN": None })
169 self.assertIn("Environment variable 'BINDGEN' is not set.", result.stderr)
170 self.assertIn("This script is intended to be called from Kbuild.", result.stderr)
173 result = self.run_script(self.Expected.FAILURE, { "CC": None })
174 self.assertIn("Environment variable 'CC' is not set.", result.stderr)
175 self.assertIn("This script is intended to be called from Kbuild.", result.stderr)
178 result = self.run_script(self.Expected.FAILURE, { "RUSTC": self.missing })
179 self.assertIn(f"Rust compiler '{self.missing}' could not be found.", result.stderr)
182 result = self.run_script(self.Expected.FAILURE, { "BINDGEN": self.missing })
183 … self.assertIn(f"Rust bindings generator '{self.missing}' could not be found.", result.stderr)
186 result = self.run_script(self.Expected.FAILURE, { "RUSTC": self.nonexecutable })
187 …In(f"Running '{self.nonexecutable}' to check the Rust compiler version failed with", result.stderr)
190 result = self.run_script(self.Expected.FAILURE, { "RUSTC": self.unexpected_binary })
191 …nning '{self.unexpected_binary}' to check the Rust compiler version did not return", result.stderr)
195 result = self.run_script(self.Expected.FAILURE, { "RUSTC": rustc })
196 …elf.assertIn(f"Running '{rustc}' to check the Rust compiler version did not return", result.stderr)
200 result = self.run_script(self.Expected.FAILURE, { "RUSTC": rustc })
201 …elf.assertIn(f"Running '{rustc}' to check the Rust compiler version did not return", result.stderr)
205 result = self.run_script(self.Expected.FAILURE, { "RUSTC": rustc })
206 …elf.assertIn(f"Running '{rustc}' to check the Rust compiler version did not return", result.stderr)
210 result = self.run_script(self.Expected.FAILURE, { "RUSTC": rustc })
211 self.assertIn(f"Rust compiler '{rustc}' is too old.", result.stderr)
214 result = self.run_script(self.Expected.FAILURE, { "BINDGEN": self.nonexecutable })
215 …ng '{self.nonexecutable}' to check the Rust bindings generator version failed with", result.stderr)
218 result = self.run_script(self.Expected.FAILURE, { "BINDGEN": self.unexpected_binary })
219 … '{self.unexpected_binary}' to check the bindings generator version did not return", result.stderr)
223 result = self.run_script(self.Expected.FAILURE, { "BINDGEN": bindgen })
224 …ertIn(f"Running '{bindgen}' to check the bindings generator version did not return", result.stderr)
228 result = self.run_script(self.Expected.FAILURE, { "BINDGEN": bindgen })
229 …ertIn(f"Running '{bindgen}' to check the bindings generator version did not return", result.stderr)
233 result = self.run_script(self.Expected.FAILURE, { "BINDGEN": bindgen })
234 …ertIn(f"Running '{bindgen}' to check the bindings generator version did not return", result.stderr)
238 result = self.run_script(self.Expected.FAILURE, { "BINDGEN": bindgen })
239 self.assertIn(f"Rust bindings generator '{bindgen}' is too old.", result.stderr)
245 … result = self.run_script(self.Expected.SUCCESS_WITH_WARNINGS, { "BINDGEN": bindgen })
246 ….assertIn(f"Rust bindings generator '{bindgen}' versions 0.66.0 and 0.66.1 may not", result.stderr)
252 result = self.run_script(self.Expected.SUCCESS, { "BINDGEN": bindgen })
256 result = self.run_script(self.Expected.FAILURE, { "BINDGEN": bindgen })
257 …elf.assertIn(f"Running '{bindgen}' to check the libclang version (used by the Rust", result.stderr)
258 …e {self.bindgen_default_bindgen_libclang_failure_exit_code}. This may be caused by", result.stderr)
262 result = self.run_script(self.Expected.FAILURE, { "BINDGEN": bindgen })
263 …elf.assertIn(f"Running '{bindgen}' to check the libclang version (used by the Rust", result.stderr)
264 … self.assertIn("bindings generator) did not return an expected output. See output", result.stderr)
268 result = self.run_script(self.Expected.FAILURE, { "BINDGEN": bindgen })
269 ….assertIn(f"libclang (used by the Rust bindings generator '{bindgen}') is too old.", result.stderr)
273 result = self.run_script(self.Expected.SUCCESS_WITH_WARNINGS, { "BINDGEN": bindgen })
274 self.assertIn("version does not match Clang's. This may be a problem.", result.stderr)
278 result = self.run_script(self.Expected.SUCCESS_WITH_WARNINGS, { "CC": cc })
279 self.assertIn("version does not match Clang's. This may be a problem.", result.stderr)
282 …result = self.run_script(self.Expected.FAILURE, { "PATH": os.environ["PATH"], "RUSTC": "rustc", "K…
283 … self.assertIn("Source code for the 'core' standard library could not be found", result.stderr)
286 result = self.run_script(self.Expected.FAILURE, { "RUST_LIB_SRC": self.missing })
287 … self.assertIn("Source code for the 'core' standard library could not be found", result.stderr)
290 result = self.run_script(self.Expected.SUCCESS_WITH_EXTRA_OUTPUT, { "CC": self.missing })
291 self.assertIn("unknown C compiler", result.stderr)
299 result = self.run_script(self.Expected.SUCCESS, { "CC": f"{clang} clang" })
309 result = self.run_script(self.Expected.SUCCESS, { "RUSTC": rustc })
319 result = self.run_script(self.Expected.SUCCESS, { "BINDGEN": bindgen })
337 result = self.run_script(self.Expected.SUCCESS, { "BINDGEN": bindgen })
348 result = self.run_script(self.Expected.SUCCESS, { "CC": clang })
353 result = self.run_script(self.Expected.SUCCESS, {