Merge pull request #578 from inikep/dev
decompression: --rm is silent when input is stdin
This commit is contained in:
commit
a5cbc02ed1
@ -4,7 +4,7 @@ dist: trusty
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
# other feature branches => short tests
|
||||
# Ubuntu 14.04
|
||||
- env: Cmd="make libc6install && make -C tests test32"
|
||||
- env: Cmd='make valgrindinstall arminstall ppcinstall arm-ppc-compilation && make clean lib && CFLAGS="-O1 -g" make -C zlibWrapper valgrindTest && make -C tests valgrindTest'
|
||||
|
||||
@ -25,10 +25,11 @@ script:
|
||||
# cron & master => full tests, as this is the final step towards a Release
|
||||
# pull requests => normal tests (job numbers 1-3)
|
||||
# other feature branches => short tests (job numbers 1-2)
|
||||
- echo JOB_NUMBER=$JOB_NUMBER TRAVIS_BRANCH=$TRAVIS_BRANCH TRAVIS_EVENT_TYPE=$TRAVIS_EVENT_TYPE TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST
|
||||
- if [ "$TRAVIS_EVENT_TYPE" = "cron" ] || [ "$TRAVIS_BRANCH" = "master" ]; then
|
||||
FUZZERTEST=-T7mn sh -c "$Cmd" || travis_terminate 1;
|
||||
else
|
||||
if [ "$TRAVIS_PULL_REQUEST" == "true" ] && [ $JOB_NUMBER -lt 4 ]; then
|
||||
if [ "$TRAVIS_EVENT_TYPE" = "pull_request" ] && [ $JOB_NUMBER -lt 4 ]; then
|
||||
sh -c "$Cmd" || travis_terminate 1;
|
||||
else
|
||||
if [ $JOB_NUMBER -lt 3 ]; then
|
||||
|
@ -954,7 +954,7 @@ static int FIO_decompressSrcFile(dRess_t ress, const char* dstFileName, const ch
|
||||
|
||||
/* Close file */
|
||||
if (fclose(srcFile)) EXM_THROW(33, "zstd: %s close error", srcFileName); /* error should never happen */
|
||||
if (g_removeSrcFile) { if (remove(srcFileName)) EXM_THROW(34, "zstd: %s: %s", srcFileName, strerror(errno)); };
|
||||
if (g_removeSrcFile /* --rm */ && strcmp(srcFileName, stdinmark)) { if (remove(srcFileName)) EXM_THROW(34, "zstd: %s: %s", srcFileName, strerror(errno)); };
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,10 @@ VOID = /dev/null
|
||||
export PATH := .:$(PATH)
|
||||
|
||||
.PHONY: all
|
||||
all: test-gzip-env test-helin-segv test-hufts test-keep test-list test-memcpy-abuse test-mixed test-null-suffix-clobber test-stdin test-trailing-nul test-unpack-invalid test-zdiff test-zgrep-context test-zgrep-f test-zgrep-signal test-znew-k test-z-suffix
|
||||
#all: test-gzip-env
|
||||
all: test-helin-segv test-hufts test-keep test-list test-memcpy-abuse test-mixed
|
||||
all: test-null-suffix-clobber test-stdin test-trailing-nul test-unpack-invalid
|
||||
all: test-zdiff test-zgrep-context test-zgrep-f test-zgrep-signal test-znew-k test-z-suffix
|
||||
@echo Testing completed
|
||||
|
||||
.PHONY: zstd
|
||||
@ -35,7 +38,7 @@ clean:
|
||||
ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU FreeBSD DragonFly NetBSD))
|
||||
|
||||
test-%: zstd
|
||||
@./test-driver.sh --test-name $* --log-file $*.log --trs-file $*.trs --expect-failure "no" --color-tests "yes" --enable-hard-errors "yes" ./$*.sh
|
||||
@./test-driver.sh --test-name $* --log-file $*.log --trs-file $*.trs --expect-failure "no" --color-tests "yes" --enable-hard-errors "yes" ./$*.sh
|
||||
# || echo ignoring error
|
||||
|
||||
endif
|
||||
|
@ -17,13 +17,10 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# limit so don't run it by default.
|
||||
|
||||
echo XXX=$PATH
|
||||
gzip --version
|
||||
|
||||
. "${srcdir=.}/init.sh"; path_prepend_ .
|
||||
|
||||
echo XXX=$PATH
|
||||
gzip --version
|
||||
#echo PATH=$PATH
|
||||
#gzip --version
|
||||
|
||||
echo a >exp || framework_failure_
|
||||
gzip <exp >in || framework_failure_
|
||||
|
Loading…
Reference in New Issue
Block a user