Commit Graph

5709 Commits

Author SHA1 Message Date
Robin Mills
74bc0e0535 Changes for cross-platform getopt 2018-09-01 20:19:45 +02:00
Hombre
a226d6a650 Fixing typo in cmakefiles and removing REGEX dependencie for Cygwin 2018-08-31 08:31:20 +02:00
Hombre
28da26f174 Adding MINGW32 toolchain support 2018-08-31 08:31:20 +02:00
D4N
7812043b7d
Merge pull request #419 from D4N/testsuite_api
Testsuite improvements
2018-08-30 22:50:06 +02:00
Dan Čermák
7d9ed33bde Initialize DataBuf with 0s => fix valgrind error 2018-08-30 16:26:56 +02:00
Dan Čermák
0f43d0f49d [Travis CI] Add new matrix entry: run test suite under Valgrind 2018-08-30 16:26:56 +02:00
Dan Čermák
ed28e15152 [testsuite] Add option to run all commands under valgrind 2018-08-30 16:26:56 +02:00
Dan Čermák
c7a3a57aff [testsuite] Port redmine issue #1137 (requires stdin passing) 2018-08-30 16:26:56 +02:00
Dan Čermák
992877bb39 [testsuite] Implement the supplying of stdin to commands 2018-08-30 16:26:56 +02:00
Dan Čermák
872e158173 [testsuite] Port redmine issue 1043
This test used shell wildcards, which we work around by creating the
list of files to process manually.
2018-08-30 16:26:56 +02:00
Dan Čermák
bf43cbbccc [testsuite] Set env var TZ in redmine issue 1054 & remove skip
The manual export TZ=UTC in run.sh is thereby no longer needed
2018-08-30 16:26:27 +02:00
Dan Čermák
9cfcfb98a2 [testsuite] Add feature to set environment variables 2018-08-30 12:33:31 +02:00
Dan Čermák
116f5fe5bd [testsuite] Port redmine issue 1074 using the binary output feature 2018-08-30 12:33:31 +02:00
Dan Čermák
4f8c150582 [testsuite] Added binary output checking to the test suite 2018-08-30 12:33:16 +02:00
Dan Čermák
bf50b582cb [testsuite] Improve PEP8 compliance 2018-08-27 23:28:11 +02:00
Dan Čermák
deb9c23df8 [testsuite] Add option to run tests from a single file only 2018-08-27 23:28:03 +02:00
Luis Diaz Mas
27aa3ddc67 Add new codecov yml file to filter the XMKSDK folder out 2018-08-27 19:26:56 +02:00
D4N
102a0f316c
Merge pull request #417 from Exiv2/safe_abs
Add overflow safe abs and enable UBSAN on travis
2018-08-27 18:08:33 +02:00
Dan Čermák
7d7bbec517 [Travis CI] Add gcc 8 to the build for UBSAN 2018-08-27 17:22:33 +02:00
Dan Čermák
da7239cf74 [Travis CI] Enable sanitizers for gcc & OSX builds 2018-08-27 17:22:33 +02:00
Dan Čermák
10929cec7a [CMake] Add EXIV2_TEAM_USE_SANITIZERS option
Setting this option enables address sanitizer and undefined behavior
sanitizer, when available for the given compiler & platform.
It does not currently check whether the architecture is supported,
as CMake does not offer an easy way how to check it. Since we are
mostly developing for x86 & amd64 this is not a huge problem and it's
also a developer only setting.
2018-08-27 17:22:33 +02:00
Dan Čermák
9f1a5a1ebb [futils] Change signature of getEnv to take an int
While taking an EnVar as the parameter is more clear it has the
disadvantage, that passing anything outside of the range of the
enumeration is undefined behavior. The compiler could then optimize
the range check in getEnv away (perfectly legal due to UB), leading
to buffer overreads.
2018-08-27 17:22:33 +02:00
Dan Čermák
e705f1ef5b Add unit test for floatToRationalCast 2018-08-27 17:21:16 +02:00
Dan Čermák
11df43be78 [types] Apply Safe::abs() in floatToRationalCast & gcd
Also check for infinity in floatToRationalCast as depending on the
compiler special values of floats are converted to either
LONGMAX/LONGMIN or +/-inf
2018-08-27 17:21:16 +02:00
Dan Čermák
2dacb19933 [safe_op] Add Safe::abs(), calculates absoulte value without UB
Add a drop-in replacement for std::abs which never produces
negative values and thereby never invokes undefined behavior.
2018-08-27 17:21:16 +02:00
Luis Diaz Mas
8b47a8efc1 Include timegh.h in file which needs it 2018-08-27 13:33:02 +02:00
Luis Diaz Mas
a9c9451588 Remove localtime.c and any other trick to handle timegm 2018-08-27 13:33:02 +02:00
Luis Diaz Mas
eb306fdbae Substitute malloc/free with new/delete 2018-08-27 13:24:47 +02:00
Luis Diaz Mas
08cbb0c206 Use header guards instead of pragma once 2018-08-27 13:24:47 +02:00
Luis Diaz Mas
669ab49c43 New tests for Uri class 2018-08-27 13:24:47 +02:00
Luis Diaz Mas
ca290d870f New tests for base64 encode & decode 2018-08-27 13:24:47 +02:00
Luis Diaz Mas
5d76036af5 Add more tests for decoding and encoding URL functions 2018-08-27 13:24:47 +02:00
Luis Diaz Mas
eefee8125b to_hex and from_hex removed from API 2018-08-27 13:24:47 +02:00
Luis Diaz Mas
22d9ab82a7 Format futils.h for better readability (also pass clang-format to it) 2018-08-27 13:24:47 +02:00
Luis Diaz Mas
c82d875707 Use pragma once instead of guards 2018-08-27 13:24:47 +02:00
Luis Diaz Mas
a3c200a23e Remove useless header inclusions 2018-08-27 13:24:47 +02:00
Luis Diaz Mas
41499b8ecd Use snprintf instead of sprintf in TimeValue::copy
- Replaced assert by enforce
2018-08-27 13:02:56 +02:00
Luis Díaz Más
1128d8926a Appveyor: Run CI with VS 2015 and 2017.
In order to achieve this objective the following actions were taken:
- Do not use the Ninja Generator, since it is more difficult to choose
  VS toolset to be used.
- Use arch x64 for conan and the CMake Generators (by default)
- Do not create profiles dir manually
- Detect new default conan profile automatically
- Remove clcache from appveyor since it does not integrate well with VS generators
- VS2013 removed from the matrix since some integration tests fail there.
2018-08-26 19:00:45 +02:00
Luis Diaz Mas
0bc6fbcea7 Add stdexcept header in unit test files 2018-08-26 15:46:47 +02:00
Luis Diaz Mas
d96b619515 Add braces for the main functions in the new source files at samples 2018-08-26 09:23:08 +02:00
Luis Diaz Mas
7d8edbe781 Remove more dead code 2018-08-26 09:23:08 +02:00
Luis Diaz Mas
00502eabdd Move mrwthumb to samples 2018-08-26 09:23:08 +02:00
Luis Diaz Mas
e9a6597a48 Move xmpdump to samples 2018-08-26 09:23:08 +02:00
Luis Diaz Mas
ac51fda7b5 Move crwparse to samples 2018-08-26 09:23:08 +02:00
Luis Diaz Mas
32b618b1c7 Move crwedit from exiv2lib to samples 2018-08-26 09:23:08 +02:00
Luis Diaz Mas
f9b2784055 Remove utiltest.cpp that is not compiled 2018-08-26 09:23:08 +02:00
Luis Diaz Mas
ad004498a2 Cleanup 'comparison between signed & unsigned integer' warning 2018-08-24 16:45:52 +02:00
Luis Diaz Mas
00f86a8df4 Cleanup unused variable warnings 2018-08-24 16:45:52 +02:00
Luis Diaz Mas
6e244f31d3 Cleanup fallthrough warning + clang-format parseCommonTargets function 2018-08-24 16:45:52 +02:00
Luis Diaz Mas
0d9065274e Remove redefinition of UNUSED 2018-08-24 16:45:52 +02:00