release mode test for Linux with test (#1560)

* release mode test for Linux with test

* Fix GCC warning when building in Release configuration

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
This commit is contained in:
Victor Vazquez 2021-02-01 21:43:40 -08:00 committed by GitHub
parent 75255c2247
commit c6b919ac2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 10 deletions

View File

@ -87,6 +87,13 @@ jobs:
# Make coverage report to avoid running the test exe because CI step will run it
CODE_COVERAGE_COLLECT_ONLY: 1
BuildArgs: '-j 10'
Linux_x64_with_unit_test_release:
Pool: $(LinuxPool)
OSVmImage:
VcpkgInstall: 'curl[ssl] libxml2 openssl'
VCPKG_DEFAULT_TRIPLET: 'x64-linux'
CmakeArgs: ' -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON'
BuildArgs: '-j 10'
Win_x86_with_unit_test:
Pool: $(WindowsPool)
OSVmImage:

View File

@ -424,9 +424,13 @@ DateTime::operator std::chrono::system_clock::time_point() const
DateTime DateTime::Parse(std::string const& dateTime, DateFormat format)
{
int16_t year;
int8_t month;
int8_t day;
// The values that are not supposed to be read before they are written are set to -123... to avoid
// warnings on some compilers, yet provide a clearly bad value to make it obvious if things don't
// work as expected.
int16_t year = -12345;
int8_t month = -123;
int8_t day = -123;
int8_t hour = 0;
int8_t minute = 0;
int8_t second = 0;
@ -739,13 +743,17 @@ std::string DateTime::GetString(DateFormat format, TimeFractionFormat fractionFo
}
int16_t year = 1;
int8_t month;
int8_t day;
int8_t hour;
int8_t minute;
int8_t second;
int32_t fracSec;
int8_t dayOfWeek;
// The values that are not supposed to be read before they are written are set to -123... to avoid
// warnings on some compilers, yet provide a clearly bad value to make it obvious if things don't
// work as expected.
int8_t month = -123;
int8_t day = -123;
int8_t hour = -123;
int8_t minute = -123;
int8_t second = -123;
int32_t fracSec = -1234567890;
int8_t dayOfWeek = -123;
{
auto remainder = time_since_epoch().count();