Comments (12)
Just to clarify, this happens on master (commit 944eb59) but not on the latest release 5.2
.
from entr.
I partially addressed this in commit 7cbfb78
Run system tests using bash if /bin/sh does not have ksh features
The real change is that the old unit tests no longer exist, so make test
runs the system tests which are much more rigorous. This will add a lot of dependencies to your docker image, so you probably don't want to run this as part of your build.
from entr.
Thanks, that fixes the original issue with the curly braces. Are there any other dependencies that are missing to run the system tests like above, other than vim
and tmux
?
I tried the commands below, but it fails:
build_oci_img() {
docker build "$@" - <<EOF
FROM debian:10
RUN DEBIAN_FRONTEND=noninteractive apt-get \
-o DPkg::options::="--force-confdef" \
-o DPkg::options::="--force-confold" \
update -y && \
DEBIAN_FRONTEND=noninteractive apt-get \
-o DPkg::options::="--force-confdef" \
-o DPkg::options::="--force-confold" \
install --no-install-recommends -y \
make git ca-certificates gcc build-essential vim tmux
RUN git clone https://github.com/eradman/entr/
WORKDIR entr
RUN ./configure && make test
EOF
}
build_oci_img
docker run --rm --interactive --tty "$(build_oci_img -q)"
I get:
...
Step 5/5 : RUN ./configure && make test
---> Running in 6e0e1345e194
cp Makefile.linux Makefile
cc -D_GNU_SOURCE -D_LINUX_PORT -Imissing -DRELEASE=\"5.3\" missing/strlcpy.c missing/kqueue_inotify.c entr.c -o entr
./system_test.sh
........
FAIL: exec a command using one-shot option
'1' != '0'
make: *** [Makefile.bsd:9: test] Error 1
The command '/bin/sh -c ./configure && make test' returned a non-zero code: 2
from entr.
It doesn't look like you're missing any dependencies.
Do the tests complete outside of Docker?
from entr.
No, I get this error:
./system_test.sh
.....can't find window: 0
.can't find window: 0
.can't find window: 0
FAIL: spacebar triggers utility
'waiting' != 'finished'
make: *** [Makefile.bsd:9: test] Error 1
from entr.
I couldn't reproduce this failure on an Ubuntu 11 VM. @infokiller are you running on amd64 or another platform?
from entr.
Yes, amd64. Do you mean Debian 11?
Does that reproduce with docker?
Using docker is likely more reliable/reproducible than a VM with an arbitrary image, so it's better to use it
from entr.
Also, I use Archlinux as the host system
from entr.
To improve reproducibility, I also pinned the image digest and commit hash so that we you the exact same one. It's still not 100% reproducible because (the packages fetched are not pinned), but it's highly unlikely you won't be able to reproduce it this way:
build_oci_img() {
docker build "$@" - <<EOF
FROM debian@sha256:f21a32253b030826c59cd71de36996e2fd6d820d47f40a6fc1b30d64db677837
RUN DEBIAN_FRONTEND=noninteractive apt-get \
-o DPkg::options::="--force-confdef" \
-o DPkg::options::="--force-confold" \
update -y && \
DEBIAN_FRONTEND=noninteractive apt-get \
-o DPkg::options::="--force-confdef" \
-o DPkg::options::="--force-confold" \
install --no-install-recommends -y \
make git ca-certificates gcc build-essential vim tmux
RUN git clone https://github.com/eradman/entr
WORKDIR entr
RUN git checkout -q 7cbfb78 && ./configure && make test
EOF
}
build_oci_img
docker run --rm --interactive --tty "$(build_oci_img -q)"
Output:
./system_test.sh
........
FAIL: exec a command using one-shot option
'1' != '0'
make: *** [Makefile.bsd:9: test] Error 1
The command '/bin/sh -c ./configure && make test' returned a non-zero code: 2
from entr.
Do you mean Debian 11?
Yes Debian 11
The Docker image revealed some missing dependencies: also install the procps and file packages (I'll add a check for the pgrep
and file
commands)
We need another line to configure git in the image
git config --global user.email "[email protected]"
The rest of the failures appear in docker build
, but not docker run
:
alpine:~$ docker run --rm --interactive --tty 90c01cbe20e0
root@e9ae70c0b907:/entr# ./system_test.sh
..................s...................................................................
42 tests PASSED
from entr.
Thanks, confirmed this works. For reference, here's the full script for testing:
build_oci_img() {
docker build "$@" - <<EOF
FROM debian@sha256:f21a32253b030826c59cd71de36996e2fd6d820d47f40a6fc1b30d64db677837
RUN DEBIAN_FRONTEND=noninteractive apt-get \
-o DPkg::options::="--force-confdef" \
-o DPkg::options::="--force-confold" \
update -y && \
DEBIAN_FRONTEND=noninteractive apt-get \
-o DPkg::options::="--force-confdef" \
-o DPkg::options::="--force-confold" \
install --no-install-recommends -y \
make git ca-certificates gcc build-essential vim tmux file procps
RUN git config --global user.email "[email protected]"
RUN git clone https://github.com/eradman/entr
WORKDIR entr
RUN git checkout -q 7cbfb78
EOF
}
build_oci_img
docker run --rm --interactive --tty "$(build_oci_img -q)" bash -c './configure && make test'
from entr.
Thanks @infokiller. Added the extra requirements in commit 8b00bce
from entr.
Related Issues (20)
- entr is running twice HOT 5
- Tests are failing on archlinux HOT 3
- Minor doc proposal: A sentence to be explicit about some uses of '-s' HOT 2
- Error when running make install ../data.h: No such file or directory HOT 4
- File changes not detected in a certain condition HOT 5
- How to deal with user input? HOT 8
- `-r` option seems to force reboot on MacOS HOT 6
- entr: No regular files to watch in ruby HOT 8
- Alternatives to SIGTERM with -r HOT 11
- Use strlcpy with >=glibc-2.38 HOT 9
- Missing entr command on website HOT 1
- Ability to kill the process after a timeout if it fails to stop gracefully HOT 7
- `/_` marker and quotes. HOT 2
- doesn't this force the RLIMIT_NOFILES to be exactly 65536? HOT 11
- Feature request: provide a way to debounce triggers HOT 8
- fatal error: sys/sysctl.h: No such file or directory HOT 3
- `entr` apparently don't work when called from a Makefile task HOT 3
- Only the first event is handled when using entr to watch the script that runs entr HOT 9
- $0 isn't populated on macOS when using -s HOT 5
- Git tags are not signed HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from entr.