Commit Graph

5986 Commits

Author SHA1 Message Date
Lzu Tao
d79df2a370 Apply new InstallSymlink script 2018-12-01 23:18:59 +07:00
Lzu Tao
ef2e761937 Helper script to install symlink in meson 2018-12-01 23:18:59 +07:00
Lzu Tao
3175188407 No need these helpers 2018-12-01 23:18:59 +07:00
Lzu Tao
0a25b13aae Init CI test for meson build
Do not use ccache: Build error in gcc-8
2018-12-01 23:18:59 +07:00
Lzu Tao
337f914dc8 Fix lib soversion and no install cover.h header 2018-12-01 23:18:59 +07:00
Lzu Tao
c9f0144302 Fix meson tests build 2018-12-01 23:18:59 +07:00
Lzu Tao
5a36a57cf5 Bump to 1.3.8 and fix run_command function
The run_command is run from an unspecified directory. Therefore we cannot assume
which directory it is running our command.
2018-12-01 23:18:59 +07:00
Lzu Tao
8a160680d1 Update legacy support to 5 2018-12-01 23:18:59 +07:00
Lzu Tao
f727808731 Minor fix for meson build
Use files function instead of constructing path with meson.current_source_dir()
2018-12-01 23:18:59 +07:00
Yann Collet
386c9ab58a
Merge pull request #1433 from obelisk/fixed_buck
Small changes for buck build
2018-11-30 11:21:09 -08:00
Mitchell Grenier
a424899637 Fix buck for lib 2018-11-30 13:45:16 +00:00
Yann Collet
090bc808a8
Merge pull request #1432 from terrelln/regression
[regression] Add initial regression test framework
2018-11-29 16:06:40 -08:00
Nick Terrell
4aaa36f74b [regression] Add initial regression test framework
The regression tests run nightly or on the `regression`
branch for convenience. The results get uploaded as the
artifacts of the job. If they change, check the diff
printed in the job. If all is well, download the new
results and commit them to the repo.

This code will only run on a UNIX like platform. It
could be made to run on Windows, but I don't think that
it is necessary. It also uses C99.

* data: This module defines the data to run tests on.
  It downloads data from a URL into a cache directory,
  checks it against a checksum, and unpacks it. It also
  provides helpers for accessing the data.
* config: This module defines the configs to run tests
  with. A config is a set of API parameters and a set of
  CLI flags.
* result: This module is a helper for method that defines
  the result type.
* method: This module defines the compression methods
  to test. It is what runs the regression test using the
  data and the config. It reports the total compressed
  size, or an error/skip.
* test: This is the test binary that runs the tests for
  every (data, config, method) tuple, and prints the
  results to the output file and stderr.
* results.csv: The results that the current commit is
  expected to produce.
2018-11-29 14:33:04 -08:00
Yann Collet
f6591e4a04
Merge pull request #1430 from lzutao/fix-zstdgrep
Fix  #1428 - zstdgrep now returns 1 on unmatch
2018-11-28 14:07:40 -08:00
Lzu Tao
d095adf9fb Add simple test for zstdgrep 2018-11-29 03:39:47 +07:00
Lzu Tao
3d18b4764d Prevent globbing on non-quoting variable 2018-11-29 03:04:40 +07:00
Lzu Tao
c046e0b626 Fix #1428 - zstdgrep now returns 1 on unmatch 2018-11-29 02:45:01 +07:00
Yann Collet
0da2f1a582
Merge pull request #1429 from denis2342/dev
fixed a typo
2018-11-28 08:45:46 -08:00
Denis Ahrens
71b8ee1bf1 fixed a typo 2018-11-28 04:51:16 +01:00
Yann Collet
74f8a5c51d
Merge pull request #1426 from lzutao/upgrade-mesonbuild
Update meson build system
2018-11-27 10:55:41 -08:00
Lzu Tao
9a721e5216 Update meson build system
NOTE: This commit only tested on Linux (Ubuntu 18.04). Windows
build may not work as expected.

* Use meson >= 0.47.0 cause we use install_man function
* Add three helper Python script:
  * CopyFile.py: To copy file
  * CreateSymlink.py: To make symlink (both Windows and Unix)
  * GetZstdLibraryVersion.py: Parse lib/zstd.h to get zstd version
  These help emulating equivalent functions in CMake and Makefile.
* Use subdir from meson to split meson.build
  * Add contrib build
  * Fix other build
* Add new build options
  * build_programs: Enable programs build
  * build_contrib: Enable contrib build
  * build_tests: Enable tests build
  * use_static_runtime: Link to static run-time libraries on MSVC
  * zlib_support: Enable zlib support
  * lzma_support: Enable lzma support
2018-11-28 01:08:34 +07:00
Lzu Tao
9bd8f6a00c Rename and update build instruction in README file to README.md 2018-11-28 01:08:34 +07:00
Lzu Tao
2abd5139a5 Add meson build guide 2018-11-28 01:08:34 +07:00
Yann Collet
64569a184e
Merge pull request #1419 from ryandesign/universal
Fix feature detection with multiple -arch flags
2018-11-26 17:37:19 -08:00
Nick Terrell
787532b91a
Merge pull request #1418 from ryandesign/cpuid-i386
Fix i386 build failure "Junk character 13"
2018-11-16 11:01:46 -08:00
Ryan Schmidt
46d470c20c Fix feature detection with multiple -arch flags
When multiple -arch flags are used, the compiler invokes itself once for
each architecture. Apparently, input on stdin is consumed by the
compilation of the first arch and is no longer available to the
compilation of the second arch, which results in a build failure and the
potentially incorrect determination that a feature is not available. So
write the feature detection source to a file instead of using stdin.
2018-11-16 03:49:15 -06:00
Ryan Schmidt
ef4df0df4a Fix i386 build failure "Junk character 13" 2018-11-16 02:16:21 -06:00
Nick Terrell
f15f1bfefb
Merge pull request #1416 from terrelln/rsync
- Factor out LDM's hash function for reuse
- Add rsyncable mode to zstdmt and expose it via the advanced API
- Fix `-B`/`--block-size` to actually set the job size
- Add rsyncable tests to `zstreamtest` and `playTests.sh`

Tested by:

```
> cat A.100MB B.100MB C.100MB D.100MB E.100MB | zstd --rsyncable -fo src/file.zst
/*stdin*\            : 48.22%   (524288000 => 252837782 bytes, src/file.zst)
> rsync -rc --stats src devbigvm:/data/users/terrelln/rsync-test
Total bytes sent: 252868779
total size is 252837782  speedup is 1.00
> echo test > test
> cat test A.100MB test B.100MB test C.100MB test D.100MB test E.100MB | zstd --rsyncable -fo src/file.zst
/*stdin*\            : 48.23%   (524288025 => 252838025 bytes, src/unicorn.tar.zst)
> rsync -rc --stats src devbigvm:/data/users/terrelln/rsync-test
Total bytes sent: 4605696
total size is 252838025  speedup is 53.60
```

Close #1155.
2018-11-14 18:43:12 -08:00
Nick Terrell
71fe78cbf9 [tests] Add rsyncable tests 2018-11-14 17:00:29 -08:00
Nick Terrell
4316409427 [cli] Set the job size 2018-11-14 17:00:29 -08:00
Nick Terrell
f9a671ac37 [cli] Add rsyncable 2018-11-14 17:00:16 -08:00
Nick Terrell
b9693d3a49 [lib] Add rsyncable mode
- Add rsyncable mode to multithreaded mode
- Factor out LDM's hash function for reuse
2018-11-14 16:59:57 -08:00
Yann Collet
c584e84e68
Merge pull request #1415 from facebook/benchfn
Separating benchfn and benchzstd
2018-11-14 13:00:08 -08:00
Yann Collet
975abf8f5d circumvent gcc-8 strict aliasing warning
because gcc considers that
`void* const *`  and `void**` are 2 different types ...
2018-11-13 16:04:35 -08:00
Yann Collet
768a264200 Merge branch 'dev' of github.com:facebook/zstd into dev 2018-11-13 15:56:36 -08:00
Yann Collet
092c4abd4c bumped version number to v1.3.8 2018-11-13 15:53:38 -08:00
Yann Collet
3ba0d6dd27 fixed decode-only test condition 2018-11-13 14:15:12 -08:00
Yann Collet
a29e3d1d01 fix debug trace 2018-11-13 13:27:22 -08:00
Yann Collet
e4abd28769 fixed VS2010+ build script 2018-11-13 13:22:16 -08:00
Yann Collet
f15312e884 fixed cmake build script 2018-11-13 13:16:41 -08:00
Yann Collet
b830ccca5c changed benchfn api
to use structure for function parameters
as it expresses much clearer than a long list of parameters,
since each parameter can now be named.
2018-11-13 13:12:50 -08:00
Yann Collet
9867cdb847 benchfn can provided faulty return value
with BMK_extract_returnValue()
2018-11-13 12:01:17 -08:00
Yann Collet
d38063f8ae separated bench module into benchfn and benchzstd
it shall be possible to use benchfn
without any dependency on zstd.
2018-11-13 11:01:59 -08:00
Yann Collet
f28af025d9
Merge pull request #1413 from felixhandte/attach-dict-fix-unsigned-compare
Fix #1412: Perform Signed Comparison When Setting Attach Dict Param
2018-11-12 17:53:11 -08:00
Yann Collet
626040ab53 changed PREFETCH() macro into PREFETCH_L2()
which is more accurate
2018-11-12 17:05:32 -08:00
W. Felix Handte
5faef4d378 Const 2018-11-12 14:48:42 -08:00
W. Felix Handte
2242330b26 Fix Fuzz Range 2018-11-12 13:01:14 -08:00
W. Felix Handte
2d9332eb21 Fix Types 2018-11-12 12:52:31 -08:00
W. Felix Handte
4127de5fa6 Switch Enum to Only Non-Negative Values, Update Comments 2018-11-12 12:47:47 -08:00
W. Felix Handte
596f7d1256 Fix #1412: Perform Signed Comparison When Setting Attach Dict Param 2018-11-12 12:07:57 -08:00