From 7ea0a0db32300cac63775501bd92bb884ef550c4 Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Thu, 16 Jun 2016 17:24:09 +0300 Subject: [PATCH] [tests] Run memory tests on travis Qt4 will run tests with libjemalloc.so. The Memory.Footprint and the Memory.Fragmentation will only run with libjemalloc.so because we have then a better control over the results. --- .travis.yml | 9 +++++---- Makefile | 12 ++++++++---- platform/qt/bitrise-qt4.yml | 2 +- platform/qt/bitrise-qt5.yml | 2 +- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 56f34a90b..ec3282cc0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ addons_shortcuts: addons_qt4: &qt4 apt: sources: [ 'ubuntu-toolchain-r-test' ] - packages: [ 'g++-5', 'gcc-5', + packages: [ 'g++-5', 'gcc-5', 'libjemalloc-dev', 'mesa-utils', 'qt4-default' ] addons_qt5: &qt5 apt: @@ -117,14 +117,15 @@ matrix: # Qt 4 - Release - os: linux - sudo: false + sudo: required + dist: trusty language: cpp compiler: "qt4-gcc5-release" env: BUILDTYPE=Release _CXX=g++-5 _CC=gcc-5 addons: *qt4 script: - make qt-app - - make test-qt + - LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so make test-qt-Memory.*:*.Load # Qt 5 - Release - os: linux @@ -137,7 +138,7 @@ matrix: script: - make qt-app - make qt-qml-app - - make test-valgrind-qt + - make test-valgrind-qt--*.Load cache: directories: diff --git a/Makefile b/Makefile index 1e4ece105..b3dd7c7d9 100644 --- a/Makefile +++ b/Makefile @@ -253,9 +253,11 @@ qt-app: $(QT_MAKEFILE) qt-qml-app: $(QT_MAKEFILE) $(QT_ENV) $(MAKE) -j$(JOBS) -C $(QT_OUTPUT_PATH) qt-qml-app -test-qt: $(QT_MAKEFILE) node_modules +test-qt-%: $(QT_MAKEFILE) node_modules $(QT_ENV) $(MAKE) -j$(JOBS) -C $(QT_OUTPUT_PATH) test - $(GDB) $(QT_OUTPUT_PATH)/$(BUILDTYPE)/test --gtest_catch_exceptions=0 --gtest_filter=* + $(GDB) $(QT_OUTPUT_PATH)/$(BUILDTYPE)/test --gtest_catch_exceptions=0 --gtest_filter=$* + +test-qt: test-qt-* run-qt-app: qt-app cd $(QT_OUTPUT_PATH)/$(BUILDTYPE) && ./qmapboxgl @@ -263,10 +265,12 @@ run-qt-app: qt-app run-qt-qml-app: qt-qml-app cd $(QT_OUTPUT_PATH)/$(BUILDTYPE) && ./qquickmapboxgl -test-valgrind-qt: $(QT_MAKEFILE) node_modules +test-valgrind-qt-%: $(QT_MAKEFILE) node_modules $(QT_ENV) $(MAKE) -j$(JOBS) -C $(QT_OUTPUT_PATH) test .mason/mason install valgrind latest - ./scripts/valgrind.sh $(QT_OUTPUT_PATH)/$(BUILDTYPE)/test --gtest_catch_exceptions=0 --gtest_filter=-*.Load + ./scripts/valgrind.sh $(QT_OUTPUT_PATH)/$(BUILDTYPE)/test --gtest_catch_exceptions=0 --gtest_filter=$* + +test-valgrind-qt: test-valgrind-qt-* run-valgrind-qt-app: qt-app .mason/mason install valgrind latest diff --git a/platform/qt/bitrise-qt4.yml b/platform/qt/bitrise-qt4.yml index 24e0f4493..aeff150ee 100644 --- a/platform/qt/bitrise-qt4.yml +++ b/platform/qt/bitrise-qt4.yml @@ -34,7 +34,7 @@ workflows: brew linkapps qt export BUILDTYPE=Debug make qt-app - make test-qt + make test-qt-* - is_debug: 'yes' - slack: title: Post to Slack diff --git a/platform/qt/bitrise-qt5.yml b/platform/qt/bitrise-qt5.yml index 18fa44dd2..a612263e4 100644 --- a/platform/qt/bitrise-qt5.yml +++ b/platform/qt/bitrise-qt5.yml @@ -35,7 +35,7 @@ workflows: export BUILDTYPE=Debug make qt-app make qt-qml-app - make test-qt + make test-qt-* - is_debug: 'yes' - slack: title: Post to Slack