summaryrefslogtreecommitdiffstats
path: root/tox.ini
Commit message (Collapse)AuthorAgeFilesLines
* tox.ini: Make the lint and format environments run black for all codePeter Kjellerstedt2024-09-121-2/+2
| | | | | | | | | | This matches the extra files specified in run_tests. Change-Id: Ic8999383a17b3ec7ae27322323ea44eeaa40c968 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/434998 Tested-by: Josip Sokcevic <sokcevic@google.com> Reviewed-by: Josip Sokcevic <sokcevic@google.com> Commit-Queue: Josip Sokcevic <sokcevic@google.com>
* tox.ini, constraints.txt: Lock the version of black to <24Peter Kjellerstedt2024-09-121-0/+3
| | | | | | | | | | | The formatting produced by black versions before 24 matches the current formatting of the code. Change-Id: I045f22d2f32a09d4683867293e81512f2abd1036 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/434997 Tested-by: Josip Sokcevic <sokcevic@google.com> Reviewed-by: Josip Sokcevic <sokcevic@google.com> Commit-Queue: Josip Sokcevic <sokcevic@google.com>
* tox: Remove pylint timeoutJosip Sokcevic2023-12-081-3/+0
| | | | | | | | | | It's not a valid pylint config Change-Id: Ida480429a3a86637f26e9fc3a0d6fa2d225d952a Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/396921 Reviewed-by: Scott Lee <ddoman@google.com> Commit-Queue: Josip Sokcevic <sokcevic@google.com> Tested-by: Josip Sokcevic <sokcevic@google.com>
* tests: added python 3.12Daniel Kutik2023-10-171-1/+2
| | | | | | | | | | | adding the recently released python 3.12 to our list of test environments. Change-Id: I05ec0129ad29c16fff65ddfb389f251571f811a2 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/389754 Commit-Queue: Daniel Kutik <daniel.kutik@lavawerk.com> Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Daniel Kutik <daniel.kutik@lavawerk.com>
* tests: Fix tox error in py36 use virtualenv<20.22.0Daniel Kutik2023-09-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | tox uses virtualenv under its hood for managing virtual environments. Virtualenv 20.22.0 dropped support for Python <= 3.6. Since we want to test against Python 3.6 we need to make sure we use a version of virtualenv earlier than 20.22.0. This error was not stopping any tests from passing but was printed multiple times to stderr when executing the py36 target: Error processing line 1 of [...]/.tox/py36/[...]/_virtualenv.pth: Traceback (most recent call last): File "/usr/lib/python3.6/site.py", line 168, in addpackage exec(line) File "<string>", line 1, in <module> File "[...]/.tox/py36/[...]/_virtualenv.py", line 3 from __future__ import annotations ^ SyntaxError: future feature annotations is not defined Source: https://tox.wiki/en/latest/faq.html#testing-end-of-life-python-versions Change-Id: I27bd8200987ecf745108ee8c7561a365f542102a Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/387694 Tested-by: Daniel Kutik <daniel.kutik@lavawerk.com> Commit-Queue: Daniel Kutik <daniel.kutik@lavawerk.com> Reviewed-by: Mike Frysinger <vapier@google.com>
* tox.ini: add isort as dependencyDaniel Kutik2023-08-281-0/+1
| | | | | | | | | | | | a previous introduced isort, which causes tox runs to fail for all python versions. adding isort as dependency resolve these issues. Change-Id: If3faf78e6928e6e5111b2ef2359351459832431f Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/384175 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: Mike Frysinger <vapier@google.com> Commit-Queue: Mike Frysinger <vapier@google.com>
* tox: enable python 3.11 testingDaniel Kutik2023-08-151-1/+2
| | | | | | | | | | | Python 3.11 was released almost a year ago. Test: tox -epy311 Change-Id: I447637a1e97038a596373d7612c9000c0c738ec9 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/382838 Tested-by: Daniel Kutik <daniel.kutik@lavawerk.com> Reviewed-by: Mike Frysinger <vapier@google.com> Commit-Queue: Daniel Kutik <daniel.kutik@lavawerk.com>
* run_tests: Check flake8Gavin Mak2023-03-311-0/+1
| | | | | | | | | | | This also gets enforced in CQ. Bug: b/267675342 Change-Id: I8ffcc5d583275072fd61ae65ae4214b36bfa59f3 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/366799 Tested-by: Gavin Mak <gavinmak@google.com> Reviewed-by: Mike Frysinger <vapier@google.com> Commit-Queue: Gavin Mak <gavinmak@google.com>
* Format codebase with black and check formatting in CQGavin Mak2023-03-221-0/+1
| | | | | | | | | | | | Apply rules set by https://gerrit-review.googlesource.com/c/git-repo/+/362954/ across the codebase and fix any lingering errors caught by flake8. Also check black formatting in run_tests (and CQ). Bug: b/267675342 Change-Id: I972d77649dac351150dcfeb1cd1ad0ea2efc1956 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/363474 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Gavin Mak <gavinmak@google.com> Commit-Queue: Gavin Mak <gavinmak@google.com>
* Make black with line length 80 repo's code styleGavin Mak2023-03-201-1/+19
| | | | | | | | | | | | | Provide a consistent formatting style and tox commands to lint and format. Bug: b/267675342 Change-Id: I33ddfe07af8473f4334c347d156246bfb66d4cfe Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/362954 Reviewed-by: Josip Sokcevic <sokcevic@google.com> Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Gavin Mak <gavinmak@google.com> Commit-Queue: Gavin Mak <gavinmak@google.com>
* tox: Allow passing positional argumentsDaniel Kutik2022-11-271-1/+1
| | | | | | | | | | | | Allows us to pass on arguments to run_tests and pytest after -- when executing tox. E.g.: To run all tests verbose in a test class: tox -- -v tests/test_project.py::ReviewableBranchTests Signed-off-by: Daniel Kutik <daniel.kutik@lavawerk.com> Change-Id: Ibd78856c6d4053c769f3d0b6130ebc8145275f78 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/353176 Reviewed-by: Mike Frysinger <vapier@google.com>
* tox: Make all tests timeout after 5minDaniel Kutik2022-11-261-1/+6
| | | | | | | | | | | Use pytest-timeout to make sure tests don't get stuck for more than 5 minutes. In future individual tests can exceed this timeout by being decorated with @pytest.mark.timeout(600). Signed-off-by: Daniel Kutik <daniel.kutik@lavawerk.com> Change-Id: I8f5b61a20230c22a86fd5636297c78f41369449a Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/353124 Reviewed-by: Mike Frysinger <vapier@google.com>
* tox: enable python 3.10 testingDaniel Kutik2022-11-251-1/+2
| | | | | | | | | | | | Note that in YAML, Python version 3.10 would be parsed as 3.1, hence I put all the Python versions in quotes. More on this: https://github.com/actions/setup-python/issues/160 Signed-off-by: Daniel Kutik <daniel.kutik@lavawerk.com> Change-Id: Iba380a6a6a6de8486486c8981e712c7bf4dfe759 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/353019 Reviewed-by: Mike Frysinger <vapier@google.com>
* Drop support for Python 3.5Peter Kjellerstedt2021-06-031-2/+1
| | | | | | | | | | | | | | | | | | | Running repo with Python 3.5 fails due to the use of the encoding parameter to subprocess.run(). There are also f-strings being used in some of the tests. This drops support for these systems: * Ubuntu Xenial: released Apr 2016, EOS Apr 2021, EOL Apr 2024 * Debian Stretch: released Jun 2017, EOL Jun 2022 So the minimum required distros now are: * Ubuntu Bionic: released Apr 2018 w/Python 3.6 * Debian Buster: released Jul 2019 w/Python 3.7 Change-Id: I1144f7ab6f882b10cac0131982df081fe4ac44f9 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/303363 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
* tox: enable python 3.5 & 3.9 testingMike Frysinger2021-04-011-1/+3
| | | | | | | | | We still support Python 3.5, so make sure it keeps working. Change-Id: I150158a656b26de6d733316a68a2cbb8b5b99716 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/299625 Reviewed-by: Michael Mortensen <mmortensen@google.com> Tested-by: Mike Frysinger <vapier@google.com>
* stop testing Python 2.7v2.9Mike Frysinger2020-09-061-7/+1
| | | | | | | | | | | A recent change broke `repo version` on Python 2.7. Rather than fix it, lets drop Python 2.7 support so it can slowly rot. Bug: https://crbug.com/gerrit/10418 Change-Id: I5c6e3d18e4a193b0a978062c23f7cea392e95d0f Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/259155 Reviewed-by: David Pursehouse <david.pursehouse@gmail.com> Tested-by: Mike Frysinger <vapier@google.com>
* github: enable github actions for postsubmit testingMike Frysinger2020-02-161-0/+7
| | | | | | | | | | | | This gives us a bit of feedback by running our testsuite on Linux, macOS, and Windows platforms. While Linux & macOS are passing, Windows fails some of them. We can figure that out later. This is better than what we have now which is manual one-offs. Change-Id: I9d2d644be97ec76645db0bc15739e7679310a647 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255314 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>
* tox: get tests passing a bit on WindowsMike Frysinger2020-02-151-1/+5
| | | | | | | | | | | We need to use the path separators provided by the python library, and we need to set the git env vars so the name is always known. Not all tests pass, but at least the basic frameworks work now. Change-Id: Icea67098a8d7d58bbf918c78325681cf12a2e5f2 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255313 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>
* repo: add --version support to the launcherMike Frysinger2020-02-121-0/+5
| | | | | | | | | | | We can get version info when in a checkout, but it'd be helpful to show that info at all times. Change-Id: Ieeb44a503c9d7d8c487db4810bdcf3d5f6656c82 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254712 Reviewed-by: Michael Mortensen <mmortensen@google.com> Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Mike Frysinger <vapier@google.com>
* tox: add & document tox usageMike Frysinger2019-12-021-0/+22
This makes it easy to run all the tests against multiple versions of Python. We want to make sure Python 2.7 & 3.6+ work. Change-Id: Ia7b16eb46a2aa7c240f03bb291987fa8cb215267 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/247174 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>