Skip to content

Commit

Permalink
Remove "test" script, use Makefile instead
Browse files Browse the repository at this point in the history
We also drop some unused scripts:

- clean-branches
- vagrant-test
  • Loading branch information
jlaine committed Nov 1, 2023
1 parent 66b3a66 commit 445b223
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 268 deletions.
17 changes: 3 additions & 14 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,7 @@ jobs:
scripts/build
- name: Test
run: |
. scripts/activate.sh ffmpeg-${{ matrix.config.ffmpeg }}
python -m av --version # Assert it can import.
scripts/test
run: make test

- name: Docs
if: matrix.config.extras
Expand All @@ -101,19 +98,11 @@ jobs:
if: matrix.config.extras
run: |
. scripts/activate.sh ffmpeg-${{ matrix.config.ffmpeg }}
scripts/test doctest
make -C docs test
- name: Examples
if: matrix.config.extras
run: |
. scripts/activate.sh ffmpeg-${{ matrix.config.ffmpeg }}
scripts/test examples
- name: Source Distribution
if: matrix.config.extras
run: |
. scripts/activate.sh ffmpeg-${{ matrix.config.ffmpeg }}
scripts/test sdist
run: make test-examples

windows:
name: "py-${{ matrix.config.python }} lib-${{ matrix.config.ffmpeg }} ${{matrix.config.os}}"
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
# Testing.
*.spyderproject
.idea
/.vagrant
/sandbox
/tests/assets
/tests/samples
57 changes: 10 additions & 47 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,21 @@ PYAV_PYTHON ?= python
PYTHON := $(PYAV_PYTHON)


.PHONY: default build cythonize clean clean-all info lint test fate-suite test-assets docs
.PHONY: default build clean docs fate-suite lint test test-examples

default: build


build:
CFLAGS=$(CFLAGS) LDFLAGS=$(LDFLAGS) $(PYTHON) setup.py build_ext --inplace --debug

cythonize:
$(PYTHON) setup.py cythonize



wheel: build-mingw32
$(PYTHON) setup.py bdist_wheel

build-mingw32:
# before running, set PKG_CONFIG_PATH to the pkgconfig dir of the ffmpeg build.
# set PKG_CONFIG_PATH=D:\dev\3rd\media-autobuild_suite\local32\bin-video\ffmpegSHARED\lib\pkgconfig
CFLAGS=$(CFLAGS) LDFLAGS=$(LDFLAGS) $(PYTHON) setup.py build_ext --inplace -c mingw32
mv *.pyd av


clean:
- find av -name '*.so' -delete
- rm -rf build
- rm -rf sandbox
- rm -rf src
- rm -rf tmp
- make -C docs clean

fate-suite:
# Grab ALL of the samples from the ffmpeg site.
Expand All @@ -41,15 +33,8 @@ lint:
test:
$(PYTHON) setup.py test



vagrant:
vagrant box list | grep -q precise32 || vagrant box add precise32 http://files.vagrantup.com/precise32.box

vtest:
vagrant ssh -c /vagrant/scripts/vagrant-test


test-examples:
scripts/test-examples

tmp/ffmpeg-git:
@ mkdir -p tmp/ffmpeg-git
Expand All @@ -67,25 +52,3 @@ docs: tmp/tagfile.xml

deploy-docs: docs
./docs/upload docs




clean-build:
- rm -rf build
- find av -name '*.so' -delete

clean-sandbox:
- rm -rf sandbox/201*
- rm sandbox/last

clean-src:
- rm -rf src

clean-docs:
- rm tmp/Doxyfile
- rm tmp/tagfile.xml
- make -C docs clean

clean: clean-build clean-sandbox clean-src
clean-all: clean-build clean-sandbox clean-src clean-docs
33 changes: 0 additions & 33 deletions scripts/build-debug-python

This file was deleted.

120 changes: 0 additions & 120 deletions scripts/clean-branches

This file was deleted.

46 changes: 0 additions & 46 deletions scripts/test

This file was deleted.

18 changes: 18 additions & 0 deletions scripts/test-examples
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

# Exit as soon as something errors.
set -e

PYAV_ROOT=$PWD

for name in $(find examples -name '*.py'); do
echo
echo === $name
cd "$PYAV_ROOT"
mkdir -p "sandbox/$1"
cd "sandbox/$1"
if ! python "$PYAV_ROOT/$name"; then
echo FAILED $name with code $?
exit $?
fi
done
7 changes: 0 additions & 7 deletions scripts/vagrant-test

This file was deleted.

0 comments on commit 445b223

Please sign in to comment.