cargo: remove True option to getVar calls

Layer cleanup similar to
https://git.openembedded.org/openembedded-core/commit/?id=26c74fd10614582e177437608908eb43688ab510

(From OE-Core rev: 9a2ed52473a3e4eb662509824ef8e59520ebdefb)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Peter Marko
2024-06-25 21:36:45 +02:00
committed by Richard Purdie
parent 918c66d8e6
commit 7afa4f50b4
2 changed files with 11 additions and 11 deletions

View File

@@ -12,10 +12,10 @@ python do_compile_ptest_cargo() {
import subprocess
import json
cargo = bb.utils.which(d.getVar("PATH"), d.getVar("CARGO", True))
cargo_build_flags = d.getVar("CARGO_BUILD_FLAGS", True)
rust_flags = d.getVar("RUSTFLAGS", True)
manifest_path = d.getVar("CARGO_MANIFEST_PATH", True)
cargo = bb.utils.which(d.getVar("PATH"), d.getVar("CARGO"))
cargo_build_flags = d.getVar("CARGO_BUILD_FLAGS")
rust_flags = d.getVar("RUSTFLAGS")
manifest_path = d.getVar("CARGO_MANIFEST_PATH")
project_manifest_path = os.path.normpath(manifest_path)
manifest_dir = os.path.dirname(manifest_path)
@@ -66,7 +66,7 @@ python do_compile_ptest_cargo() {
if not test_bins:
bb.fatal("Unable to find any test binaries")
cargo_test_binaries_file = d.getVar('CARGO_TEST_BINARIES_FILES', True)
cargo_test_binaries_file = d.getVar('CARGO_TEST_BINARIES_FILES')
bb.note(f"Found {len(test_bins)} tests, write their paths into {cargo_test_binaries_file}")
with open(cargo_test_binaries_file, "w") as f:
for test_bin in test_bins:
@@ -77,10 +77,10 @@ python do_compile_ptest_cargo() {
python do_install_ptest_cargo() {
import shutil
dest_dir = d.getVar("D", True)
pn = d.getVar("PN", True)
ptest_path = d.getVar("PTEST_PATH", True)
cargo_test_binaries_file = d.getVar('CARGO_TEST_BINARIES_FILES', True)
dest_dir = d.getVar("D")
pn = d.getVar("PN")
ptest_path = d.getVar("PTEST_PATH")
cargo_test_binaries_file = d.getVar('CARGO_TEST_BINARIES_FILES')
rust_test_args = d.getVar('RUST_TEST_ARGS') or ""
ptest_dir = os.path.join(dest_dir, ptest_path.lstrip('/'))