Skip to content

Commit f1d7545

Browse files
authored
Merge pull request #979 from scop/build/distcheck-fixes
build: distcheck fixes
2 parents 82ca8d9 + cc851c6 commit f1d7545

File tree

5 files changed

+18
-8
lines changed

5 files changed

+18
-8
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ jobs:
8383
--env CI=true
8484
--env DIST=${{matrix.dist}}
8585
--env BSD=${{matrix.bsd}}
86-
--env PYTESTFLAGS=--verbose
86+
--env PYTESTFLAGS="--verbose -p no:cacheprovider"
8787
--env NETWORK=$NETWORK
8888
${NETWORK:+--network $NETWORK}
8989
$(test $DIST = fedoradev && echo --security-opt seccomp=unconfined)

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,12 @@ you simply don't want to use one, you can install bash completion using the
3434
standard commands for GNU autotools packages:
3535

3636
```shell
37-
autoreconf -i # if not installing from prepared release tarball
37+
autoreconf -i # if not installing from prepared release tarball
3838
./configure
39-
make # GNU make required
40-
make check # optional, requires python3 with pytest >= 3.6, pexpect
41-
make install # as root
39+
make # GNU make required
40+
make check # optional
41+
make install # as root
42+
make installcheck # optional, requires python3 with pytest >= 3.6, pexpect
4243
```
4344

4445
These commands install the completions and helpers, as well as a

test/docker/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ autoreconf -i
1818
make -j
1919

2020
xvfb-run make distcheck \
21-
PYTESTFLAGS="${PYTESTFLAGS---verbose --numprocesses=auto --dist=loadfile}"
21+
PYTESTFLAGS="${PYTESTFLAGS---verbose -p no:cacheprovider --numprocesses=auto --dist=loadfile}"
2222
cp -p bash-completion-*.tar.* "$oldpwd/"

test/t/Makefile.am

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,8 +707,13 @@ all:
707707

708708
PYTEST = @PYTEST@
709709

710-
check-local:
710+
# Some tests require completions/ symlinks to be in place, which would be a
711+
# chore to achieve in the build dir with VPATH builds (well not the symlinks,
712+
# but the "main" files they target), e.g. "make distcheck". Therefore we test
713+
# the installed tree instead, which isn't a bad idea in the first place.
714+
installcheck-local:
711715
ABS_TOP_BUILDDIR="$(abs_top_builddir)" \
716+
BASH_COMPLETION_TEST_BASH_COMPLETION="$(DESTDIR)/$(pkgdatadir)/bash_completion" \
712717
$(PYTEST) $(PYTESTFLAGS) $(srcdir)
713718

714719
clean-local:

test/t/conftest.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,12 @@ def bash(request) -> pexpect.spawn:
273273
bash.expect_exact(PS1)
274274

275275
# Load bashrc and bash_completion
276+
bash_completion = os.environ.get(
277+
"BASH_COMPLETION_TEST_BASH_COMPLETION",
278+
"%s/../bash_completion" % testdir,
279+
)
276280
assert_bash_exec(bash, "source '%s/config/bashrc'" % testdir)
277-
assert_bash_exec(bash, "source '%s/../bash_completion'" % testdir)
281+
assert_bash_exec(bash, "source '%s'" % bash_completion)
278282

279283
# Use command name from marker if set, or grab from test filename
280284
cmd = None # type: Optional[str]

0 commit comments

Comments
 (0)