[clang] 089a0ad - [analyzer][tests] Add 5 more projects for testing

Valeriy Savchenko via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 14 01:43:21 PDT 2020


Author: Valeriy Savchenko
Date: 2020-07-14T11:42:46+03:00
New Revision: 089a0ad8bc993923817d7957f08bd67dbecd56af

URL: https://github.com/llvm/llvm-project/commit/089a0ad8bc993923817d7957f08bd67dbecd56af
DIFF: https://github.com/llvm/llvm-project/commit/089a0ad8bc993923817d7957f08bd67dbecd56af.diff

LOG: [analyzer][tests] Add 5 more projects for testing

Differential Revision: https://reviews.llvm.org/D83701

Added: 
    clang/utils/analyzer/projects/capnproto/cleanup_run_static_analyzer.sh
    clang/utils/analyzer/projects/capnproto/run_static_analyzer.cmd
    clang/utils/analyzer/projects/cppcheck/cleanup_run_static_analyzer.sh
    clang/utils/analyzer/projects/cppcheck/run_static_analyzer.cmd
    clang/utils/analyzer/projects/faiss/cleanup_run_static_analyzer.sh
    clang/utils/analyzer/projects/faiss/run_static_analyzer.cmd
    clang/utils/analyzer/projects/harfbuzz/cleanup_run_static_analyzer.sh
    clang/utils/analyzer/projects/harfbuzz/run_static_analyzer.cmd
    clang/utils/analyzer/projects/tmux/cleanup_run_static_analyzer.sh
    clang/utils/analyzer/projects/tmux/run_static_analyzer.cmd

Modified: 
    clang/utils/analyzer/Dockerfile
    clang/utils/analyzer/entrypoint.py
    clang/utils/analyzer/projects/projects.json

Removed: 
    


################################################################################
diff  --git a/clang/utils/analyzer/Dockerfile b/clang/utils/analyzer/Dockerfile
index 21906011c7dc..f74ff8aa95c2 100644
--- a/clang/utils/analyzer/Dockerfile
+++ b/clang/utils/analyzer/Dockerfile
@@ -42,6 +42,16 @@ RUN apt-get install -y \
     libjsonrpccpp-dev=0.7.0-1build2 \
     uuid-dev=2.31.1-0.4ubuntu3.6
 
+# tmux dependencies
+RUN apt-get install -y \
+    autotools-dev=20180224.1 \
+    automake=1:1.15.1-3ubuntu2 \
+    libncurses5-dev=6.1-1ubuntu1.18.04 \
+    libevent-dev=2.1.8-stable-4build1 \
+    pkg-config=0.29.1-0ubuntu2 \
+    flex=2.6.4-6 \
+    bison=2:3.0.4.dfsg-1build1
+
 RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1
 
 VOLUME /analyzer

diff  --git a/clang/utils/analyzer/entrypoint.py b/clang/utils/analyzer/entrypoint.py
index b440e776b57c..9c84431da548 100644
--- a/clang/utils/analyzer/entrypoint.py
+++ b/clang/utils/analyzer/entrypoint.py
@@ -50,7 +50,7 @@ def is_cmake_needed():
 
 CMAKE_COMMAND = "cmake -G Ninja -DCMAKE_BUILD_TYPE=Release " \
     "-DCMAKE_INSTALL_PREFIX=/analyzer -DLLVM_TARGETS_TO_BUILD=X86 " \
-    "-DLLVM_ENABLE_PROJECTS=clang -DLLVM_BUILD_RUNTIME=OFF " \
+    "-DLLVM_ENABLE_PROJECTS=\"clang;openmp\" -DLLVM_BUILD_RUNTIME=OFF " \
     "-DLLVM_ENABLE_TERMINFO=OFF -DCLANG_ENABLE_ARCMT=OFF " \
     "-DCLANG_ENABLE_STATIC_ANALYZER=ON"
 

diff  --git a/clang/utils/analyzer/projects/capnproto/cleanup_run_static_analyzer.sh b/clang/utils/analyzer/projects/capnproto/cleanup_run_static_analyzer.sh
new file mode 100755
index 000000000000..e14c423280ec
--- /dev/null
+++ b/clang/utils/analyzer/projects/capnproto/cleanup_run_static_analyzer.sh
@@ -0,0 +1 @@
+rm -rf ./build

diff  --git a/clang/utils/analyzer/projects/capnproto/run_static_analyzer.cmd b/clang/utils/analyzer/projects/capnproto/run_static_analyzer.cmd
new file mode 100644
index 000000000000..6678fe635db3
--- /dev/null
+++ b/clang/utils/analyzer/projects/capnproto/run_static_analyzer.cmd
@@ -0,0 +1,2 @@
+cmake . -DCMAKE_BUILD_TYPE=Debug -Bbuild -GNinja
+cmake --build build

diff  --git a/clang/utils/analyzer/projects/cppcheck/cleanup_run_static_analyzer.sh b/clang/utils/analyzer/projects/cppcheck/cleanup_run_static_analyzer.sh
new file mode 100755
index 000000000000..e14c423280ec
--- /dev/null
+++ b/clang/utils/analyzer/projects/cppcheck/cleanup_run_static_analyzer.sh
@@ -0,0 +1 @@
+rm -rf ./build

diff  --git a/clang/utils/analyzer/projects/cppcheck/run_static_analyzer.cmd b/clang/utils/analyzer/projects/cppcheck/run_static_analyzer.cmd
new file mode 100644
index 000000000000..72cb7f7677e6
--- /dev/null
+++ b/clang/utils/analyzer/projects/cppcheck/run_static_analyzer.cmd
@@ -0,0 +1,2 @@
+cmake . -DCMAKE_BUILD_TYPE=Debug -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON -Bbuild -GNinja
+cmake --build build

diff  --git a/clang/utils/analyzer/projects/faiss/cleanup_run_static_analyzer.sh b/clang/utils/analyzer/projects/faiss/cleanup_run_static_analyzer.sh
new file mode 100755
index 000000000000..efcd16e590a1
--- /dev/null
+++ b/clang/utils/analyzer/projects/faiss/cleanup_run_static_analyzer.sh
@@ -0,0 +1 @@
+make clean

diff  --git a/clang/utils/analyzer/projects/faiss/run_static_analyzer.cmd b/clang/utils/analyzer/projects/faiss/run_static_analyzer.cmd
new file mode 100644
index 000000000000..877fa2aa389b
--- /dev/null
+++ b/clang/utils/analyzer/projects/faiss/run_static_analyzer.cmd
@@ -0,0 +1,2 @@
+./configure --without-cuda
+make

diff  --git a/clang/utils/analyzer/projects/harfbuzz/cleanup_run_static_analyzer.sh b/clang/utils/analyzer/projects/harfbuzz/cleanup_run_static_analyzer.sh
new file mode 100755
index 000000000000..e14c423280ec
--- /dev/null
+++ b/clang/utils/analyzer/projects/harfbuzz/cleanup_run_static_analyzer.sh
@@ -0,0 +1 @@
+rm -rf ./build

diff  --git a/clang/utils/analyzer/projects/harfbuzz/run_static_analyzer.cmd b/clang/utils/analyzer/projects/harfbuzz/run_static_analyzer.cmd
new file mode 100644
index 000000000000..6678fe635db3
--- /dev/null
+++ b/clang/utils/analyzer/projects/harfbuzz/run_static_analyzer.cmd
@@ -0,0 +1,2 @@
+cmake . -DCMAKE_BUILD_TYPE=Debug -Bbuild -GNinja
+cmake --build build

diff  --git a/clang/utils/analyzer/projects/projects.json b/clang/utils/analyzer/projects/projects.json
index e3d853ac6f6a..84b741035f46 100644
--- a/clang/utils/analyzer/projects/projects.json
+++ b/clang/utils/analyzer/projects/projects.json
@@ -103,5 +103,40 @@
     "source": "git",
     "origin": "https://github.com/google/re2.git",
     "commit": "2b25567"
+  },
+  {
+    "name": "cppcheck",
+    "mode": 1,
+    "source": "git",
+    "origin": "https://github.com/danmar/cppcheck.git",
+    "commit": "5fa3d53"
+  },
+  {
+    "name": "harfbuzz",
+    "mode": 1,
+    "source": "git",
+    "origin": "https://github.com/harfbuzz/harfbuzz.git",
+    "commit": "f8d345e"
+  },
+  {
+    "name": "capnproto",
+    "mode": 1,
+    "source": "git",
+    "origin": "https://github.com/capnproto/capnproto.git",
+    "commit": "8be1c9f"
+  },
+  {
+    "name": "tmux",
+    "mode": 1,
+    "source": "git",
+    "origin": "https://github.com/tmux/tmux.git",
+    "commit": "a5f99e1"
+  },
+  {
+    "name": "faiss",
+    "mode": 1,
+    "source": "git",
+    "origin": "https://github.com/facebookresearch/faiss.git",
+    "commit": "9e5d5b7"
   }
 ]

diff  --git a/clang/utils/analyzer/projects/tmux/cleanup_run_static_analyzer.sh b/clang/utils/analyzer/projects/tmux/cleanup_run_static_analyzer.sh
new file mode 100755
index 000000000000..f671df1de5f4
--- /dev/null
+++ b/clang/utils/analyzer/projects/tmux/cleanup_run_static_analyzer.sh
@@ -0,0 +1,2 @@
+make distclean
+exit 0

diff  --git a/clang/utils/analyzer/projects/tmux/run_static_analyzer.cmd b/clang/utils/analyzer/projects/tmux/run_static_analyzer.cmd
new file mode 100644
index 000000000000..78ce31f452a1
--- /dev/null
+++ b/clang/utils/analyzer/projects/tmux/run_static_analyzer.cmd
@@ -0,0 +1,2 @@
+./autogen.sh
+./configure && make


        


More information about the cfe-commits mailing list