From 127859a6d3071332bccfcf5ce4d98a4b70fbacee Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sat, 15 Jun 2019 15:34:29 -0400 Subject: [PATCH] Run tests with sanitizers in CI --- ChangeLog | 2 ++ azure-pipelines.yml | 12 ++++++++++++ azure-pipelines/test-sanitizers | 12 ++++++++++++ 3 files changed, 26 insertions(+) create mode 100755 azure-pipelines/test-sanitizers diff --git a/ChangeLog b/ChangeLog index 07a2ec30..31a2ec92 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2019-06-15 Jay Berkenbilt + * Update CI (Azure Pipelines) to run tests with some sanitizers. + * Do "ideal integration" with oss-fuzz. This includes adding a better fuzzer with a seed corpus and adding automated tests of the fuzzer with the test data. diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 69a65b80..d8b07a80 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -108,3 +108,15 @@ jobs: displayName: 'Build Fuzzer' dependsOn: Linux condition: succeeded() +- job: Sanitizers + pool: + vmImage: ubuntu-16.04 + steps: + - script: azure-pipelines/test-sanitizers + displayName: 'Sanitizer Tests' + - task: PublishTestResults@2 + inputs: + testRunTitle: Sanitizers + buildPlatform: Sanitizers + dependsOn: Linux + condition: succeeded() diff --git a/azure-pipelines/test-sanitizers b/azure-pipelines/test-sanitizers new file mode 100755 index 00000000..507b73ed --- /dev/null +++ b/azure-pipelines/test-sanitizers @@ -0,0 +1,12 @@ +#!/bin/bash +set -e +sudo apt-get update +sudo apt-get -y install \ + autoconf build-essential zlib1g-dev libjpeg-dev +./configure \ + CFLAGS="-fsanitize=address -fsanitize=undefined -g" \ + CXXFLAGS="-fsanitize=address -fsanitize=undefined -g" \ + LDFLAGS="-fsanitize=address -fsanitize=undefined" \ + --enable-werror --disable-shared --enable-show-failed-test-output +make -j$(nproc) -k +make -k check