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

Allow configuring output directories #237

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

leivos-unikie
Copy link
Collaborator

@leivos-unikie leivos-unikie commented Feb 11, 2025

  • Automated variable ${OUTPUT_DIR} is now used as base output directory for report files, plot png files and icons. It can be defined via command line with the flag --outputdir. If not given it defaults to absolute path of ./.
  • Adds separate outputs directory under the base output directory for storing gui icons, power measurement data, audio test data, video test data etc. Icons should not anymore end up to release artifacts.
  • If --outputdir is not given same old ../../../Performance_test_results/ directory is used as before. If --outputdir is given and does not end in test-suites, performance test data will be saved to ${OUTPUT_DIR}/outputs/Performance_test_results/

This PR gives more flexibility in running ci-test-automation locally and even running it from read-only nix store is now possible.

Testing

  • Should not have any effect on fully automated setups.
  • Locally full test suites should be possible to run with custom CONFIG_PATH, --outputdir by using additional variables, for example on lenovo-x1:
    robot -v CONFIG_PATH:None -v DEVICE_IP_ADDRESS:ip -v COMMIT_HASH:1202 -v DEVICE:Lenovo-X1 -v THREADS_NUMBER:20 -v PASSWORD:password -i lenovo-x1 -e ssh_boot_test --outputdir /tmp/test_output/ ./
    (if running with CONFIG_PATH:None THREAD_NUMBER needs to be given via command line for performance tests, for bat or pre-merge tests THREADS_NUMBER is not necessary)

@leivos-unikie leivos-unikie marked this pull request as draft February 11, 2025 07:48
@leivos-unikie leivos-unikie force-pushed the dir_for_output_files branch 4 times, most recently from 19cdf0f to 869b64f Compare February 14, 2025 09:47
@leivos-unikie leivos-unikie marked this pull request as ready for review February 18, 2025 09:41
@leivos-unikie leivos-unikie marked this pull request as draft February 18, 2025 10:14
@leivos-unikie leivos-unikie force-pushed the dir_for_output_files branch 2 times, most recently from ec76d58 to 8c44c8f Compare February 18, 2025 12:36
@leivos-unikie leivos-unikie marked this pull request as ready for review February 18, 2025 12:38
@leivos-unikie leivos-unikie force-pushed the dir_for_output_files branch 6 times, most recently from 2bce83d to 0a430a5 Compare February 20, 2025 10:08
@leivos-unikie
Copy link
Collaborator Author

@leivos-unikie leivos-unikie force-pushed the dir_for_output_files branch 2 times, most recently from 5eaaccd to fd3bbf7 Compare February 25, 2025 08:02
@leivos-unikie
Copy link
Collaborator Author

and lenovo-x1ANDperformance passed
https://ghaf-jenkins-controller-dev.northeurope.cloudapp.azure.com/job/tests/job/x-ghaf-hw-test/537/artifact/Robot-Framework/test-suites/lenovo-x1ANDperformance/report.html

First there was no plot images shown on report.html. Then noticed that I have to use relative path ./ as default for ${PLOT_DIR}. Absolute path ${PLOT_DIR}=${OUTPUT_DIR}/ didn't work for jenkins because the result files and plot images are moved from jenkins agent to server after test run and so absolute links are lost.

Create separate directories under base output dir
for storing icons, power measurement data, video data,
audio data etc.

Signed-off-by: Samuli Leivo <[email protected]>


*** Keywords ***

Set Variables
[Arguments] ${device}

${DIR_BODY} ${DIR_END} Split String From Right ${OUTPUT_DIR} / 1
IF $DIR_END != 'test-suites'
Copy link
Collaborator

Choose a reason for hiding this comment

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

what 'else'?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I didn't put ELSE here because the default values are defined under *** Variables ***. If the IF statement is false those default values will be used.

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