mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-12-31 11:51:49 +00:00
Use system sed on macOS
This requires fewer developer customizations to work on macOS. Requires some GNU workarounds.
This commit is contained in:
parent
511d223468
commit
1f1f824da7
@ -46,9 +46,8 @@ matrix:
|
||||
before_install:
|
||||
- HOMEBREW_NO_AUTO_UPDATE=1 brew tap caskroom/cask
|
||||
- HOMEBREW_NO_AUTO_UPDATE=1 brew cask install osxfuse
|
||||
- HOMEBREW_NO_AUTO_UPDATE=1 brew install awscli cppcheck gnu-sed truncate
|
||||
- HOMEBREW_NO_AUTO_UPDATE=1 brew install awscli cppcheck truncate
|
||||
- if [ -f /Library/Filesystems/osxfusefs.fs/Support/load_osxfusefs ]; then sudo chmod +s /Library/Filesystems/osxfusefs.fs/Support/load_osxfusefs ; elif [ -f /Library/Filesystems/osxfuse.fs/Contents/Resources/load_osxfuse ]; then sudo chmod +s /Library/Filesystems/osxfuse.fs/Contents/Resources/load_osxfuse ; fi
|
||||
- sudo ln -s /usr/local/opt/gnu-sed/bin/gsed /usr/local/bin/sed
|
||||
- sudo ln -s /usr/local/opt/coreutils/bin/gstdbuf /usr/local/bin/stdbuf
|
||||
script:
|
||||
- ./autogen.sh
|
||||
|
@ -187,7 +187,7 @@ function start_s3fs {
|
||||
-o dbglevel=${DBGLEVEL:=info} \
|
||||
-o retries=3 \
|
||||
-f \
|
||||
"${@}" | stdbuf -oL -eL sed -u "s/^/s3fs: /" &
|
||||
"${@}" | stdbuf -oL -eL sed $SED_BUFFER_FLAG "s/^/s3fs: /" &
|
||||
)
|
||||
|
||||
if [ `uname` = "Darwin" ]; then
|
||||
|
@ -537,7 +537,7 @@ function test_concurrency {
|
||||
for i in `seq 10`; do echo foo > $i; done
|
||||
for process in `seq 2`; do
|
||||
for i in `seq 100`; do
|
||||
file=$(ls | sed -n "$(($RANDOM % 10 + 1)){p;q}")
|
||||
file=$(ls | sed -n "$(($RANDOM % 10 + 1))p")
|
||||
cat $file >/dev/null || true
|
||||
rm -f $file
|
||||
echo foo > $i || true
|
||||
|
@ -14,6 +14,12 @@ BIG_FILE=big-file-s3fs.txt
|
||||
BIG_FILE_LENGTH=$((25 * 1024 * 1024))
|
||||
export RUN_DIR
|
||||
|
||||
if [ `uname` = "Darwin" ]; then
|
||||
export SED_BUFFER_FLAG="-l"
|
||||
else
|
||||
export SED_BUFFER_FLAG="--unbuffered"
|
||||
fi
|
||||
|
||||
function mk_test_file {
|
||||
if [ $# == 0 ]; then
|
||||
TEXT=$TEST_TEXT
|
||||
|
Loading…
Reference in New Issue
Block a user