diff options
Diffstat (limited to 'meta/classes-recipe/ptest-cargo.bbclass')
-rw-r--r-- | meta/classes-recipe/ptest-cargo.bbclass | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/meta/classes-recipe/ptest-cargo.bbclass b/meta/classes-recipe/ptest-cargo.bbclass index c46df362bf..fd1df9d7c9 100644 --- a/meta/classes-recipe/ptest-cargo.bbclass +++ b/meta/classes-recipe/ptest-cargo.bbclass | |||
@@ -12,10 +12,10 @@ python do_compile_ptest_cargo() { | |||
12 | import subprocess | 12 | import subprocess |
13 | import json | 13 | import json |
14 | 14 | ||
15 | cargo = bb.utils.which(d.getVar("PATH"), d.getVar("CARGO", True)) | 15 | cargo = bb.utils.which(d.getVar("PATH"), d.getVar("CARGO")) |
16 | cargo_build_flags = d.getVar("CARGO_BUILD_FLAGS", True) | 16 | cargo_build_flags = d.getVar("CARGO_BUILD_FLAGS") |
17 | rust_flags = d.getVar("RUSTFLAGS", True) | 17 | rust_flags = d.getVar("RUSTFLAGS") |
18 | manifest_path = d.getVar("CARGO_MANIFEST_PATH", True) | 18 | manifest_path = d.getVar("CARGO_MANIFEST_PATH") |
19 | project_manifest_path = os.path.normpath(manifest_path) | 19 | project_manifest_path = os.path.normpath(manifest_path) |
20 | manifest_dir = os.path.dirname(manifest_path) | 20 | manifest_dir = os.path.dirname(manifest_path) |
21 | 21 | ||
@@ -66,7 +66,7 @@ python do_compile_ptest_cargo() { | |||
66 | if not test_bins: | 66 | if not test_bins: |
67 | bb.fatal("Unable to find any test binaries") | 67 | bb.fatal("Unable to find any test binaries") |
68 | 68 | ||
69 | cargo_test_binaries_file = d.getVar('CARGO_TEST_BINARIES_FILES', True) | 69 | cargo_test_binaries_file = d.getVar('CARGO_TEST_BINARIES_FILES') |
70 | bb.note(f"Found {len(test_bins)} tests, write their paths into {cargo_test_binaries_file}") | 70 | bb.note(f"Found {len(test_bins)} tests, write their paths into {cargo_test_binaries_file}") |
71 | with open(cargo_test_binaries_file, "w") as f: | 71 | with open(cargo_test_binaries_file, "w") as f: |
72 | for test_bin in test_bins: | 72 | for test_bin in test_bins: |
@@ -77,10 +77,10 @@ python do_compile_ptest_cargo() { | |||
77 | python do_install_ptest_cargo() { | 77 | python do_install_ptest_cargo() { |
78 | import shutil | 78 | import shutil |
79 | 79 | ||
80 | dest_dir = d.getVar("D", True) | 80 | dest_dir = d.getVar("D") |
81 | pn = d.getVar("PN", True) | 81 | pn = d.getVar("PN") |
82 | ptest_path = d.getVar("PTEST_PATH", True) | 82 | ptest_path = d.getVar("PTEST_PATH") |
83 | cargo_test_binaries_file = d.getVar('CARGO_TEST_BINARIES_FILES', True) | 83 | cargo_test_binaries_file = d.getVar('CARGO_TEST_BINARIES_FILES') |
84 | rust_test_args = d.getVar('RUST_TEST_ARGS') or "" | 84 | rust_test_args = d.getVar('RUST_TEST_ARGS') or "" |
85 | 85 | ||
86 | ptest_dir = os.path.join(dest_dir, ptest_path.lstrip('/')) | 86 | ptest_dir = os.path.join(dest_dir, ptest_path.lstrip('/')) |