From 4cad3243876f9e702f275e8cbbd5299cf5cb1d9b Mon Sep 17 00:00:00 2001 From: "azure-pipelines[bot]" Date: Fri, 19 Oct 2018 23:32:35 +0000 Subject: [PATCH 1/4] Set up CI with Azure Pipelines --- azure-pipelines.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..00ba6c6 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,17 @@ +# C/C++ with GCC +# Build your C/C++ project with GCC using make. +# Add steps that publish test results, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/apps/c-cpp/gcc + +pool: + vmImage: 'Ubuntu 16.04' + +steps: +- script: | + rm -rf build/ + mkdir build + cd build + cmake .. + make + make test CTEST_OUTPUT_ON_FAILURE=TRUE + displayName: 'make' \ No newline at end of file From 05e6d416bbb94172533e88405713ae0bccc61817 Mon Sep 17 00:00:00 2001 From: Joshua Scott Date: Sat, 20 Oct 2018 01:13:43 +0100 Subject: [PATCH 2/4] Update azure-pipelines.yml --- azure-pipelines.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 00ba6c6..71c45ac 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -14,4 +14,11 @@ steps: cmake .. make make test CTEST_OUTPUT_ON_FAILURE=TRUE - displayName: 'make' \ No newline at end of file + displayName: 'Compile' +- script: | + make test CTEST_OUTPUT_ON_FAILURE=TRUE + displayName: 'Test' +- task: PublishTestResults@2 + inputs: + testResultsFormat: 'JUnit' + testResultsFiles: '**/test-*.xml' From 422ba1b0ea034df73281d4d8b6c2c6d3282131a9 Mon Sep 17 00:00:00 2001 From: Joshua Scott Date: Sat, 20 Oct 2018 01:17:21 +0100 Subject: [PATCH 3/4] Update azure-pipelines.yml --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 71c45ac..3c527f5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -13,12 +13,12 @@ steps: cd build cmake .. make - make test CTEST_OUTPUT_ON_FAILURE=TRUE displayName: 'Compile' - script: | + cd build make test CTEST_OUTPUT_ON_FAILURE=TRUE displayName: 'Test' - task: PublishTestResults@2 inputs: testResultsFormat: 'JUnit' - testResultsFiles: '**/test-*.xml' + testResultsFiles: 'build/**/test-*.xml' From 0e42874dc3d7816856d34bff598bf72a5da5c292 Mon Sep 17 00:00:00 2001 From: Joshua Scott Date: Sat, 20 Oct 2018 01:23:55 +0100 Subject: [PATCH 4/4] test: Output reports as JUnit xml --- test/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 1eaf2d4..ed4d4ab 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -15,5 +15,5 @@ foreach (file ${files}) CXX_STANDARD 11 ) target_link_libraries(${testcase} Catch ${PROJECT_NAME}) - add_test(${testcase} ${testcase}) + add_test(${testcase} ${testcase} -s -r junit -o ${PROJECT_BINARY_DIR}/Testing/${testcase}.xml) endforeach()