g3log/scripts/buildAndRunTests.sh
Kjell Hedström 86473c60e0 Gimesketvirtadien's time requested changes (#104)
* Added "removeSink" method and related functionality to LogWorker API

* Added a new API for plugging in custom Timestamp generator.

* Revert "Added "removeSink" method and related functionality to LogWorker API"

This reverts commit c9cee5d9a0.

* Dropping shared_ptr<Timestamp> in log messages and using regular vars

* Moving to standard timespec struct from custom Timestamp

* Wiring timespec timestamps with formating routine

* Falling back to clock_gettime

* Reverting g3 API changes

* Optimizing format string generation

* Removed _microseconds from LogMessage

* Implemented sec fractional format key

* Optimization of format string generation

* Adjusting comments

* Refining localtime_formatted by introducing two helper functions

* refactored and simplified code

* fixed up some commented away unit tests

* refactoring message specifics tests to it's own test

* Use gcc 4.9

* C++14 for Linux

* Update .travis.yml

* Update buildAndRunTests.sh

* lower case in `-std=c++14`

* -lrt flag for gcc

* Added support for high precision clock on Linux/gcc (already there now for OSX). Windows is still missing

* intermediate comments

* Clarified for some code readers the mysterious use of assert in an expression that is always true

* refactored + renamed functions and constants. Added unit test for retrieving fractional type

* committing changes previously fixed - finished unit testing for g3::internal::time::GetFractional(..)

* added unit test for fractional to string

* added missing unit tests for localtime_formatted

* fixed? nano / microsec functionality to timer

* test
2016-08-11 00:27:52 -06:00

54 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
set -ev
unzip -o 3rdParty/gtest/gtest-1.7.0.zip -d 3rdParty/gtest
#if [ "$CXX" = "g++" ]; then export CXX=g++-5; fi
#if [ "$CXX" = "clang++" ]; then export CXX=clang++-3.4; fi
#echo $TRAVIS_OS_NAME
#echo $CXX
mkdir -p build_travis
cd build_travis
# OSX: cmake -DCMAKE_CXX_FLAGS=-std=gnu++11 -DADD_G3LOG_UNIT_TEST=ON ..
cmake -DCMAKE_CXX_FLAGS=-std=c++14 -DADD_G3LOG_UNIT_TEST=ON ..
make -j
./test_concept_sink && \
./test_cpp_future_concepts && \
./test_dynamic_loaded_shared_lib | true && \
./test_filechange && \
./test_io && \
./test_sink && \
./test_message
#if [[ $CXX == *"g++"* ]]
#then
# echo "Testing with g++"
# cmake -DUSE_DYNAMIC_LOGGING_LEVELS=ON -DADD_G3LOG_UNIT_TEST=ON ..
# make -j
# ./test_concept_sink
# ./test_cpp_future_concepts
# ./test_dynamic_loaded_shared_lib
# ./test_filechange
# ./test_io
# ./test_sink
#else
#if [ "$CXX" = "clang++-3.4" ]
#then
# echo "Testing with Clang++"
# cmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS=-std=gnu++11 -DADD_G3LOG_UNIT_TEST=ON ..
# make -j
# ./test_concept_sink
# ./test_cpp_future_concepts
# ./test_dynamic_loaded_shared_lib
# ./test_filechange
# ./test_io
# ./test_sink
# fi