Skip to content

Commit 611a1c7

Browse files
committed
tatt: explain why no jobs are being created (-u 0 -t)
This can happen if "-u 0 -t" is passed to tatt, but the package defines no src_test phase. In this case, the tatt script will generate no jobs and the user is bewildered as to why. Signed-off-by: Arthur Zamarin <[email protected]>
1 parent 5ca2228 commit 611a1c7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/pkgdev/scripts/pkgdev_tatt.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,12 @@ def main(options, out, err):
384384

385385
from jinja2 import Template
386386

387+
if not any("test" in pkg.defined_phases for pkg in pkgs):
388+
if not options.use_combos > 0:
389+
return err.error(
390+
"no packages define a src_test, and --use-combos is not a positive integer. Cannot create any jobs, exiting..."
391+
)
392+
387393
script = Template(template, trim_blocks=True, lstrip_blocks=True).render(
388394
jobs=list(_build_jobs(options, pkgs)),
389395
report_file=job_name + ".report",

0 commit comments

Comments
 (0)