From 033d13a82b9038d1caa269e3b797a1fd295847d1 Mon Sep 17 00:00:00 2001 From: Marie-Pierre Oudot Date: Wed, 12 Oct 2022 16:30:56 +0200 Subject: [PATCH] [fix] Correct bug in gitdiff finder If CmakeLists.txt contains more than one error including one on WS_PATH, the other errors are not taken into account. + Correct NabLabTests/CMakeLists.txt Signed-off-by: Marie-Pierre Oudot --- .../src-gen-arcane/accelerator/hydroremap/CMakeLists.txt | 2 +- .../src-gen-arcane/accelerator/iteration/CMakeLists.txt | 2 +- .../src-gen-arcane/accelerator/variables/CMakeLists.txt | 2 +- .../src-gen-arcane/sequential/hydroremap/CMakeLists.txt | 2 +- .../src-gen-arcane/sequential/iteration/CMakeLists.txt | 2 +- .../src-gen-arcane/sequential/variables/CMakeLists.txt | 2 +- .../src-gen-arcane/thread/hydroremap/CMakeLists.txt | 2 +- .../NabLabTests/src-gen-arcane/thread/iteration/CMakeLists.txt | 2 +- .../NabLabTests/src-gen-arcane/thread/variables/CMakeLists.txt | 2 +- tests/fr.cea.nabla.tests/src/fr/cea/nabla/tests/GitUtils.xtend | 3 +++ 10 files changed, 12 insertions(+), 9 deletions(-) diff --git a/tests/NabLabTests/src-gen-arcane/accelerator/hydroremap/CMakeLists.txt b/tests/NabLabTests/src-gen-arcane/accelerator/hydroremap/CMakeLists.txt index c93378742..84e144cfc 100644 --- a/tests/NabLabTests/src-gen-arcane/accelerator/hydroremap/CMakeLists.txt +++ b/tests/NabLabTests/src-gen-arcane/accelerator/hydroremap/CMakeLists.txt @@ -14,7 +14,7 @@ if (NOT DEFINED Arcane_ROOT) message(FATAL_ERROR "Arcane_ROOT variable must be set") endif() -project(HydroRemap LANGUAGES CXX) +project(HydroRemap LANGUAGES C CXX) find_package(Arcane REQUIRED) diff --git a/tests/NabLabTests/src-gen-arcane/accelerator/iteration/CMakeLists.txt b/tests/NabLabTests/src-gen-arcane/accelerator/iteration/CMakeLists.txt index 6f21d465a..01b686e0d 100644 --- a/tests/NabLabTests/src-gen-arcane/accelerator/iteration/CMakeLists.txt +++ b/tests/NabLabTests/src-gen-arcane/accelerator/iteration/CMakeLists.txt @@ -14,7 +14,7 @@ if (NOT DEFINED Arcane_ROOT) message(FATAL_ERROR "Arcane_ROOT variable must be set") endif() -project(Iteration LANGUAGES CXX) +project(Iteration LANGUAGES C CXX) find_package(Arcane REQUIRED) diff --git a/tests/NabLabTests/src-gen-arcane/accelerator/variables/CMakeLists.txt b/tests/NabLabTests/src-gen-arcane/accelerator/variables/CMakeLists.txt index ac297247e..be453b225 100644 --- a/tests/NabLabTests/src-gen-arcane/accelerator/variables/CMakeLists.txt +++ b/tests/NabLabTests/src-gen-arcane/accelerator/variables/CMakeLists.txt @@ -14,7 +14,7 @@ if (NOT DEFINED Arcane_ROOT) message(FATAL_ERROR "Arcane_ROOT variable must be set") endif() -project(Variables LANGUAGES CXX) +project(Variables LANGUAGES C CXX) find_package(Arcane REQUIRED) diff --git a/tests/NabLabTests/src-gen-arcane/sequential/hydroremap/CMakeLists.txt b/tests/NabLabTests/src-gen-arcane/sequential/hydroremap/CMakeLists.txt index cc9d34b8d..2c19cfd32 100644 --- a/tests/NabLabTests/src-gen-arcane/sequential/hydroremap/CMakeLists.txt +++ b/tests/NabLabTests/src-gen-arcane/sequential/hydroremap/CMakeLists.txt @@ -14,7 +14,7 @@ if (NOT DEFINED Arcane_ROOT) message(FATAL_ERROR "Arcane_ROOT variable must be set") endif() -project(HydroRemap LANGUAGES CXX) +project(HydroRemap LANGUAGES C CXX) find_package(Arcane REQUIRED) diff --git a/tests/NabLabTests/src-gen-arcane/sequential/iteration/CMakeLists.txt b/tests/NabLabTests/src-gen-arcane/sequential/iteration/CMakeLists.txt index c3ea9741a..935410863 100644 --- a/tests/NabLabTests/src-gen-arcane/sequential/iteration/CMakeLists.txt +++ b/tests/NabLabTests/src-gen-arcane/sequential/iteration/CMakeLists.txt @@ -14,7 +14,7 @@ if (NOT DEFINED Arcane_ROOT) message(FATAL_ERROR "Arcane_ROOT variable must be set") endif() -project(Iteration LANGUAGES CXX) +project(Iteration LANGUAGES C CXX) find_package(Arcane REQUIRED) diff --git a/tests/NabLabTests/src-gen-arcane/sequential/variables/CMakeLists.txt b/tests/NabLabTests/src-gen-arcane/sequential/variables/CMakeLists.txt index 804a4f587..2bf3d85bf 100644 --- a/tests/NabLabTests/src-gen-arcane/sequential/variables/CMakeLists.txt +++ b/tests/NabLabTests/src-gen-arcane/sequential/variables/CMakeLists.txt @@ -14,7 +14,7 @@ if (NOT DEFINED Arcane_ROOT) message(FATAL_ERROR "Arcane_ROOT variable must be set") endif() -project(Variables LANGUAGES CXX) +project(Variables LANGUAGES C CXX) find_package(Arcane REQUIRED) diff --git a/tests/NabLabTests/src-gen-arcane/thread/hydroremap/CMakeLists.txt b/tests/NabLabTests/src-gen-arcane/thread/hydroremap/CMakeLists.txt index cc9d34b8d..2c19cfd32 100644 --- a/tests/NabLabTests/src-gen-arcane/thread/hydroremap/CMakeLists.txt +++ b/tests/NabLabTests/src-gen-arcane/thread/hydroremap/CMakeLists.txt @@ -14,7 +14,7 @@ if (NOT DEFINED Arcane_ROOT) message(FATAL_ERROR "Arcane_ROOT variable must be set") endif() -project(HydroRemap LANGUAGES CXX) +project(HydroRemap LANGUAGES C CXX) find_package(Arcane REQUIRED) diff --git a/tests/NabLabTests/src-gen-arcane/thread/iteration/CMakeLists.txt b/tests/NabLabTests/src-gen-arcane/thread/iteration/CMakeLists.txt index c3ea9741a..935410863 100644 --- a/tests/NabLabTests/src-gen-arcane/thread/iteration/CMakeLists.txt +++ b/tests/NabLabTests/src-gen-arcane/thread/iteration/CMakeLists.txt @@ -14,7 +14,7 @@ if (NOT DEFINED Arcane_ROOT) message(FATAL_ERROR "Arcane_ROOT variable must be set") endif() -project(Iteration LANGUAGES CXX) +project(Iteration LANGUAGES C CXX) find_package(Arcane REQUIRED) diff --git a/tests/NabLabTests/src-gen-arcane/thread/variables/CMakeLists.txt b/tests/NabLabTests/src-gen-arcane/thread/variables/CMakeLists.txt index 804a4f587..2bf3d85bf 100644 --- a/tests/NabLabTests/src-gen-arcane/thread/variables/CMakeLists.txt +++ b/tests/NabLabTests/src-gen-arcane/thread/variables/CMakeLists.txt @@ -14,7 +14,7 @@ if (NOT DEFINED Arcane_ROOT) message(FATAL_ERROR "Arcane_ROOT variable must be set") endif() -project(Variables LANGUAGES CXX) +project(Variables LANGUAGES C CXX) find_package(Arcane REQUIRED) diff --git a/tests/fr.cea.nabla.tests/src/fr/cea/nabla/tests/GitUtils.xtend b/tests/fr.cea.nabla.tests/src/fr/cea/nabla/tests/GitUtils.xtend index cb4ea874d..581a15fea 100644 --- a/tests/fr.cea.nabla.tests/src/fr/cea/nabla/tests/GitUtils.xtend +++ b/tests/fr.cea.nabla.tests/src/fr/cea/nabla/tests/GitUtils.xtend @@ -52,6 +52,9 @@ class GitUtils val formatter = new DiffFormatter(outputStream) formatter.setRepository(git.repository) formatter.setPathFilter(PathFilter.create(subPath)) + //context = number of lines of context to see before the first modification and after the last modification within a hunk of the modified file. + //in case of multiple errors, whe get several @@ + formatter.setContext(0) var diffs = formatter.scan(workingTreeIterator, headTreeParser) diffs = diffs.filter[d | d.newPath.contains(moduleName)].toList