Closed Bug 892439 Opened 11 years ago Closed 11 years ago

runcppunittests.py should accept either test files or test directories from the command line

Categories

(Testing :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla25

People

(Reporter: dminor, Assigned: dminor)

References

Details

Attachments

(1 file)

Currently each runcppunittests.py expects each test to run to be listed separately on the command line, which is unwieldy when we want to run all of the tests in the test package in bug 811409. Adding a --test-path option would clean this up.
I think the simplest thing would be to not add a new option, but accept either test binaries or directories on the command line, and expand directories out to their contents so that we run all test binaries in a directory.
Changed summary as per Ted's comment.
Summary: runcppunittests.py should take a command line option to run all tests in a directory → runcppunittests.py should accept either test files or test directories from the command line
Assignee: nobody → dminor
Status: NEW → ASSIGNED
Attachment #774094 - Flags: review?(ted)
Comment on attachment 774094 [details] [diff] [review] Patch to add support for specifying directories on the command line Review of attachment 774094 [details] [diff] [review]: ----------------------------------------------------------------- ::: testing/runcppunittests.py @@ +141,5 @@ > sys.exit(1) > + progs = [] > + for p in args: > + if os.path.isdir(p): > + progs.extend([os.path.abspath(os.path.join(p, x)) for x in os.listdir(p) if not x.endswith('.py')]) A little funky to only exclude .py files, but I'm guessing you actually needed this, so it's fine.
Attachment #774094 - Flags: review?(ted) → review+
Thanks! I added a comment to explain exclusion of .py files (necessary due to the way we packaged the cppunittests in the test archive.) https://hg.mozilla.org/integration/mozilla-inbound/rev/1eb8567e0743
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: