mirror of
https://github.com/facebook/zstd.git
synced 2025-10-10 00:03:36 -04:00
Merge pull request #1263 from facebook/travisTest
Fix Makefile on Linux and ZSTD_NOBENCH
This commit is contained in:
commit
df09d4318f
32
.travis.yml
32
.travis.yml
@ -10,33 +10,34 @@ addons:
|
|||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
# Ubuntu 14.04
|
# Ubuntu 14.04
|
||||||
- env: Cmd='make gcc6install && CC=gcc-6 make -j all && make clean && CC=gcc-6 make clean uasan-test-zstd </dev/null' # also test when stdin is not a tty
|
- env: Cmd='make test'
|
||||||
|
|
||||||
|
- env: Cmd='make gcc6install && CC=gcc-6 make -j all
|
||||||
|
&& make clean && CC=gcc-6 make clean uasan-test-zstd </dev/null' # also test when stdin is not a tty
|
||||||
- env: Cmd='make gcc6install libc6install && CC=gcc-6 make clean uasan-test-zstd32'
|
- env: Cmd='make gcc6install libc6install && CC=gcc-6 make clean uasan-test-zstd32'
|
||||||
- env: Cmd='make gcc7install && CC=gcc-7 make clean uasan-test-zstd'
|
- env: Cmd='make gcc7install && CC=gcc-7 make clean uasan-test-zstd'
|
||||||
- env: Cmd='make clang38install && CC=clang-3.8 make clean msan-test-zstd'
|
- env: Cmd='make clang38install && CC=clang-3.8 make clean msan-test-zstd'
|
||||||
|
|
||||||
- env: Cmd='make gcc6install && CC=gcc-6 make clean uasan-fuzztest'
|
- env: Cmd='make gcc6install && CC=gcc-6 make clean uasan-fuzztest'
|
||||||
- env: Cmd='make gcc6install libc6install && CC=gcc-6 CFLAGS=-m32 make clean uasan-fuzztest'
|
- env: Cmd='make gcc6install libc6install
|
||||||
|
&& make clean && CC=gcc-6 CFLAGS=-m32 make uasan-fuzztest'
|
||||||
- env: Cmd='make clang38install && CC=clang-3.8 make clean msan-fuzztest'
|
- env: Cmd='make clang38install && CC=clang-3.8 make clean msan-fuzztest'
|
||||||
- env: Cmd='make clang38install && CC=clang-3.8 make clean tsan-test-zstream'
|
- env: Cmd='make clang38install && CC=clang-3.8 make clean tsan-test-zstream'
|
||||||
|
|
||||||
- env: Cmd='make -C tests test-fuzzer-stackmode'
|
|
||||||
|
|
||||||
- env: Cmd='make valgrindinstall && make -C tests clean valgrindTest'
|
|
||||||
|
|
||||||
- env: Cmd='make arminstall && make armfuzz'
|
- env: Cmd='make arminstall && make armfuzz'
|
||||||
|
- env: Cmd='make arminstall && make aarch64fuzz'
|
||||||
# Following test is disabled, as there is a bug in Travis' ld
|
|
||||||
# preventing aarch64 compilation to complete.
|
|
||||||
# > collect2: error: ld terminated with signal 11 [Segmentation fault], core dumped
|
|
||||||
# to be re-enabled in a few commit, as it's possible that a random code change circumvent the ld bug
|
|
||||||
# - env: Cmd='make arminstall && make aarch64fuzz'
|
|
||||||
|
|
||||||
- env: Cmd='make ppcinstall && make ppcfuzz'
|
- env: Cmd='make ppcinstall && make ppcfuzz'
|
||||||
- env: Cmd='make ppcinstall && make ppc64fuzz'
|
- env: Cmd='make ppcinstall && make ppc64fuzz'
|
||||||
- env: Cmd='make -j uasanregressiontest && make clean && make -j msanregressiontest'
|
|
||||||
|
|
||||||
- env: Cmd='make lz4install && make -C tests test-lz4 test-pool && make clean && bash tests/libzstd_partial_builds.sh'
|
- env: Cmd='make -j uasanregressiontest
|
||||||
|
&& make clean && make -j msanregressiontest'
|
||||||
|
|
||||||
|
- env: Cmd='make valgrindinstall && make -C tests clean valgrindTest
|
||||||
|
&& make clean && make -C tests test-fuzzer-stackmode'
|
||||||
|
|
||||||
|
- env: Cmd='make lz4install && make -C tests test-lz4
|
||||||
|
&& make clean && make -C tests test-pool
|
||||||
|
&& make clean && bash tests/libzstd_partial_builds.sh'
|
||||||
|
|
||||||
# tag-specific test
|
# tag-specific test
|
||||||
- if: tag =~ ^v[0-9]\.[0-9]
|
- if: tag =~ ^v[0-9]\.[0-9]
|
||||||
@ -49,6 +50,7 @@ branches:
|
|||||||
only:
|
only:
|
||||||
- dev
|
- dev
|
||||||
- master
|
- master
|
||||||
|
- travisTest
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- JOB_NUMBER=$(echo $TRAVIS_JOB_NUMBER | sed -e 's:[0-9][0-9]*\.\(.*\):\1:')
|
- JOB_NUMBER=$(echo $TRAVIS_JOB_NUMBER | sed -e 's:[0-9][0-9]*\.\(.*\):\1:')
|
||||||
|
3
Makefile
3
Makefile
@ -63,8 +63,9 @@ zlibwrapper:
|
|||||||
$(MAKE) -C $(ZWRAPDIR) test
|
$(MAKE) -C $(ZWRAPDIR) test
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
|
test: MOREFLAGS += -g -DDEBUGLEVEL=1 -Werror
|
||||||
test:
|
test:
|
||||||
MOREFLAGS+="-g -DDEBUGLEVEL=1 -Werror" $(MAKE) -C $(PRGDIR) allVariants
|
MOREFLAGS="$(MOREFLAGS)" $(MAKE) -j -C $(PRGDIR) allVariants
|
||||||
$(MAKE) -C $(TESTDIR) $@
|
$(MAKE) -C $(TESTDIR) $@
|
||||||
|
|
||||||
.PHONY: shortest
|
.PHONY: shortest
|
||||||
|
@ -406,7 +406,6 @@ int main(int argCount, const char* argv[])
|
|||||||
singleThread = 0,
|
singleThread = 0,
|
||||||
ultra=0;
|
ultra=0;
|
||||||
double compressibility = 0.5;
|
double compressibility = 0.5;
|
||||||
BMK_advancedParams_t adv = BMK_initAdvancedParams();
|
|
||||||
unsigned bench_nbSeconds = 3; /* would be better if this value was synchronized from bench */
|
unsigned bench_nbSeconds = 3; /* would be better if this value was synchronized from bench */
|
||||||
size_t blockSize = 0;
|
size_t blockSize = 0;
|
||||||
zstd_operation_mode operation = zom_compress;
|
zstd_operation_mode operation = zom_compress;
|
||||||
@ -434,6 +433,9 @@ int main(int argCount, const char* argv[])
|
|||||||
ZDICT_cover_params_t coverParams = defaultCoverParams();
|
ZDICT_cover_params_t coverParams = defaultCoverParams();
|
||||||
int cover = 1;
|
int cover = 1;
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef ZSTD_NOBENCH
|
||||||
|
BMK_advancedParams_t benchParams = BMK_initAdvancedParams();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* init */
|
/* init */
|
||||||
@ -620,7 +622,7 @@ int main(int argCount, const char* argv[])
|
|||||||
/* Decoding */
|
/* Decoding */
|
||||||
case 'd':
|
case 'd':
|
||||||
#ifndef ZSTD_NOBENCH
|
#ifndef ZSTD_NOBENCH
|
||||||
adv.mode = BMK_decodeOnly;
|
benchParams.mode = BMK_decodeOnly;
|
||||||
if (operation==zom_bench) { argument++; break; } /* benchmark decode (hidden option) */
|
if (operation==zom_bench) { argument++; break; } /* benchmark decode (hidden option) */
|
||||||
#endif
|
#endif
|
||||||
operation=zom_decompress; argument++; break;
|
operation=zom_decompress; argument++; break;
|
||||||
@ -713,7 +715,7 @@ int main(int argCount, const char* argv[])
|
|||||||
case 'p': argument++;
|
case 'p': argument++;
|
||||||
#ifndef ZSTD_NOBENCH
|
#ifndef ZSTD_NOBENCH
|
||||||
if ((*argument>='0') && (*argument<='9')) {
|
if ((*argument>='0') && (*argument<='9')) {
|
||||||
adv.additionalParam = (int)readU32FromChar(&argument);
|
benchParams.additionalParam = (int)readU32FromChar(&argument);
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
main_pause=1;
|
main_pause=1;
|
||||||
@ -826,18 +828,18 @@ int main(int argCount, const char* argv[])
|
|||||||
/* Check if benchmark is selected */
|
/* Check if benchmark is selected */
|
||||||
if (operation==zom_bench) {
|
if (operation==zom_bench) {
|
||||||
#ifndef ZSTD_NOBENCH
|
#ifndef ZSTD_NOBENCH
|
||||||
adv.blockSize = blockSize;
|
benchParams.blockSize = blockSize;
|
||||||
adv.nbWorkers = nbWorkers;
|
benchParams.nbWorkers = nbWorkers;
|
||||||
adv.realTime = setRealTimePrio;
|
benchParams.realTime = setRealTimePrio;
|
||||||
adv.nbSeconds = bench_nbSeconds;
|
benchParams.nbSeconds = bench_nbSeconds;
|
||||||
adv.ldmFlag = ldmFlag;
|
benchParams.ldmFlag = ldmFlag;
|
||||||
adv.ldmMinMatch = g_ldmMinMatch;
|
benchParams.ldmMinMatch = g_ldmMinMatch;
|
||||||
adv.ldmHashLog = g_ldmHashLog;
|
benchParams.ldmHashLog = g_ldmHashLog;
|
||||||
if (g_ldmBucketSizeLog != LDM_PARAM_DEFAULT) {
|
if (g_ldmBucketSizeLog != LDM_PARAM_DEFAULT) {
|
||||||
adv.ldmBucketSizeLog = g_ldmBucketSizeLog;
|
benchParams.ldmBucketSizeLog = g_ldmBucketSizeLog;
|
||||||
}
|
}
|
||||||
if (g_ldmHashEveryLog != LDM_PARAM_DEFAULT) {
|
if (g_ldmHashEveryLog != LDM_PARAM_DEFAULT) {
|
||||||
adv.ldmHashEveryLog = g_ldmHashEveryLog;
|
benchParams.ldmHashEveryLog = g_ldmHashEveryLog;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cLevel > ZSTD_maxCLevel()) cLevel = ZSTD_maxCLevel();
|
if (cLevel > ZSTD_maxCLevel()) cLevel = ZSTD_maxCLevel();
|
||||||
@ -852,22 +854,22 @@ int main(int argCount, const char* argv[])
|
|||||||
int c;
|
int c;
|
||||||
DISPLAYLEVEL(2, "Benchmarking %s \n", filenameTable[i]);
|
DISPLAYLEVEL(2, "Benchmarking %s \n", filenameTable[i]);
|
||||||
for(c = cLevel; c <= cLevelLast; c++) {
|
for(c = cLevel; c <= cLevelLast; c++) {
|
||||||
BMK_benchFilesAdvanced(&filenameTable[i], 1, dictFileName, c, &compressionParams, g_displayLevel, &adv);
|
BMK_benchFilesAdvanced(&filenameTable[i], 1, dictFileName, c, &compressionParams, g_displayLevel, &benchParams);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for(; cLevel <= cLevelLast; cLevel++) {
|
for(; cLevel <= cLevelLast; cLevel++) {
|
||||||
BMK_benchFilesAdvanced(filenameTable, filenameIdx, dictFileName, cLevel, &compressionParams, g_displayLevel, &adv);
|
BMK_benchFilesAdvanced(filenameTable, filenameIdx, dictFileName, cLevel, &compressionParams, g_displayLevel, &benchParams);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for(; cLevel <= cLevelLast; cLevel++) {
|
for(; cLevel <= cLevelLast; cLevel++) {
|
||||||
BMK_syntheticTest(cLevel, compressibility, &compressionParams, g_displayLevel, &adv);
|
BMK_syntheticTest(cLevel, compressibility, &compressionParams, g_displayLevel, &benchParams);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
(void)bench_nbSeconds; (void)blockSize; (void)setRealTimePrio; (void)separateFiles;
|
(void)bench_nbSeconds; (void)blockSize; (void)setRealTimePrio; (void)separateFiles; (void)compressibility;
|
||||||
#endif
|
#endif
|
||||||
goto _end;
|
goto _end;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user