@@ -55,7 +55,8 @@ python do_compile_ptest_cargo() {
current_manifest_path = os.path.normpath(data['manifest_path'])
common_path = os.path.commonpath([current_manifest_path, project_manifest_path])
if common_path in [manifest_dir, current_manifest_path]:
- if (data['target']['test'] or data['target']['doctest']) and data['executable']:
+ # Collect tests (integration and unit) and nothing but tests
+ if (data['target']['test'] or data['target']['doctest']) and data['executable'] and data['profile']['test']:
test_bins.append(data['executable'])
except (KeyError, ValueError) as e:
# skip lines that do not meet the requirements
This commit changes the files that are collected during compilation of tests. Till now, all the produced binaries were collected. This commit changes the conditions inside the loop so that only the binary and integration tests are collected. To do this, the variable "test" of the object "profile" is examined. Tests are all compiled with the "test" profile, whereas the binaries are compiled with the "dev" profile. Signed-off-by: Andreas Stergiopoulos <andreas.stergiopoulos@smile.fr> --- meta/classes-recipe/ptest-cargo.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)