Compare commits

...

2 Commits

Author SHA1 Message Date
rhinemann 3d3607d627 Added Jenkinsfile. 2024-12-27 19:28:49 +02:00
rhinemann 731c3b8349 Removed gmock include. 2024-12-27 19:28:38 +02:00
3 changed files with 30 additions and 2 deletions

View File

@ -8,4 +8,4 @@ add_executable(code main.cpp
sort.h
)
target_link_libraries(code gtest gmock pthread)
target_link_libraries(code gtest pthread)

29
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,29 @@
pipeline {
agent any
stages {
stage('Checkout') {
steps {
git url: 'http://10.1.1.1:3000/Rhinemann/sys-prog-coursework-lab-4.git', credentialsId: 'access_for_jenkins'
}
}
stage('Build') {
steps {
g++ main.cpp sort.h sort.cpp -o test -lgtest -pthread
}
}
stage('Test') {
steps {
test --gtest_output=xml:test_report.xml
}
}
}
post {
always {
xunit (tools: [ GoogleTest(pattern: 'test_report.xml') ])
}
}
}

View File

@ -1,7 +1,6 @@
#include "sort.h"
#include <gtest/gtest.h>
#include <gmock/gmock.h>
TEST(QuickSortTest, SortsArrayInAscendingOrder)
{