diff options
| author | Tom Rini <[email protected]> | 2025-01-25 16:27:30 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-01-25 16:28:27 -0600 |
| commit | 292278d6828e6c8c6ae11bc8658586d1acc411d4 (patch) | |
| tree | 89849177b7422c6ae8152c3a11ac9eee2ec9afd0 | |
| parent | 0e198ff1a9114763af3e82e7abf884ee1da4e64f (diff) | |
| parent | 1135dc50a3e1192ee6b68e788e716c6548dc7a50 (diff) | |
Merge patch series "gitlab: Fixes to get StarFive VisionFive2 into the sjg lab"
Simon Glass <[email protected]> says:
This board fought valiantly against attempts to add it to my lab. After
several hours of debugging, I found problems in the Labgrid integration
(not included here), test.py and buildman
This series fixes these and the board now seems to be reliable enough.
Note that the board fails test_dm_compat
Link: https://github.com/labgrid-project/labgrid/pull/1411
Link: https://lore.kernel.org/r/[email protected]
| -rw-r--r-- | .gitlab-ci.yml | 6 | ||||
| -rw-r--r-- | test/py/conftest.py | 9 | ||||
| -rw-r--r-- | tools/buildman/boards.py | 1 | ||||
| -rw-r--r-- | tools/buildman/builderthread.py | 8 |
4 files changed, 19 insertions, 5 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a4340946a8a..74dc05d58a7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -671,3 +671,9 @@ rpi: variables: ROLE: rpi <<: *lab_dfn + +# StarFive VisionFive 2 +vf2: + variables: + ROLE: vf2 + <<: *lab_dfn diff --git a/test/py/conftest.py b/test/py/conftest.py index 6b7ed0586e2..3bd333bfd24 100644 --- a/test/py/conftest.py +++ b/test/py/conftest.py @@ -161,10 +161,15 @@ def get_details(config): env['U_BOOT_BUILD_DIR'] = build_dir if build_dir_extra: env['U_BOOT_BUILD_DIR_EXTRA'] = build_dir_extra - proc = subprocess.run(cmd, capture_output=True, encoding='utf-8', + + # Make sure the script sees that it is being run from pytest + env['U_BOOT_SOURCE_DIR'] = source_dir + + proc = subprocess.run(cmd, stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, encoding='utf-8', env=env) if proc.returncode: - raise ValueError(proc.stderr) + raise ValueError(f"Error {proc.returncode} running {cmd}: '{proc.stderr} '{proc.stdout}'") # For debugging # print('conftest: lab:', proc.stdout) vals = {} diff --git a/tools/buildman/boards.py b/tools/buildman/boards.py index 9e7b486656b..e7aa0d85a58 100644 --- a/tools/buildman/boards.py +++ b/tools/buildman/boards.py @@ -25,7 +25,6 @@ from u_boot_pylib import tools from u_boot_pylib import tout ### constant variables ### -OUTPUT_FILE = 'boards.cfg' CONFIG_DIR = 'configs' SLEEP_TIME = 0.03 COMMENT_BLOCK = f'''# diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py index b5afee61aff..29e6cf32af1 100644 --- a/tools/buildman/builderthread.py +++ b/tools/buildman/builderthread.py @@ -19,6 +19,7 @@ import threading from buildman import cfgutil from patman import gitutil from u_boot_pylib import command +from u_boot_pylib import tools RETURN_CODE_RETRY = -1 BASE_ELF_FILENAMES = ['u-boot', 'spl/u-boot-spl', 'tpl/u-boot-tpl'] @@ -555,10 +556,10 @@ class BuilderThread(threading.Thread): if result.return_code < 0: return + done_file = self.builder.get_done_file(result.commit_upto, + result.brd.target) if result.toolchain: # Write the build result and toolchain information. - done_file = self.builder.get_done_file(result.commit_upto, - result.brd.target) with open(done_file, 'w', encoding='utf-8') as outf: if maybe_aborted: # Special code to indicate we need to retry @@ -638,6 +639,9 @@ class BuilderThread(threading.Thread): result.brd.target) with open(sizes, 'w', encoding='utf-8') as outf: print('\n'.join(lines), file=outf) + else: + # Indicate that the build failure due to lack of toolchain + tools.write_file(done_file, '2\n', binary=False) if not work_in_output: # Write out the configuration files, with a special case for SPL |
