From 37a293243932cb3b2021ef91377c70e610dd5fc5 Mon Sep 17 00:00:00 2001
From: Howard Li <bighorn@pursuitofchallenge.com>
Date: 周日, 19 4月 2020 12:09:28 +0800
Subject: [PATCH] Refactor SCPI_RegSet and SCPI_CoreCls

---
 .travis.yml |   32 +++++++++++++++++++++++++++++---
 1 files changed, 29 insertions(+), 3 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 254e25c..91f71a4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,11 +1,37 @@
+language: c
 addons:
   apt:
     packages:
     - libcunit1-dev
+    - clang
     - gcc-multilib
 
-sudo: false
+sudo: true
+
+before_install:
+  - pip install --user cpp-coveralls
+
+before_script:
+  - wget http://downloads.sourceforge.net/project/cunit/CUnit/2.1-3/CUnit-2.1-3.tar.bz2 -O /tmp/cunit.tar.bz2
+  - tar -xvf /tmp/cunit.tar.bz2
+  - mv CUnit-2.1-3 CUnit
+  - cd CUnit
+  - CFLAGS="-m32" LDFLAGS="-m32" ./bootstrap
+  - make
+  - export LD_LIBRARY_PATH=$PWD/CUnit/Sources/.libs/:$LD_LIBRARY_PATH
+  - cd ..
 
 script:
-    - make test
-    - CFLAGS="-m32" LDFLAGS="-m32" make clean test
+  - make
+  - CC=clang CFLAGS="-g -O0 -fsanitize=address" LDFLAGS="-g -fsanitize=address" make clean test
+  - CC=clang CFLAGS="-g -O0 -fsanitize=address -DUSE_DEVICE_DEPENDENT_ERROR_INFORMATION=0" LDFLAGS="-g -fsanitize=address" make clean test
+  - CC=clang CFLAGS="-g -O0 -fsanitize=address -DUSE_MEMORY_ALLOCATION_FREE=0" LDFLAGS="-g -fsanitize=address" make clean test
+  - CFLAGS="-m32" LDFLAGS="-m32 -L$PWD/CUnit/CUnit/Sources/.libs/" make clean test
+  - CFLAGS="-m32 -std=c89" LDFLAGS="-m32 -L$PWD/CUnit/CUnit/Sources/.libs/" make clean test
+  - CFLAGS="-m32 -std=c90" LDFLAGS="-m32 -L$PWD/CUnit/CUnit/Sources/.libs/" make clean test
+  - CFLAGS="-m32 -std=c99" LDFLAGS="-m32 -L$PWD/CUnit/CUnit/Sources/.libs/" make clean test
+  - CFLAGS="-m32 -std=gnu99" LDFLAGS="-m32 -L$PWD/CUnit/CUnit/Sources/.libs/" make clean test
+  - LDFLAGS="-lgcov" CFLAGS="-fprofile-arcs -ftest-coverage" make clean all test
+
+after_success:
+  - coveralls -b libscpi/ -e libscpi/test -e examples -e CUnit -e libscpi/obj/shared --gcov-options '\-lp'

--
Gitblit v1.9.1