-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathJenkinsfile
43 lines (38 loc) · 1.13 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
node("build-node")
{
stage("Build Client")
{
echo 'Building Client..'
//if test_detail exists, remove test_detail
//sh '[ -f ClientProject/ClientProject/test_detail.xml] || rm ClientProject/ClientProject/test_detail.xml'
checkout scm
dir('ClientProject/ClientProject')
{
sh 'g++ ../../CognitiveVRAnalytics/CognitiveVRAnalytics/*.c* include/googletest/src/gtest-all.cc ClientProject.cpp stdafx.cpp -std=c++11 -I ../../CognitiveVRAnalytics/CognitiveVRAnalytics -I include/curl -I include/googletest -I include/googletest/include -I include/googletest/internal/custom -lcurl -lpthread'
}
echo 'gcc build client'
}
stage("Test")
{
echo 'Testing..'
dir('ClientProject/ClientProject')
{
//sh 'whoami'
sh './a.out --gtest_output=xml || true'
//sh 'sudo ./a.out --gtest_output=xml'
//sh 'sudo -S ./a.out --gtest_output=xml'
}
echo 'testing complete'
}
stage("Cleanup")
{
//archive
archive 'ClientProject/ClientProject/test_detail.xml'
//test
junit 'ClientProject/ClientProject/test_detail.xml'
//remove
sh 'rm ClientProject/ClientProject/test_detail.xml'
//remove xml file
//remove a.out
}
}