Commit graph

232 commits

Author SHA1 Message Date
Samson
c0bee7cb86
Format toml files (#30112)
* Add taplo fmt config for toml fmt

* fmt toml files

* Add even-better-toml to extensions recommendations
2023-08-17 15:07:43 +00:00
Martin Robinson
b91e3654e4
Remove the YAML tidy code (#30004)
This code was used to test buildbox_steps.yml, but Servo no longer uses
buildbot, so this code is essentially unused. In addition, YAML +
Cython 3 is causing issues on the CI.

Fixes #30003

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2023-07-18 12:36:03 +00:00
Martin Robinson
d5202a4a98
Enable the GitHub merge queue (#29989)
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2023-07-13 07:45:48 +00:00
bors-servo
57d34605e9
Auto merge of #29923 - mrobinson:test-scripts, r=jdm
Combine all script tests into `test-scripts`

Remove:
    - tidy self test support from `./mach test`
    - `./mach test-idl`

Adds a `./mach test-scripts` command that is responsible for running all
Python script tests. Run this during the CI to catch regressions in
changes to scripts. The WebIDL tests are still *very* slow and there are
from Gecko, so only run them when "-a" is passed meaning all tests.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2023-06-30 00:18:58 +02:00
Martin Robinson
ae9a9e1d17
Combine all script tests into test-scripts
Remove:
    - tidy self test support from `./mach test`
    - `./mach test-idl`

Adds a `./mach test-scripts` command that is responsible for running all
Python script tests. Run this during the CI to catch regressions in
changes to scripts. The WebIDL tests are still *very* slow and there are
from Gecko, so only run them when "-a" is passed meaning all tests.
2023-06-29 19:09:33 +02:00
Martin Robinson
f017169ae4
Update scripts to reflect new WPT directory name 2023-06-26 10:48:02 +02:00
sagudev
bf08032b03 Standalone Flake8 config 2023-06-23 16:24:35 +02:00
Martin Robinson
81433a8684
Convert tidy to a non-egg Python package
It seems that servo-tidy is only used by webrender in my GitHub
searches. WebRender could simply use `rustfmt` and the tidy on pypi
hasn't been updated since 2018. Converting tidy to a normal Python
package removes the maintenance burden of continually fixing the easy
install configuration.

Fixes #29094.
Fixes #29334.
2023-06-15 13:10:06 +02:00
Martin Robinson
faa8c0e967
Remove more Python 2 compatibility code
- os.environ is always `str` in Python 3.
- The only string type is `str` so we can stop using `six.str_types`.
- `iteritems()` isn't necessary because dicts have the `items()` method.
2023-05-29 13:56:03 +02:00
Martin Robinson
1613997d87 Remove a print statement mistakenly added in a previous change
This statement is totally unnecessary and interferes with the console
commands which erase and rewrite the current tidy status.
2023-03-28 09:42:35 +02:00
Martin Robinson
ec9cbeefd8 Merge forbidden panic check into test-tidy
This cleans up the GitHub actions yaml a bit and ensures that developers
are running this check locally before submitting changes. In addition,
it allows adding tests for this check. Finally, this change fixes the
tidy tests by upgrading voluptuous for Python 3.10 as well as by
reverting an inadvertent change for NixOS compatibility on one of the
dummy testing files.
2023-03-22 15:37:56 +01:00
Josh Matthews
65a4d1646d
Update allowed license string. 2022-10-16 09:23:05 -04:00
yvt
262a41dd2a Use #!/usr/bin/env bash in shell scripts for NixOS compatibility
Signed-off-by: yvt <i@yvt.jp>
2021-06-14 22:06:09 +09:00
dependabot[bot]
d6a2c0676f
build(deps): bump pyyaml from 5.1 to 5.4 in /python/tidy
Bumps [pyyaml](https://github.com/yaml/pyyaml) from 5.1 to 5.4.
- [Release notes](https://github.com/yaml/pyyaml/releases)
- [Changelog](https://github.com/yaml/pyyaml/blob/master/CHANGES)
- [Commits](https://github.com/yaml/pyyaml/compare/5.1...5.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-25 22:39:11 +00:00
bors-servo
9fbdbddb0c
Auto merge of #27402 - kunalmohan:webgpu-cts, r=jdm
Add a copy of WebGPU CTS to wpt.

<!-- Please describe your changes on the following line: -->
The test suite is generated from `glsl-dependent` branch in https://github.com/gpuweb/cts
We already have 6/44 tests passing and a number of subtests in other tests also pass.

r?@jdm
cc @kvark

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #27395  (GitHub issue number if applicable)

<!-- Either: -->
- [X] These changes do not require tests because we don't have tests for tests.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2020-08-04 14:12:45 -04:00
Josh Matthews
64df2c2d60 Fix tidy check when no duplicate versions present. 2020-07-31 10:42:01 -04:00
Kunal Mohan
32a4104f4a changes made for cts to work 2020-07-31 11:07:19 +05:30
CYBAI
584e031530 Handle apostrophes for whatwg URL tidy check 2020-07-23 13:05:04 +09:00
Josh Matthews
2d7effddef Implement Console grouping APIs. 2020-07-06 19:36:26 -04:00
bors-servo
3f999ce785
Auto merge of #27007 - saschanaz:py3-flake, r=jdm
Upgrade flake8/pyflakes for Py3 compatibility

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2020-06-21 11:35:20 -04:00
bors-servo
fde47f8937
Auto merge of #27005 - saschanaz:py3-tidy, r=jdm
Do not raise StopIteration: PEP 479

<!-- Please describe your changes on the following line: -->

This fixes `test-tidy` Py3 compatibility, as [PEP 479](https://www.python.org/dev/peps/pep-0479/) says `return` must be used to stop iteration inside generator instead of `raise StopIteration`.

This introduces subtle behavior change where `FileList()` constructor now won't implicitly stop the caller generator when the list is empty. `wpt_lint.py` is modified to explicitly stop when empty, to match the change.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2020-06-21 02:19:55 -04:00
Kagami Sascha Rosylight
1d2e618e5b Return early when no merge base commit 2020-06-21 05:26:55 +02:00
Kagami Sascha Rosylight
57eed5baa4 Use except Exception where Py2/3 disagrees 2020-06-21 04:30:23 +02:00
Kagami Sascha Rosylight
96b8f39277 Fix new flake8 warnings 2020-06-20 23:53:49 +02:00
Kagami Sascha Rosylight
98a40a432c Upgrade flake8/pyflakes for Py3 compatibility 2020-06-20 23:33:16 +02:00
Kagami Sascha Rosylight
97bfab73b4 Initialize colorama only once 2020-06-20 22:36:54 +02:00
Kagami Sascha Rosylight
90449ae147 Do not raise StopIteration: PEP 479 2020-06-20 21:46:28 +02:00
Josh Matthews
4fec987221 Fix output of test-tidy with duplicated packages. 2020-05-20 14:19:47 -04:00
Manish Goregaokar
c89dc821ba Add XRHand interface 2020-04-27 17:35:48 -07:00
Simon Sapin
4227425c1e Remove the lint added in https://github.com/servo/servo/pull/14589
Per https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=a8a5a716b3bdf52fa7960a1e4ee89add
it looks like the drop order of temporaries was changed at some point and this pattern is no longer problematic.
2020-04-08 15:59:17 +02:00
Daniel Alley
430a65be07 Remove azure canvas backend
closes #25833
2020-02-25 00:14:24 -05:00
lberrymage
cd9195056c Add lint check for &DomRoot<T>
`&DomRoot<T> is strictly less expressive than `&T`, so using it is
pointless.
2019-12-21 12:44:35 -09:00
marmeladema
4fc5154dd1 Make mach test-tidy --self-test compatible with Python3 2019-12-14 12:42:47 +00:00
marmeladema
9d04f231f4 Make mach test-tidy --no-wpt compatible with Python3
Note: tidiness tests of Python file using flake8 was effectively
broken since a previous commit for Python3 compatibility
2019-12-11 13:57:07 +00:00
marmeladema
176e63284e Replace usage of basestring by six.string_types for Python3 compatibility 2019-12-10 16:11:02 +00:00
marmeladema
76ff22f5d0 Allow to specify glob pattern for ignored directories in servo-tidy.toml 2019-12-09 19:31:46 +00:00
bors-servo
ea32495504
Auto merge of #24708 - szeged:webgpu-base, r=gterzian,kvark
Initial implementation of WebGPU API

<!-- Please describe your changes on the following line: -->
- Added the WebIDL bindings for GPU and GPUadapter interfaces.
- Created a background thread for WebGPU api calls.
- Established the async communication between the background thread and the WebGPU interfaces.
- Implemented the `requesAdapter` function of `navigator.gpu`

`./mach test-tidy` reports an error due to the different `arrayvec` version used in `servo` and `webgpu`, so added it to the ignore list in `servo-tidy.toml`

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes addresses a part of #https://github.com/servo/servo/issues/24706

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

cc @jdm, cc @kvark

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24708)
<!-- Reviewable:end -->
2019-11-25 00:00:46 -05:00
Paul Rouget
b71774d8fe Run test-tidy on Windows 2019-11-21 09:56:39 +01:00
Zakor Gyula
12893aa010 Initial implementation of WebGPU API 2019-11-21 08:30:26 +01:00
marmeladema
ff50cdb183 Fix call to flake8 broken when using distro module during test-tidy 2019-10-22 10:15:53 +01:00
marmeladema
bed6f2dbec Use relative import statements to be compatible with Python3 2019-10-20 23:43:26 +01:00
marmeladema
bf66a08c02 Fix StringIO module import to be compatible with Python3 2019-10-16 00:22:08 +01:00
marmeladema
5bd0fca140 Use iteritems from six module for Python3 compatibility 2019-10-16 00:22:08 +01:00
marmeladema
4e1ee07a79 Improve print statement compatibility with Python3 2019-10-16 00:22:06 +01:00
Siddhartha Mishra
aa7ba1a850 report when blocked package exception is not needed 2019-09-22 14:16:46 +05:30
Siddhartha Mishra
3ced8d4ddc have tidy always check Cargo.lock 2019-09-22 14:08:06 +05:30
Josh Matthews
f1b10393c2 rustfmt 2019-07-09 10:52:43 -04:00
Simon Sapin
753633d3be Remove regex-based checks in servo-tidy that are covered by rustfmt 2019-06-22 14:59:09 +02:00
bors-servo
bdc584f3ed
Auto merge of #23400 - staktrace:patch-1, r=jdm
Include missing dependency requirements

Running `servo-tidy` in a virtualenv where all you've done is `pip install servo-tidy==0.3.0` doesn't actually work because of missing dependencies. PyYAML and voluptuous are required as well. I don't know anything about python package management but declaring these missing dependencies seems like an appropriate thing to do. Patch itself is untested because I don't know how, although with these dependencies installed in my virtualenv running `servo-tidy` works.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23400)
<!-- Reviewable:end -->
2019-06-03 13:08:48 -04:00
Manish Goregaokar
c689866d35 Add XR.test() 2019-05-30 13:29:05 -07:00