summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe/ptest-cargo.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes-recipe/ptest-cargo.bbclass')
-rw-r--r--meta/classes-recipe/ptest-cargo.bbclass6
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/classes-recipe/ptest-cargo.bbclass b/meta/classes-recipe/ptest-cargo.bbclass
index 4ed528445a..5d53abe969 100644
--- a/meta/classes-recipe/ptest-cargo.bbclass
+++ b/meta/classes-recipe/ptest-cargo.bbclass
@@ -23,13 +23,13 @@ python do_compile_ptest_cargo() {
23 bb.note(f"Building tests with cargo ({cmd})") 23 bb.note(f"Building tests with cargo ({cmd})")
24 24
25 try: 25 try:
26 proc = subprocess.Popen(cmd, shell=True, env=env, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) 26 proc = subprocess.Popen(cmd, shell=True, env=env, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True)
27 except subprocess.CalledProcessError as e: 27 except subprocess.CalledProcessError as e:
28 bb.fatal(f"Cannot build test with cargo: {e}") 28 bb.fatal(f"Cannot build test with cargo: {e}")
29 29
30 lines = [] 30 lines = []
31 for line in proc.stdout: 31 for line in proc.stdout:
32 data = line.decode('utf-8').strip('\n') 32 data = line.strip('\n')
33 lines.append(data) 33 lines.append(data)
34 bb.note(data) 34 bb.note(data)
35 proc.communicate() 35 proc.communicate()
@@ -50,7 +50,7 @@ python do_compile_ptest_cargo() {
50 current_manifest_path = os.path.normpath(data['manifest_path']) 50 current_manifest_path = os.path.normpath(data['manifest_path'])
51 project_manifest_path = os.path.normpath(manifest_path) 51 project_manifest_path = os.path.normpath(manifest_path)
52 if current_manifest_path == project_manifest_path: 52 if current_manifest_path == project_manifest_path:
53 if data['target']['test'] or data['target']['doctest'] and data['executable']: 53 if (data['target']['test'] or data['target']['doctest']) and data['executable']:
54 test_bins.append(data['executable']) 54 test_bins.append(data['executable'])
55 except KeyError as e: 55 except KeyError as e:
56 # skip lines that do not meet the requirements 56 # skip lines that do not meet the requirements