Linux-Debug 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. pipeline {
  2. agent {
  3. dockerfile { filename 'Jenkinsfiles/ubuntu-16.04.dockerfile' }
  4. }
  5. stages {
  6. stage('Lint') {
  7. steps {
  8. sh '''
  9. ./.ci/run-shellcheck || :
  10. ./.ci/run-shellcheck -f json | ./.ci/prfilter
  11. '''
  12. }
  13. }
  14. stage('Build') {
  15. steps {
  16. sh '''
  17. ./Scripts/clean-check-prepare
  18. make -j 8 DEBUG=1 WERROR=1
  19. make -j 8 DEBUG=1 WERROR=1 test
  20. '''
  21. sh '''
  22. cd Pal/src
  23. make -j 8 PAL_HOST=Skeleton DEBUG=1 WERROR=1
  24. '''
  25. }
  26. }
  27. stage('Test') {
  28. steps {
  29. sh '''
  30. cd Pal/regression
  31. make regression
  32. '''
  33. sh '''
  34. cd LibOS/shim/test/regression
  35. make regression
  36. '''
  37. sh '''
  38. cd LibOS/shim/test/fs
  39. make test
  40. '''
  41. sh '''
  42. cd LibOS/shim/test/apps/ltp
  43. make
  44. make ltp.xml
  45. '''
  46. timeout(time: 5, unit: 'MINUTES') {
  47. sh '''
  48. cd LibOS/shim/test/apps/python-simple
  49. make check
  50. '''
  51. }
  52. timeout(time: 5, unit: 'MINUTES') {
  53. sh '''
  54. cd LibOS/shim/test/apps/python-scipy-insecure
  55. make check
  56. '''
  57. }
  58. timeout(time: 5, unit: 'MINUTES') {
  59. sh '''
  60. cd LibOS/shim/test/apps/bash
  61. make regression
  62. '''
  63. }
  64. timeout(time: 5, unit: 'MINUTES') {
  65. sh '''
  66. cd LibOS/shim/test/apps/curl
  67. make check
  68. '''
  69. }
  70. timeout(time: 5, unit: 'MINUTES') {
  71. sh '''
  72. cd LibOS/shim/test/apps/gcc
  73. make check
  74. '''
  75. }
  76. timeout(time: 20, unit: 'MINUTES') {
  77. sh '''
  78. cd LibOS/shim/test/apps/lmbench
  79. make test N_RUNS=1 ENOUGH=100
  80. '''
  81. }
  82. timeout(time: 10, unit: 'MINUTES') {
  83. sh '''
  84. cd LibOS/shim/test/apps/redis
  85. make USE_SELECT=1
  86. make start-graphene-server &
  87. sleep 1
  88. ./src/src/redis-benchmark
  89. '''
  90. }
  91. timeout(time: 10, unit: 'MINUTES') {
  92. sh '''
  93. cd LibOS/shim/test/apps/lighttpd
  94. make
  95. make start-graphene-server &
  96. sleep 1
  97. LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh 127.0.0.1:8003
  98. '''
  99. }
  100. timeout(time: 10, unit: 'MINUTES') {
  101. sh '''
  102. cd LibOS/shim/test/apps/nginx
  103. make
  104. make start-graphene-server &
  105. sleep 1
  106. LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh 127.0.0.1:8002
  107. '''
  108. }
  109. timeout(time: 20, unit: 'MINUTES') {
  110. sh '''
  111. cd LibOS/shim/test/apps/apache
  112. make
  113. make start-graphene-server &
  114. sleep 1
  115. LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh 127.0.0.1:8001
  116. LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh https://127.0.0.1:8443
  117. '''
  118. }
  119. timeout(time: 5, unit: 'MINUTES') {
  120. sh '''
  121. cd LibOS/shim/test/apps/blender
  122. make check
  123. '''
  124. }
  125. sh '''
  126. # Workaround LTP bug (see https://github.com/linux-test-project/ltp/issues/560 for upstream fix):
  127. git -C LibOS/shim/test/apps/ltp/src checkout -- utils/ffsb-6.0-rc2/config.h.in utils/ffsb-6.0-rc2/configure
  128. ./Scripts/gitignore-test
  129. '''
  130. sh '''
  131. cd "$(./Scripts/clean-check-test-copy)"
  132. make distclean
  133. make -C LibOS/shim/test/regression clean
  134. make -C LibOS/shim/test/apps/ltp clean
  135. # LTP's make clean is broken, see https://github.com/linux-test-project/ltp/issues/559
  136. rm -rf /tmp/graphene-debug.clean-check.clean/LibOS/shim/test/apps/ltp/src
  137. rm -rf LibOS/shim/test/apps/ltp/src
  138. make -C LibOS/shim/test/apps/python-simple clean
  139. make -C LibOS/shim/test/apps/python-scipy-insecure clean
  140. make -C LibOS/shim/test/apps/bash clean
  141. make -C LibOS/shim/test/apps/curl clean
  142. make -C LibOS/shim/test/apps/gcc clean
  143. make -C LibOS/shim/test/apps/lmbench distclean
  144. make -C LibOS/shim/test/apps/redis distclean
  145. make -C LibOS/shim/test/apps/lighttpd distclean
  146. make -C LibOS/shim/test/apps/nginx distclean
  147. make -C LibOS/shim/test/apps/apache distclean
  148. make -C LibOS/shim/test/apps/blender distclean
  149. make -C Pal/src PAL_HOST=Skeleton clean
  150. ./Scripts/clean-check
  151. '''
  152. }
  153. post {
  154. always {
  155. archiveArtifacts 'LibOS/shim/test/apps/ltp/ltp.xml'
  156. junit 'Pal/regression/pal-regression.xml'
  157. junit 'LibOS/shim/test/regression/libos-regression.xml'
  158. junit 'LibOS/shim/test/apps/ltp/ltp.xml'
  159. }
  160. }
  161. }
  162. stage('Deploy') {
  163. steps {
  164. sh 'echo Deploying code'
  165. }
  166. }
  167. }
  168. post {
  169. success {
  170. echo 'Deployment successful'
  171. }
  172. failure {
  173. echo 'Failure while on the pipeline'
  174. }
  175. unstable {
  176. echo 'Pipeline marked as "unstable"'
  177. }
  178. }
  179. }