Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib.sh,hijack.sh: restore ability to be sourced interactively #1071

Closed
wants to merge 2 commits into from

Conversation

marc-hb
Copy link
Collaborator

@marc-hb marc-hb commented Jun 29, 2023

Run start_test() and func_exit_handler() only in "normal" usage, not
when sourced interactively (for interactive debug) and not as a subtest.

With this commit it's not possible to do this without any side-effect:

( source case-lib/lib.sh )

More to the point, it's now possible to run this and start interactive
testing without any unwanted actions:

source case-lib/lib.sh
get_firmware_path

$SCRIPT_NAME is `-bash` when sourcing `lib.sh` directly from an
interactive shell.

Fixes this error in that case:
```
basename: invalid option -- 'b'
Try 'basename --help' for more information.
```

Signed-off-by: Marc Herbert <[email protected]>
Run start_test() and func_exit_handler() only in "normal" usage, not
when sourced interactively (for interactive debug) and not as a subtest.

With this commit it's not possible to do this without any side-effect:

```
( source case-lib/lib.sh )
```

More to the point, it's now possible to run this and start interactive
testing without any unwanted actions:

```
source case-lib/lib.sh
get_firmware_path
```

Signed-off-by: Marc Herbert <[email protected]>
@marc-hb
Copy link
Collaborator Author

marc-hb commented Jun 29, 2023

All PM-related tests fail in https://sof-ci.01.org/softestpr/PR1071/build516/devicetest/index.html is failing because of (complex?) regression thesofproject/sof#7875

One isolated suspend/resume failure in https://sof-ci.01.org/softestpr/PR1071/build517/devicetest/index.html

Everything else is green.

@marc-hb marc-hb marked this pull request as ready for review June 29, 2023 05:06
@marc-hb marc-hb requested a review from a team as a code owner June 29, 2023 05:06
@marc-hb marc-hb marked this pull request as draft June 29, 2023 14:39
@marc-hb
Copy link
Collaborator Author

marc-hb commented Jun 29, 2023

Need to test this with SubTests more.

@marc-hb
Copy link
Collaborator Author

marc-hb commented Apr 24, 2024

Too complex and not flexible enough: we want some scripts not to call start_test() at all. See #1170 and friends.

@marc-hb marc-hb closed this Apr 24, 2024
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.

1 participant