From b68759ccf5e6a52760084dd4e992cfd93bfb3168 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 4 Aug 2018 09:42:55 +0200 Subject: [PATCH] Added script that tests a patch with daca --- tools/daca-test-patch.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 tools/daca-test-patch.sh diff --git a/tools/daca-test-patch.sh b/tools/daca-test-patch.sh new file mode 100755 index 000000000..c38f16824 --- /dev/null +++ b/tools/daca-test-patch.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# +# Test a patch using the daca script +# +# Arguments: +# $1: patch file name +# $2: daca folder +# +# Example usage: +# daca-test-patch.sh 1234.diff a + +set -e +cd ~/cppcheck +git checkout -f +git apply $1 +make clean +nice make SRCDIR=build CFGDIR=~/cppcheck/cfg CXXFLAGS=-O2 +mv cppcheck ~/daca2/cppcheck-patch +git checkout -f +nice make SRCDIR=build CFGDIR=~/cppcheck/cfg CXXFLAGS=-O2 +mv cppcheck ~/daca2/cppcheck-head +make clean +nice make +python tools/daca2.py --baseversion patch $2 + + +