[v4,7/7] example: instrum: add travis test

Message ID 1517911222-3896-8-git-send-email-odpbot@yandex.ru
State New
Headers show
Series
  • Code instrumentation with PAPI library
Related show

Commit Message

Github ODP bot Feb. 6, 2018, 10 a.m.
From: Bogdan Pricope <bogdan.pricope@linaro.org>


Add test to validate ODP build with papi library.

Signed-off-by: Bogdan Pricope <bogdan.pricope@linaro.org>

---
/** Email created from pull request 443 (bogdanPricope:master_benchmark_pr)
 ** https://github.com/Linaro/odp/pull/443
 ** Patch: https://github.com/Linaro/odp/pull/443.patch
 ** Base sha: 27a7923236030fed0272cc9072f0cde62496e91d
 ** Merge commit sha: 34bd4730244cef8aa4ef2778135e469012c66768
 **/
 .travis.yml | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

Patch

diff --git a/.travis.yml b/.travis.yml
index e36c7bcb2..4a60f077a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -240,6 +240,17 @@  install:
             EXTRA_CONF="$EXTRA_CONF --with-netmap-path=`pwd`/netmap"
           fi
 
+#      PAPI library
+        - |
+          if [ -z "$CROSS_ARCH" -a ! -f "$HOME/papi-install/lib/libpapi.so" ]; then
+            git -c advice.detachedHead=false clone -q --depth=1 --single-branch --branch=papi-5-6-0-t https://bitbucket.org/icl/papi.git
+            pushd papi/src
+            ./configure --prefix=$HOME/papi-install
+            make
+            make install
+            popd
+          fi
+
 script:
         - ./bootstrap
         - ./configure --prefix=$HOME/odp-install
@@ -425,6 +436,17 @@  jobs:
                           - echo ${TRAVIS_COMMIT_RANGE};
                           - ODP_PATCHES=`echo ${TRAVIS_COMMIT_RANGE} | sed 's/\.//'`;
                           - ./scripts/ci-checkpatches.sh ${ODP_PATCHES};
+                - stage: test
+                  env: TEST=code_instrum
+                  compiler: gcc
+                  script:
+                          - ./bootstrap
+                          - ./configure --prefix=$HOME/odp-papi-install --enable-test-cpp --enable-test-vald --enable-test-helper --enable-test-perf --enable-user-guides --enable-test-perf-proc --enable-test-example --with-cunit-path=$HOME/cunit-install/$CROSS_ARCH --enable-code-instrum PAPI_CFLAGS="-I$HOME/papi-install/include" PAPI_LIBS="-L$HOME/papi-install/lib -lpapi"
+                          - make -j $(nproc)
+                          - make install
+                          - sudo $HOME/papi-install/bin/papi_avail
+                          - mkdir $HOME/store
+                          - sudo LD_LIBRARY_PATH="/usr/local/lib:$HOME/odp-papi-install/lib:$HOME/papi-install/lib:$LD_LIBRARY_PATH" ODP_INSTRUM_STORE_DIR=$HOME/store LD_PRELOAD=libinstrum.so.0.0.0 $HOME/odp-papi-install/bin/odp_generator -I lo --srcmac a0:36:9f:28:e2:57 --dstmac 00:0f:fe:c5:73:66 --srcip 192.168.150.1 --dstip 192.168.150.2 -m u -n 200
         allow_failures:
           - canfail: yes