-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #212 from DrylandEcology/bugfix_211
Better compilation and use in rSOILWAT2 we have three documented and suppressed/ignored problems: - memory leak (use of a suppression file): #205 - compile warning #208: treating c input as c++ - compile warning #214: variable array length
- Loading branch information
Showing
36 changed files
with
1,139 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Suppression of memory leaks | ||
# https://github.com/google/sanitizers/wiki/AddressSanitizerLeakSanitizer#suppressions | ||
|
||
# These are known leaks that await fixing | ||
|
||
# https://github.com/DrylandEcology/SOILWAT2/issues/205 | ||
leak:SW_VPD_construct |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,44 @@ | ||
language: cpp | ||
|
||
# We want to run the `*_severe` debug and test targets; thus, we need | ||
# to enable ptrace capability for (L/A)SAN which is currently not possible | ||
# with container-based builds on travis-ci | ||
# TODO: revert to `sudo: false` once the following are fixed/made possible | ||
# - https://github.com/google/sanitizers/issues/764 | ||
# - https://github.com/travis-ci/travis-ci/issues/9033 | ||
sudo: required | ||
|
||
matrix: | ||
fast_finish: true | ||
|
||
# We want to run the `*_severe` debug and test targets; thus, we need | ||
# g++ >= 4.9 and clang++ >= 3.5 | ||
compiler: | ||
- clang | ||
- gcc | ||
|
||
addons: | ||
apt: | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
packages: | ||
- gcc-4.9 | ||
- g++-4.9 | ||
|
||
before_install: | ||
- if [[ $CXX = g++ ]]; then export CXX="g++-4.9" CC="gcc-4.9"; fi | ||
|
||
script: | ||
- export CPPFLAGS=-DSWDEBUG && make cleaner bint_run | ||
- make cleaner cov test_run | ||
# compile and run optimized binary | ||
- make clean bin bint_run | ||
# compile and run debug binary | ||
- make clean bin_debug_severe bint_run | ||
# compile and run (severe) unit tests | ||
- ASAN_OPTIONS=detect_leaks=1 LSAN_OPTIONS=suppressions=.LSAN_suppr.txt make clean test_severe test_run | ||
# determine code coverage of unit tests | ||
- make clean cov test_run | ||
|
||
after_success: | ||
- bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports" | ||
- make cleaner | ||
# clean up | ||
- make clean |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,18 @@ | ||
#ifndef SW_FLOW_H | ||
#define SW_FLOW_H | ||
|
||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
void SW_FLW_construct(void); | ||
void SW_FLW_deconstruct(void); | ||
void SW_Water_Flow(void); | ||
|
||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.