Граф коммитов

7 Коммитов

Автор SHA1 Сообщение Дата
Gijs Kruitbosch e5848ed25c Bug 1610331 - use unix newlines when using 'mach addtest' on Windows, r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D60459

--HG--
extra : moz-landing-system : lando
2020-01-21 16:51:39 +00:00
Gijs Kruitbosch 25af4e72b1 Bug 1597129 - fix newline usage for manifest writing in mach addtest, r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D53353

--HG--
extra : moz-landing-system : lando
2019-11-18 21:12:22 +00:00
James Graham d4a7e4425c Bug 1549894 - Support wpt .js tests in addtest, r=bgrins
This by default creates an empty js file, but does support the
--long-timeout flag.

Differential Revision: https://phabricator.services.mozilla.com/D39888

--HG--
extra : moz-landing-system : lando
2019-08-26 21:07:16 +00:00
James Graham 92fb46bfa6 Bug 1564425 - Improve error handling of mach addtest, r=bgrins
Ensure that if we try to create a mochitest of unsupported file type we return a
useful error

Differential Revision: https://phabricator.services.mozilla.com/D38224

--HG--
extra : moz-landing-system : lando
2019-08-26 21:06:02 +00:00
Brian Grinstead 8ca66379e9 Bug 1547996 - Fix mochitest-browser-chrome with mach addtest;r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D29364

--HG--
extra : moz-landing-system : lando
2019-04-30 15:20:51 +00:00
James Graham 7b45ebc476 Bug 1543244 - Refactor mach addtest support, r=ahal,bgrins
Add addtest support for per-suite arguments and multiple files. Also
support opening the created test in an editor. This allowed supporting
the wpt suite and replaces `mach wpt-create`.

 # Create a wpt test
 ./mach addtest testing/web-platform/tests/accelerometer/test.html

 # Create a wpt reftest
 ./mach addtest --suite wpt-reftesttesting/web-platform/tests/css/example.html --ref example-ref.html

The files created will be opened in the default editor if --editor is
supplied or a specified editor if the argument is given a value.

Differential Revision: https://phabricator.services.mozilla.com/D26339

--HG--
extra : moz-landing-system : lando
2019-04-11 09:44:32 +00:00
Brian Grinstead 05f5ec26a4 Bug 1540285 - Add a test generator script into `./mach addtest` r=ahal
Instead of:
perl gen_template.pl -b=123456 --type=plain > path/to/test_bug123456.html

You can do:
./mach addtest --suite="mochitest-plain" > path/to/test_bug123456.html

But you can also pass in a new file path and let it guess the suite/doc:

```
# mochitest-chrome tests
./mach addtest js/xpconnect/tests/chrome/test_chrome.html
./mach addtest js/xpconnect/tests/chrome/test_chrome.xhtml
./mach addtest js/xpconnect/tests/chrome/test_chrome.xul

# mochitest-plain tests
./mach addtest js/xpconnect/tests/mochitest/test_plain.html
./mach addtest js/xpconnect/tests/mochitest/test_plain.xhtml
./mach addtest js/xpconnect/tests/mochitest/test_plain.xul

# mochitest-browser tests
./mach addtest browser/base/content/test/alerts/browser_foo.js

# xpcshell tests
./mach addtest browser/components/extensions/test/xpcshell/test_xpcshell.js
```

This also changes the mochitest template files in the following ways:
- removes the bug # boilerplate
- remove some unnecessary attributes in the template
- removes the th.template
- adds the browser.template for browser-chrome tests

Differential Revision: https://phabricator.services.mozilla.com/D25482

--HG--
rename : testing/mochitest/static/chrome.template.txt => testing/mochitest/static/chromehtml.template.txt
rename : testing/mochitest/static/test.template.txt => testing/mochitest/static/plainhtml.template.txt
rename : testing/mochitest/static/xhtml.template.txt => testing/mochitest/static/plainxhtml.template.txt
rename : testing/mochitest/static/xul.template.txt => testing/mochitest/static/plainxul.template.txt
extra : moz-landing-system : lando
2019-04-08 19:09:42 +00:00