Skip to content

Commit

Permalink
Add travis ci support
Browse files Browse the repository at this point in the history
Add .travis.yml to support travis ci auto build & test.

Remove the user input demands in the test/test_all.sh to avoid
blocking the test in failure case.

Add build status indicator in README.md.

Track this change in ChangeLog.
  • Loading branch information
Gang Wei committed Oct 17, 2016
1 parent ae322d5 commit 1cfb9e2
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 2 deletions.
43 changes: 43 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
language: cpp
compiler:
- gcc

# This is a lie: we don't need sudo but this is required to get an
# Ubuntu image with a libc that isn't ancient, and with cmocka libs.
sudo: required
dist: trusty

addons:
apt:
packages:
- autoconf-archive
- libcmocka0
- libcmocka-dev
- openssl
- libssl-dev
- libcurl4-openssl-dev

install:
- wget http://downloads.sourceforge.net/project/ibmswtpm2/ibmtpm532.tar
- mkdir ibmtpm532 && pushd ibmtpm532 && tar xzf ../ibmtpm532.tar && pushd ./src && make
- ./tpm_server &
- popd && popd
- git clone https://github.com/01org/TPM2.0-TSS.git
- pushd TPM2.0-TSS && ./bootstrap && CONFIG_SITE=./lib/default_config.site ./configure && make -j$(nproc) && sudo make install && popd
- sudo ldconfig /usr/local/lib
- resourcemgr -sim -tpmhost 127.0.0.1 &

before_script:
- ./bootstrap

script:
- mkdir ./build
- pushd ./build
- ../configure --enable-unit
- make -j$(nproc)
- make -j$(nproc) check
- sudo make install
- popd
- pushd ./test
- ./test_all.sh
- popd
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Unreleased
Added
* travis ci support.
* Allow for unit tests to be enabled selectively.
* tpm2_rc_decode tool: Decode TPM_RC error codes.
* Android Make file
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![Build Status](https://travis-ci.org/01org/tpm2.0-tools.svg?branch=master)](https://travis-ci.org/01org/tpm2.0-tools)

**This site contains the code for the TPM (Trusted Platform Module) 2.0 tools based on TPM2.0-TSS**

Below is the name list of the implemented tools:
Expand Down
4 changes: 2 additions & 2 deletions test/test_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ $1
sleep 1
echo "$1 pass" >>test_all_pass.log
else
echo -e "\033[31m $1 Fail, press any key to continue.... \033[0m"
echo -e "\033[31m $1 Fail \033[0m"
echo "$1 fail" >>test_all_fail.log
read
sleep 1
fi
}

Expand Down

0 comments on commit 1cfb9e2

Please sign in to comment.