Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sharness docker #4489

Merged
merged 3 commits into from
Dec 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Dockerfile.fast
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ RUN set -x \
&& cd /tmp \
&& wget -q -O tini https://github.com/krallin/tini/releases/download/$TINI_VERSION/tini \
&& chmod +x tini \
# Install them
&& mv su-exec/su-exec tini /sbin/
&& mv su-exec/su-exec tini /sbin/ # Install them

# Ports for Swarm TCP, Swarm uTP, API, Gateway, Swarm Websockets
EXPOSE 4001
Expand Down
6 changes: 5 additions & 1 deletion test/ipfs-test-lib.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Generic test functions for go-ipfs

ansi_strip() {
sed 's/\x1b\[[0-9;]*m//g'
}

# Quote arguments for sh eval
shellquote() {
_space=''
Expand Down Expand Up @@ -48,7 +52,7 @@ test_path_cmp() {

# This takes a Dockerfile, and a build context directory
docker_build() {
docker build --rm -f "$1" "$2"
docker build --rm -f "$1" "$2" | ansi_strip
}

# This takes an image as argument and writes a docker ID on stdout
Expand Down
2 changes: 2 additions & 0 deletions test/sharness/lib/test-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ SHARNESS_LIB="lib/sharness/sharness.sh"
# Make sure the ipfs path is set, also set in test_init_ipfs but that
# is not always used.
export IPFS_PATH="$(pwd)/.ipfs"
# Ask programs to please not print ANSI codes
export TERM=dumb

TEST_OS="$(uname -s | tr '[a-z]' '[A-Z]')"

Expand Down