diff options
-rw-r--r-- | meta/classes-recipe/ptest-cargo.bbclass | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/meta/classes-recipe/ptest-cargo.bbclass b/meta/classes-recipe/ptest-cargo.bbclass index d19617aa50..7b18d43c38 100644 --- a/meta/classes-recipe/ptest-cargo.bbclass +++ b/meta/classes-recipe/ptest-cargo.bbclass | |||
@@ -102,14 +102,15 @@ python do_install_ptest_cargo() { | |||
102 | with open(ptest_script, "a") as f: | 102 | with open(ptest_script, "a") as f: |
103 | if not script_exists: | 103 | if not script_exists: |
104 | f.write("#!/bin/sh\n") | 104 | f.write("#!/bin/sh\n") |
105 | 105 | f.write("rc=0\n") | |
106 | else: | 106 | else: |
107 | f.write(f"\necho \"\"\n") | 107 | f.write(f"\necho \"\"\n") |
108 | f.write(f"echo \"## starting to run rust tests ##\"\n") | 108 | f.write(f"echo \"## starting to run rust tests ##\"\n") |
109 | |||
110 | for test_path in test_paths: | 109 | for test_path in test_paths: |
111 | f.write(f"{test_path} {rust_test_args}\n") | 110 | f.write(f"if ! {test_path} {rust_test_args}; then rc=1; fi\n") |
112 | 111 | ||
112 | f.write("exit $rc\n") | ||
113 | |||
113 | if not script_exists: | 114 | if not script_exists: |
114 | os.chmod(ptest_script, 0o755) | 115 | os.chmod(ptest_script, 0o755) |
115 | 116 | ||