Closed Bug 1240733 Opened 4 years ago Closed 4 years ago

Improve tox configuration for optional arguments

Categories

(Release Engineering :: Applications: MozharnessCore, defect)

defect
Not set

Tracking

(firefox46 fixed)

RESOLVED FIXED
Tracking Status
firefox46 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

Details

Attachments

(1 file)

Right now it is not possible to only run a single test when executing tox for mozharness unit tests. Something we can have, and which would speed up devs in creating tests are the following options:

tox                            # run all unit tests
tox -- -x                      # run all unit tests but stop after first failure
tox -- test/test_base_log.py   # only run the base log unit test

This is actually easy to do. Patch will be up shortly.
Attachment #8709418 - Flags: review?(jlund)
Comment on attachment 8709418 [details] [diff] [review]
tox improvements v1

Review of attachment 8709418 [details] [diff] [review]:
-----------------------------------------------------------------

thank you for this :D

::: testing/mozharness/tox.ini
@@ +13,4 @@
>      HGRCPATH = {toxinidir}/test/hgrc
>  
>  commands =
> +    coverage run --source configs,mozharness,scripts --branch {envbindir}/nosetests -v --with-xunit --rednose --force-color {posargs}

ooo, ++ to posargs. Didn't know about that.
Attachment #8709418 - Flags: review?(jlund) → review+
https://hg.mozilla.org/mozilla-central/rev/05d2f38a2544
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.