Commit Graph

59 Commits

Author SHA1 Message Date
Evgeny Vereshchagin 37d941267e
ci: run the fuzz target on PRs (#4378)
* ci: run the fuzz target on PRs

using https://google.github.io/oss-fuzz/getting-started/continuous-integration/

It downloads the corpus OSS-Fuzz has accumulated so far (including the
test cases that triggered issues in the past) and runs the fuzz target
with it. It should help to catch most regressions when PRs are opened.

Prompted by https://github.com/secdev/scapy/pull/4373.

* dcerpc: turn print into log_runtime.warning

to make it possible to turn it off with logging.disable().

(it should help to make the fuzz target less chatty among other things
because it seems to be the only dissector (covered by the fuzz target)
printing messages like that directly)
2024-07-01 20:28:11 +02:00
gpotter2 651df57175
Allow failure of codecov job (#4430)
Because it just keeps failing
2024-06-15 19:44:25 +02:00
gpotter2 640252ec9e Test on MacOS 14 2024-05-31 00:16:52 +02:00
gpotter2 dedddd975c
Update codecov-action to v4 (#4291) 2024-02-18 17:18:29 +01:00
Guillaume Valadon 6565a75c77
Automatically check SPDX identifiers (#4268) 2024-02-11 12:46:43 +01:00
gpotter2 277f31e256 Update github actions 2024-01-31 13:08:50 +01:00
gpotter2 78f153e561 Bump mypy to 1.7.0 and tox 2023-11-14 20:54:12 +01:00
gpotter2 bc6eb8f378 Update build versions 2023-11-12 22:07:14 +01:00
Nils Weiss 1fb14adfc1 Added myself to the maintainers 2023-06-21 10:30:12 +02:00
gpotter2 96bf387880
Support new build methods (#3958)
* Build and check the wheel in the twine check as well

It should help to make sure that scapy can be installed from PyPI (or
any other package index) using pip and its sdist.

The check switched to the "build" build frontend because it builds
wheels from sdists by default:
https://pypa-build.readthedocs.io/en/stable/#python--m-build

* Remove README

In 669506bd42 scapy switched to
pyproject.toml where 'readme' is dynamic and should be supplied by
setup.py. setup.py reads README.md and it works from inside the source
tree but since README.md isn't included in the sdist it fails when pip
or the build frontend builds the wheel from the sdist with:
```
distutils.errors.DistutilsOptionError: No configuration found for dynamic 'readme'.
Some dynamic fields need to be specified via `tool.setuptools.dynamic`
others must be specified via the equivalent attribute in `setup.py`.
```

This patch addresses that by removing README and letting setuptools
include README.md to the sdist automatcially.

README was added in 4f71027fcd in 2016 and back then it probably made
sense because setuptools didn't include README.md in the sdist
automatically. These days setuptools can handle README.md just fine so
it's no longer necessary to keep README any more.

It makes it possible to build the wheel from the sdist again.

Fixes:
```
python3 -m build
...
* Building wheel from sdist
* Creating venv isolated environment...
* Installing packages in isolated environment... (setuptools>=62.0.0)
* Getting build dependencies for wheel...
...
  File "/tmp/build-env-vtaxy4xl/lib64/python3.11/site-packages/setuptools/config/pyprojecttoml.py", line 351, in _obtain_readme
    self._ensure_previously_set(dist, "readme")
  File "/tmp/build-env-vtaxy4xl/lib64/python3.11/site-packages/setuptools/config/pyprojecttoml.py", line 307, in _ensure_previously_set
    raise OptionError(msg)
distutils.errors.DistutilsOptionError: No configuration found for dynamic 'readme'.
Some dynamic fields need to be specified via `tool.setuptools.dynamic`
others must be specified via the equivalent attribute in `setup.py`.

ERROR Backend subprocess exited when trying to invoke get_requires_for_build_wheel
```
and
```
python3 -m pip install dist/scapy-2.5.0.dev56.tar.gz
Processing ./dist/scapy-2.5.0.dev56.tar.gz
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
...
```

It's a follow-up to 669506bd42

* Update doc: installation & build instructions

* Make sure VERSION is also exported in wheels

* Cleanup MANIFEST.in

* Add packaging instructions

* Add git archive unit test

* Use %(describe:tags=True)

* Update doc/scapy/installation.rst

Co-authored-by: Evgeny Vereshchagin <evvers@ya.ru>

---------

Co-authored-by: Evgeny Vereshchagin <evvers@ya.ru>
2023-04-11 18:21:11 +02:00
Pierre 42115bf549
Drop six library (third & last batch) (#3857)
* Drop six library (third & last batch)

* Fix tiny mistake

* Lots and lots of types fixes (+ upg 2 mypy 1.1.1)

---------

Co-authored-by: gpotter2 <10530980+gpotter2@users.noreply.github.com>
2023-04-08 20:20:27 +02:00
gpotter2 669506bd42
Migrate to `pyproject.toml` (#3869)
* Migrate to `pyproject.toml`

Co-authored-by: KOLANICH <kolan_n@mail.ru>

* Bump setuptools to 62.0.0

Otherwise we suffer from the bug described in pypa/setuptools, #3244

* Codecov: xml upload

---------

Co-authored-by: KOLANICH <kolan_n@mail.ru>
2023-02-17 14:53:48 +01:00
Guillaume Valadon 0ea948f2e7 GitHub Actions - remove Python 2.7 tests 2023-01-10 10:03:31 +01:00
Nils Weiss ef352bd7fd
Bugfix in automotive staged enumerators (#3803)
* remove scanner tests from pypy

* remove scanner tests from pypy

* Fix minor bug in argument passing of staged_test_cases

* remove scanner tests from all tests which are not allowed to fail

* update

* disable scanner tests for all tests which are not allowed to fail

* update default values of github CI

* try to fix ci

* try to fix ci

* try to fix ci

* try to fix ci

Co-authored-by: Nils Weiss <nils@dissec.to>
2022-12-23 11:41:24 +01:00
gpotter2 e1a2e807c3 Run 2.7 tests on <=20.04 2022-12-08 22:18:40 +01:00
gpotter2 1c177f321f
Use macOS 12 (#3788)
* Use macOS 12

* Disable libpcap tests on MacOS 12, Python 2.7
2022-11-16 13:00:43 +01:00
Nils Weiss 7eeb437aa5
Remove SID and DID from ISOTP and documentation (#3791)
* Remove SID and DID from ISOTP and documentation

* remove scanner tests from pypy

* remove scanner tests from pypy

Co-authored-by: Nils Weiss <nils@dissec.to>
2022-11-16 12:58:47 +01:00
Nils Weiss 319b214951
Add "continue-on-error" on some CI tests (#3735)
* add scanner-ci machines

* test appveyor

* test appveyor

* update

* Remove scanner tests from appveyor

* change matrixes

* change matrixes

* try to fix

* try to fix

* try to fix
2022-10-06 20:43:44 +02:00
gpotter2 2166920786 Add upstream cryptography test 2022-09-12 17:46:59 +02:00
Alex 291e8269fb Update unittests.yml
Signed-off-by: sashashura <93376818+sashashura@users.noreply.github.com>
2022-09-07 02:04:57 +02:00
gpotter2 6b2e9fcccb
Update regression tests instructions in template 2022-06-27 13:34:56 +02:00
gpotter2 ef368d64ad Update python versions in unittests 2022-06-18 23:19:07 +02:00
gpotter2 165dfae2e6 Update actions in the github workflow 2022-06-18 23:19:07 +02:00
Tijs-B 9c3a3550d6
Merge pull request #3586 from Tijs-B/patch-1
Issue template: change pip install url to https
2022-04-21 17:49:44 +02:00
gpotter2 90c255d255 Add required permission to CodeQL action 2021-12-01 10:06:44 +01:00
Guillaume Valadon d1d2ff1473
Several CI related fixes (#3399)
* Fix UTscapy timeout logs

* Add doc

* Set fail-fast to false

* Linting

* Use bash substring

* Install libpcap

* Run tox in parallel mode
2021-11-01 15:54:45 +01:00
gpotter2 ab391d394d Use macos 10.15 2021-10-10 11:34:35 +02:00
gpotter2 5039baa2e8 Apply minor fixes 2021-07-01 20:20:23 +02:00
gpotter2 5e7db96ca3 Use github issue forms 2021-07-01 20:20:23 +02:00
gpotter2 11832deee0
Travis cleanup / TunTap fixes / Mypy 3.9 (#3182)
* Use 3.9 for Mypy

* Improve tuntap tests - Fix
2021-04-24 14:23:39 +02:00
gpotter2 2b96a8e3a4
Move libpcap tests to Github Actions (#3143)
* Enable libpcap tests on GHCI

* Remove libpcap tests from travis

* Reduce GHCI timeout accordingly

* Fix libpcap tests

* Fix libpcap packet timeout

* Remove useless export
2021-03-30 16:58:05 +02:00
Gabriel 1aa0d8a849
Revert "Move libpcap tests to Github Actions (#3136)" (#3137)
This reverts commit e3de1a2d95.
2021-03-14 22:25:43 +01:00
Gabriel e3de1a2d95
Move libpcap tests to Github Actions (#3136) 2021-03-14 22:05:24 +01:00
gpotter2 dea8a1d953 Detect long tests UTscapy 2021-03-11 22:51:07 +01:00
gpotter2 c38a478292 GHCI: set fetch-depth=2 for codecov 2021-02-20 10:36:15 +01:00
gpotter2 39e85d5c3c Prepare Github Actions to run Linux root tests 2020-12-06 21:42:24 +01:00
gpotter2 6106662c3f GHCI: OSX & merge CodeQL 2020-11-27 17:22:25 +01:00
gpotter2 575ae48105 Upgrade to mypy 0.790 2020-11-17 18:44:25 +01:00
Guillaume Valadon fba21efcdd
Python 3.9 support (#2851)
* Unit tests linting for Python 3.9

* Python 3.9 support
2020-10-14 11:33:54 +02:00
gpotter2 6dda7cd357 Lighten up codecov rules 2020-09-18 21:34:00 +00:00
Guillaume Valadon c66d201c76
CodeQL support 2020-09-03 09:33:47 +02:00
Gabriel fa604a487e
Hide "things to consider" 2020-08-01 11:37:42 +02:00
Guillaume Valadon c4b80cc76e
codecov configuration file moved to .github/ (#2519)
* codecov configuration file moved to .github/
2020-06-02 15:04:40 +02:00
Guillaume Valadon 34fdc8c0cd Specify the coverage result file 2020-06-02 11:23:43 +02:00
Guillaume Valadon eff27ca00a Name the checkout steps 2020-04-25 20:18:25 +02:00
gpotter 8381a94187 Restore codecov on GHCI 2020-04-10 09:49:37 +02:00
gpotter2 6bebf259bc Run non root tests on Github CI 2020-03-24 21:34:51 +00:00
gpotter2 ffc8903689 Move some tests to Github Actions 2020-03-09 15:09:44 +00:00
Gabriel 0dd974e46b
Hide comments on github or template 2020-02-12 07:49:17 +01:00
Gabriel 0421f060b7
Hide comments 2020-02-10 21:38:29 +01:00