Skip to content

Commit 67fcbcd

Browse files
committed
updates for new release
1 parent 6c1a5d0 commit 67fcbcd

File tree

6 files changed

+45
-46
lines changed

6 files changed

+45
-46
lines changed

.c9build.sh

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,11 @@ $GTEST_ROOT/build/sample10_unittest --gtest_output=xml:sample10.xml
4343
rm -f coverage.xml
4444
gcovr --root ./ --filter ".*/samples/.*" --exclude ".*_unittest.*" -x -o coverage.xml
4545

46-
# Push content
47-
48-
## Requires TESTSPACE_TOKEN = $ACCESS_TOKEN:@samples.testspace.com.
46+
# Download and configure the Testspace client
47+
mkdir -p $HOME/bin
48+
curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | tar -zxvf- -C $HOME/bin
49+
CI=true testspace config url samples.testspace.com
50+
testspace -v
4951

50-
BRANCH_NAME=`git symbolic-ref --short HEAD`
51-
GIT_URL=`git remote show origin -n | grep Fetch\ URL: | sed 's/.*URL: //'`
52-
REPO_SLUG=`echo ${GIT_URL#*github.com?} | sed 's/.git//'`
53-
54-
curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
55-
testspace @.testspace.txt $TESTSPACE_TOKEN/${REPO_SLUG/\//:}/${BRANCH_NAME}#c9.Build
52+
# Push content
53+
testspace build.log{lint} [Tests]sample*.xml coverage.xml "#c9.Build" --repo git

.testspace.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

.travis.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ env:
66
- GTEST_ROOT=$TRAVIS_BUILD_DIR/googletest-release-1.8.0/googletest
77

88
before_install:
9-
- sudo pip install gcovr
10-
11-
install:
9+
- mkdir -p $HOME/bin
10+
- curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | tar -zxvf- -C $HOME/bin
11+
- testspace config url samples.testspace.com
12+
- testspace -v
13+
- pip install --user gcovr
1214
- wget https://github.com/google/googletest/archive/release-1.8.0.zip
1315
- unzip release-1.8.0.zip
1416
- mkdir -p $GTEST_ROOT/build
17+
18+
install:
1519
- pushd $GTEST_ROOT/build
1620
- cmake -Dgtest_build_samples=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS_DEBUG='-g -fprofile-arcs -ftest-coverage' ../
1721
- make clean gtest
@@ -33,5 +37,4 @@ script:
3337

3438
# Requires TESTSPACE_TOKEN environment variable.
3539
after_script:
36-
- curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
37-
- testspace @.testspace.txt $TESTSPACE_TOKEN/${TRAVIS_REPO_SLUG/\//:}/${TRAVIS_BRANCH}#travis.Build.${TRAVIS_BUILD_NUMBER}
40+
- testspace build.log{lint} [Tests]sample*.xml coverage.xml

README.md

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
[![Testspace](http://www.testspace.com/img/Testspace.png)](http://www.testspace.com)
1+
[![Testspace](https://www.testspace.com/img/Testspace.png)](https://www.testspace.com)
22

33
***
44

55
## C++/Google Test sample for demonstrating Testspace
66

77
Sample demonstrates techniques for using Testspace with C++ code and the [Google Test framework](https://code.google.com/p/googletest).
8+
* Using a Testspace Project that is `connected` with this GitHub Repo
9+
* Using 3 Online CI services for demonstration purposes only
10+
* Can review the Results at [testspace-samples:cpp.cpputest](https://samples.testspace.com/projects/testspace-samples:cpp.googletest)
11+
* Refer to our [Getting Started](https://help.testspace.com/getting-started) help articles for more information
812

913
***
1014
Using Multiple Online CI Services:
@@ -15,13 +19,20 @@ Using Multiple Online CI Services:
1519

1620

1721
***
18-
Publishing **Test Content** using www.testspace.com.
22+
Publishing Results using www.testspace.com.
1923

2024
[![Space Health](https://samples.testspace.com/spaces/827/badge)](https://samples.testspace.com/spaces/827 "Test Cases")
2125
[![Space Metric](https://samples.testspace.com/spaces/827/metrics/819/badge)](https://samples.testspace.com/spaces/827/schema/Code%20Coverage "Code Coverage (lines)")
2226
[![Space Metric](https://samples.testspace.com/spaces/827/metrics/817/badge)](https://samples.testspace.com/spaces/827/schema/Static%20Analysis "Static Analysis (issues)")
2327

2428
***
29+
Download and configure the Testspace client
30+
31+
<pre>
32+
mkdir -p $HOME/bin
33+
curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | tar -zxvf- -C $HOME/bin
34+
testspace config url samples.testspace.com
35+
</pre>
2536

2637
Build Examples provided by the Google Test framework:
2738

@@ -40,21 +51,8 @@ $GTEST_ROOT/build/sample10_unittest --gtest_output=xml:sample10.xml
4051
gcovr --root ../ --filter ".*/samples/.*" --exclude ".*_unittest.*" -x -o coverage.xml
4152
</pre>
4253

43-
Push Content using **Testspace client**:
54+
Push Content using Testspace client
4455

4556
<pre>
46-
curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
47-
testspace @.testspace.txt $TESTSPACE_TOKEN/$GITHUB_ORG:$REPO_NAME/$BRANCH_NAME#$BUILD_NUMBER
57+
testspace build.log{lint} [Tests]sample*.xml coverage.xml
4858
</pre>
49-
50-
Checkout the published [Test Content](https://samples.testspace.com/projects/testspace-samples:cpp.googletest). Note that the `.testspace.txt` file contains the [set of files](http://help.testspace.com/how-to:publish-content#publishing-via-content-list-file) to publish.
51-
52-
***
53-
54-
To replicate this sample:
55-
- Setup account at www.testspace.com.
56-
- Create a Environment variable called `TESTSPACE_TOKEN`
57-
- `TESTSPACE_TOKEN` = `[email protected]`
58-
- `credentials` set to `username:password` or your [access token](http://help.testspace.com/reference:client-reference#login-credentials)
59-
- To [use Testspace with a CI system](http://help.testspace.com/how-to:add-to-ci-workflow), store `TESTSPACE_TOKEN` as a secure environment variable
60-

circle.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
machine:
2+
services:
3+
docker
24
environment:
35
GTEST_ROOT: $HOME/$CIRCLE_PROJECT_REPONAME/googletest-release-1.8.0/googletest
46

57
dependencies:
68
pre:
7-
- sudo pip install gcovr
9+
- curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | tar -zxvf- -C $HOME/bin
10+
- testspace config url samples.testspace.com
11+
- testspace -v
12+
- pip install gcovr
813
- wget https://github.com/google/googletest/archive/release-1.8.0.zip
914
- unzip release-1.8.0.zip
1015
override:
@@ -25,8 +30,5 @@ test:
2530
- $GTEST_ROOT/build/sample10_unittest --gtest_output=xml:sample10.xml
2631
- gcovr --root ./ --filter ".*/samples/.*" --exclude ".*_unittest.*" -x -o coverage.xml
2732

28-
# Requires TESTSPACE_TOKEN environment variable.
2933
post:
30-
- curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
31-
- testspace @.testspace.txt $TESTSPACE_TOKEN/${CIRCLE_PROJECT_USERNAME}:${CIRCLE_PROJECT_REPONAME}/${CIRCLE_BRANCH}#circle.Build.${CIRCLE_BUILD_NUM}
32-
34+
- testspace build.log{lint} [Tests]sample*.xml coverage.xml

shippable.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@ language: c
22

33
env:
44
global:
5-
- secure: xxO0PG/lrVC3pGyqHtQrz3mbPudfoko49OSE99UJ0NgKuPjfnEQygB1CDqV8KXlpjZemVeMwo2Feyw4lNnbDuPNPKsMGSNqPBtruWNKFfeOOcnMRvheWhE4/uvklrRcph+DBJhK4Kr3nZ9zldmyxXH2UdmYeoqsjhY8WVVOKJ91eFRjKDWtsuxBjPH1mTl6qAaBXl+JQapHB82AOfFKZ6fsUNoo2m3oa59ziKgctN/uwGKuY9Wyb1KcBCIi7/8Uax3v7GKSCJHZrCPfQLzXsFM10WvZgCn8caRHd04mBsw+diwwfKUt8JdfeDwRTi9C5kV0e04hcbIjnx6qeuU4w4g==
65
- GTEST_ROOT=$SHIPPABLE_BUILD_DIR/googletest-release-1.8.0/googletest
76

87
build:
98
ci:
9+
- mkdir -p $HOME/bin
10+
- curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | tar -zxvf- -C $HOME/bin
11+
- testspace config url samples.testspace.com
12+
- testspace -v
1013
- sudo apt-get update
1114
- sudo apt-get install cmake
12-
- sudo pip install gcovr
15+
- pip install gcovr
1316
- wget https://github.com/google/googletest/archive/release-1.8.0.zip
1417
- unzip release-1.8.0.zip
1518

@@ -32,11 +35,9 @@ build:
3235
- $GTEST_ROOT/build/sample10_unittest --gtest_output=xml:sample10.xml
3336
- gcovr --root ./ --filter ".*/samples/.*" --exclude ".*_unittest.*" -x -o coverage.xml
3437

35-
# Requires TESTSPACE_TOKEN environment variable.
3638
on_success:
37-
- curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
38-
- testspace @.testspace.txt $TESTSPACE_TOKEN/${SHIPPABLE_REPO_SLUG/\//:}/${BRANCH}#ship.Build.${BUILD_NUMBER}
39+
- testspace build.log{lint} [Tests]sample*.xml coverage.xml
3940

4041
on_failure:
41-
- curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
42-
- testspace @.testspace.txt $TESTSPACE_TOKEN/${SHIPPABLE_REPO_SLUG/\//:}/${BRANCH}#ship.Build.${BUILD_NUMBER}
42+
- testspace build.log{lint} [Tests]sample*.xml coverage.xml
43+

0 commit comments

Comments
 (0)