Skip to content

Conversation

@smuppand
Copy link
Contributor

Summary

This PR introduces a single, CI-friendly stdout/stderr capture mechanism that is enabled once in init_env and automatically used by both per-suite [run.sh](http://run.sh/) and the top-level [run-test.sh](http://run-test.sh/). No changes are required in individual tests.

What changed

  • init_env

    • Adds optional global tee capture with idempotent guard (no double capture when scripts re-source).
    • Creates a timestamped log file and exports it so all child scripts append to the same file.
    • Restores original FDs on exit via a trap.
    • Leaves existing path/export logic intact.
  • run-test.sh

    • Sources init_env first so the unified capture is active before spawning tests.
    • Removes the need for per-script capture; child [run.sh](http://run.sh/) inherits the same environment.

- Add optional global tee capture controlled by RUN_STDOUT_ENABLE/… env vars.
- Create timestamped  (under  or ROOT_DIR/logs).
- Export the same file so child run.sh scripts append to one unified log.
- Install trap to restore FDs on exit; idempotent guard prevents double-capture.

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
- Source ./init_env first so global tee is activated once per session.
- Remove any per-script capture logic; rely on exported RUN_STDOUT_FILE.
- Ensure child ./run.sh inherits the environment unchanged (no semantic changes).
- Minor cleanup to avoid duplicate env setup; logging remains via functestlib.

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
@smuppand
Copy link
Contributor Author

@vnarapar Please review the changes again. Once the change is merged, pull the console stdout from Axiom and move or copy it to the open folder.

Copy link
Contributor

@vnarapar vnarapar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vnarapar vnarapar merged commit 2ef8a98 into qualcomm-linux:main Oct 24, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants