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

ci: script to auto-upload your test results #68

Conversation

maksimmasalski
Copy link
Contributor

Python script to automatically upload your HW Daily Test Results
to the Github test_results repo

Signed-off-by: Maksim Masalski maksim.masalski@intel.com

Copy link
Member

@nashif nashif left a comment

Choose a reason for hiding this comment

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

need some basic cleanup before a more thorough review.

scripts/upload_test_results/upload_to_github.py Outdated Show resolved Hide resolved
scripts/upload_test_results/README.md Show resolved Hide resolved
scripts/upload_test_results/upload_to_github.py Outdated Show resolved Hide resolved
scripts/upload_test_results/upload_to_github.py Outdated Show resolved Hide resolved
scripts/upload_test_results/upload_to_github.py Outdated Show resolved Hide resolved
scripts/upload_test_results/upload_to_github.py Outdated Show resolved Hide resolved
scripts/upload_test_results/upload_to_github.py Outdated Show resolved Hide resolved
Copy link
Member

@nashif nashif left a comment

Choose a reason for hiding this comment

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

see comments

scripts/upload_test_results/README.md Outdated Show resolved Hide resolved
scripts/upload_test_results/upload_to_github.py Outdated Show resolved Hide resolved
scripts/upload_test_results/upload_to_github.py Outdated Show resolved Hide resolved
scripts/upload_test_results/upload_to_github.py Outdated Show resolved Hide resolved
scripts/upload_test_results/upload_to_github.py Outdated Show resolved Hide resolved
scripts/upload_test_results/README.md Outdated Show resolved Hide resolved
scripts/upload_test_results/README.md Show resolved Hide resolved
scripts/upload_test_results/upload_to_github.py Outdated Show resolved Hide resolved
@maksimmasalski
Copy link
Contributor Author

@xuhao8210 I'm making changes of the upstream script, please review it too and my resolved conversations. Seems that we should use default sanitycheck names like reel_board.xml and etc.

@maksimmasalski maksimmasalski force-pushed the upload_test_results branch 2 times, most recently from a895b61 to 7dcb2d1 Compare August 15, 2020 07:04
Copy link
Member

@erwango erwango left a comment

Choose a reason for hiding this comment

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

Some clarifications on REAME file

scripts/upload_test_results/README.md Show resolved Hide resolved
scripts/upload_test_results/README.md Outdated Show resolved Hide resolved
Copy link
Member

@erwango erwango left a comment

Choose a reason for hiding this comment

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

@maksimmasalski One last comment, (to comply with good practices on zephyr main repo) please squash your commits before merge.

nashif
nashif previously requested changes Aug 24, 2020
Copy link
Member

@nashif nashif left a comment

Choose a reason for hiding this comment

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

why aren't you using create_pr() from the github module? this works just fine, I just tested again and it works as expected, basically push branch to your fork and submit the PR from there, so there is no additional manual steps.

scripts/upload_test_results/requirements.txt Show resolved Hide resolved
scripts/upload_test_results/requirements.txt Show resolved Hide resolved
scripts/upload_test_results/config.txt Show resolved Hide resolved
Python script to automatically upload your HW Daily Test Results
to the Github test_results repo

Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
logging.info('Source directory file path %s', source_file_path)
git_file_path = os.path.join(git_dir_path, file_name)
logging.info('Destination path to file to commit %s', git_file_path)
shutil.copy(source_file_path, git_file_path)
Copy link
Contributor

Choose a reason for hiding this comment

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

An error will be raised here while the file already exists. For example, we both run sanitycheck with iotdk, so you may have already uploaded iotdk.xml when I try to upload it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@wangnuannuan Yes, it will. I can add exception, but that question we can raise during TG Meeting today. Because, we except each company will upload results of their boards, and nobody can duplicate its test results. For example, your company is responsible for iotdk, and your must check results and provide only results for iotdk. No any other developer or company can upload iotdk results and duplicate them. Please, don't forget to raise that question during TW Meeting.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nashif Do you have any input about that? Each company uploads separate boards, right?

@maksimmasalski
Copy link
Contributor Author

@nashif Do we plan to merge it?

@maksimmasalski maksimmasalski dismissed stale reviews from nashif and erwango September 16, 2020 19:05

Already made changes

logging.info('Push new repo updates to the origin ...')
origin.git.push(origin_name, 'master')
else:
logging.info("Repository already created, let's update master...")
Copy link
Member

Choose a reason for hiding this comment

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

what if the given directory is not a git repo? Maybe an error telling this? I think it is better to change the workflow, that first it checks if the directory exists (if not create dir), then if it is git repo and if not, initialize?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we can add it, or add note in a Readme file.

@PerMac PerMac self-requested a review November 6, 2020 16:02
PerMac
PerMac previously requested changes Nov 6, 2020
Copy link
Member

@PerMac PerMac left a comment

Choose a reason for hiding this comment

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

Sorry for changing the decision after such long time. I wanted to use the script and realize it is not working. Will continue debugging it and letting you know what might be wrong

@maksimmasalski
Copy link
Contributor Author

Sorry for changing the decision after such long time. I wanted to use the script and realize it is not working. Will continue debugging it and letting you know what might be wrong

According to out Testing WG discussion we will use manual uploading once per week. That will make our results more stable and without any additional garbage that can appear, if results will be uploaded automatically.

Disentangle origin from upstream repos and update repo calls.
Use pull --rebase for updating (regular pull does merge
which can cause history conflicts)

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
@PerMac PerMac self-requested a review November 12, 2020 14:25
Copy link
Contributor Author

@maksimmasalski maksimmasalski left a comment

Choose a reason for hiding this comment

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

I tested Maciej's commit a051681, and it works well.

@nashif nashif dismissed PerMac’s stale review December 1, 2020 13:28

please revisit

@hakehuang hakehuang marked this pull request as draft April 26, 2023 11:10
@hakehuang hakehuang self-requested a review April 26, 2023 11:10
@nashif nashif closed this Feb 15, 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.

None yet

7 participants