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 <[email protected]>
---
No changes in v2.
---
 meta/classes-recipe/ptest-cargo.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes-recipe/ptest-cargo.bbclass 
b/meta/classes-recipe/ptest-cargo.bbclass
index 30463e117b..004abb40f7 100644
--- a/meta/classes-recipe/ptest-cargo.bbclass
+++ b/meta/classes-recipe/ptest-cargo.bbclass
@@ -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
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#226497): 
https://lists.openembedded.org/g/openembedded-core/message/226497
Mute This Topic: https://lists.openembedded.org/mt/116340215/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to