yocto-autobuilder-helper/scripts
Alexis Lothoré 9852c7da33 scripts: send_qa_email: do not try to generate a regression report when missing base and/or target
Fixes [YOCTO 15503]

When running autobuilder onm a testing or stable branch, the following
exception may occur:

Traceback (most recent call last):
  File "/home/pokybuild/yocto-worker/a-full/yocto-autobuilder-helper/scripts/send_qa_email.py", line 278, in <module>
    send_qa_email()
  File "/home/pokybuild/yocto-worker/a-full/yocto-autobuilder-helper/scripts/send_qa_email.py", line 207, in send_qa_email
    generate_regression_report(querytool, targetrepodir, regression_base, regression_target, tempdir, args.results_dir, log)
  File "/home/pokybuild/yocto-worker/a-full/yocto-autobuilder-helper/scripts/send_qa_email.py", line 93, in generate_regression_report
    regreport = subprocess.check_output([querytool, "regression-report", base, target, '-t', resultdir])
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/subprocess.py", line 548, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib64/python3.11/subprocess.py", line 1883, in _execute_child
    self.pid = _fork_exec(
               ^^^^^^^^^^^
TypeError: expected str, bytes or os.PathLike object, not NoneType

This issue is due to base and target revision being None, but subprocess
module do not tolerate arguments being None,

Prevent the script from even trying to generate a regression report if we
are missing some info about revisions to compare.

Cc: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-07-02 13:11:49 +01:00
..
abint scripts/abint: fix sorting on initial display 2024-03-07 22:54:53 +00:00
auh-config auh-meta-oe: Send to the openembedded-devel mailing list, not core 2023-11-03 10:57:44 +00:00
docs-build-patches scripts/run-docs-build: Support auto generation of switchers.js and poky.yaml 2022-03-22 22:17:02 +00:00
exein-path-intercepts config.json: Add meta-exein compatibility testing 2024-02-08 10:01:57 +00:00
archive_buildstats.py scripts/archive_buildstats: Exit early if buildstats isn't present 2022-08-24 20:56:12 +01:00
bitbake-extra-tests Add bitbake-extra-tests to cover taskexp ncurses UI. 2024-02-18 17:34:12 +00:00
build-perf-test-wrapper Clarify license and copyright information 2022-05-17 10:29:45 +01:00
buildhistory-init Clarify license and copyright information 2022-05-17 10:29:45 +01:00
check-gplv3 Clarify license and copyright information 2022-05-17 10:29:45 +01:00
checkvnc Clarify license and copyright information 2022-05-17 10:29:45 +01:00
collect-results Clarify license and copyright information 2022-05-17 10:29:45 +01:00
cve-generate-chartdata cve-generate-chartdata: Handle unexpected files in the stats directory 2024-04-26 10:48:15 +01:00
cve-report.py cve-report: Reformat txt recipe list per branch 2024-04-25 14:43:54 +01:00
docs_add_banner.py scripts/docs_add_banner: Fix several issues 2022-06-03 10:51:38 +01:00
generate-testresult-index.py scripts/generate-testresult-index.py: index of autobuilder test results improvements 2024-06-07 17:00:11 +01:00
index-table.html scripts/generate-testresult-index.py: index of autobuilder test results improvements 2024-06-07 17:00:11 +01:00
layer-config layer-config: Allow layer add to be disabled on a per target basis 2024-02-01 12:15:59 +00:00
layer-parser.py scripts/layer-parser: sort maintainers for better display 2024-04-11 22:59:39 -07:00
list-yp-compatible-layers.py scripts: add list-yp-compatible-layers.py 2023-10-29 22:40:32 +00:00
oe-build-perf-report-email.py Clarify license and copyright information 2022-05-17 10:29:45 +01:00
oe-build-perf-report-scrape-html-report.js scripts: Import build-perf scripts from oe-core 2019-01-22 22:58:11 +00:00
patchmetrics-generate-chartdata generate-chartdata: do not create lastyear json files 2024-04-25 14:43:55 +01:00
patchmetrics-update Rewrite metrics-gathering scripts 2023-10-31 15:01:57 +00:00
pre-commit-hook.sh Clarify license and copyright information 2022-05-17 10:29:45 +01:00
prepare-shared-repos scripts/prepare-shared-repos: fix minor typo in autobuilder logs 2023-02-15 11:31:10 +00:00
publish-artefacts publish-artefacts: remove generic-arm64 2024-05-08 13:55:56 +01:00
release-parser.py scripts/release-parser.py: download latest 2023-12-21 09:51:49 -08:00
run-abint Add an AB-INT report 2024-02-09 23:37:52 +00:00
run-config run-config/config.json: Add support for installing extra tools for specific targets 2024-03-07 22:28:29 +00:00
run-cvecheck generate-chartdata: do not create lastyear json files 2024-04-25 14:43:55 +01:00
run-docs-build run-docs-build: switch to released docs tarball 2023-01-17 11:04:42 -08:00
run-patchmetrics scipts/run-patchmetrics: Copy metric data recursively to fix failures 2024-04-26 07:26:30 +01:00
run-patchtest-selftest patchtest: add selftest runner 2023-11-15 16:05:17 +00:00
run-toaster-tests scripts/run-toaster-tests: Ensure hashserve is passed to toaster 2023-12-09 10:11:51 +00:00
runqemu-renice.c scripts: Add runqemu-renice.c for renicing runqemu 2020-09-05 14:59:14 +01:00
send_qa_email.py scripts: send_qa_email: do not try to generate a regression report when missing base and/or target 2024-07-02 13:11:49 +01:00
send-qa-email scripts/send-qa-email: add symlink to preserve compatibility with autobuilder 2023-01-26 22:40:07 +00:00
setup-config Clarify license and copyright information 2022-05-17 10:29:45 +01:00
shared-repo-unpack scripts/send_qa_email.py: Rename send-qa-email to send_qa_email.py 2023-01-26 22:40:02 +00:00
sstate-clean.py scripts/sstate-clean: run by cron on the autobuilder 2023-11-29 16:18:12 -08:00
sstate-clean.sh scripts/sstate-clean: run by cron on the autobuilder 2023-11-29 16:18:12 -08:00
summarize_top_output.py Clarify license and copyright information 2022-05-17 10:29:45 +01:00
target-present Clarify license and copyright information 2022-05-17 10:29:45 +01:00
test_send_qa_email.py scripts: test_send_qa_email: fix broken tests 2024-07-02 13:11:49 +01:00
test_utils.py scripts/test_utils.py: update test after BUILD_HISTORY_DIRECTPUSH removal 2023-06-26 16:27:11 +01:00
upload-error-reports Clarify license and copyright information 2022-05-17 10:29:45 +01:00
utils.py run-config/config.json: Add support for installing extra tools for specific targets 2024-03-07 22:28:29 +00:00