From 64f5391b2d85b515c763881c97329d40c829aa9c Mon Sep 17 00:00:00 2001 From: Vladislav Kalugin Date: Thu, 1 Aug 2024 16:34:17 +0300 Subject: [PATCH 1/3] Add pkgconfig, immer, json --- .github/workflows/matrix.json | 2 +- docker/Dockerfile_base | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/matrix.json b/.github/workflows/matrix.json index a4cd5c4b7..0e6bff1d1 100644 --- a/.github/workflows/matrix.json +++ b/.github/workflows/matrix.json @@ -1,7 +1,7 @@ { "include": [ { - "DOCKER_TAG": "2024.03.0", + "DOCKER_TAG": "2024.08.0", "OPERATING_SYSTEM_TAG": "20.04", "LLVM_VERSION_MAJOR": "14" } diff --git a/docker/Dockerfile_base b/docker/Dockerfile_base index 6a1409026..2a86fd2d6 100644 --- a/docker/Dockerfile_base +++ b/docker/Dockerfile_base @@ -20,7 +20,7 @@ WORKDIR docker # Install required system packages RUN apt update RUN DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends sudo file python3-dateutil wget fakeroot libssl-dev build-essential \ - software-properties-common + software-properties-common pkg-config RUN echo "check_certificate = off" > /etc/wgetrc # We use C++ 17 for UnitTestBot, it is available in gcc-9; default gcc for ubuntu:18.04 is gcc-7 @@ -217,6 +217,8 @@ RUN ./configure --make-llvm-lib && make -j`nproc` # Download library for access private members RUN git clone https://github.com/martong/access_private.git $UTBOT_ALL/access_private +RUN git clone https://github.com/arximboldi/immer.git $UTBOT_ALL/immer +RUN git clone https://github.com/nlohmann/json.git $UTBOT_ALL/json RUN apt autoclean From 1df9b7f0c318a09d8fc601406145a9457980b603 Mon Sep 17 00:00:00 2001 From: Vladislav Kalugin Date: Fri, 2 Aug 2024 17:00:14 +0300 Subject: [PATCH 2/3] update KLEE --- submodules/build-klee.sh | 3 +++ submodules/klee | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/submodules/build-klee.sh b/submodules/build-klee.sh index 04b328c39..089755785 100644 --- a/submodules/build-klee.sh +++ b/submodules/build-klee.sh @@ -21,6 +21,8 @@ $UTBOT_CMAKE_BINARY -G Ninja \ -DENABLE_SYSTEM_TESTS=TRUE \ -DGTEST_SRC_DIR=$UTBOT_ALL/gtest \ -DGTEST_INCLUDE_DIR=$UTBOT_ALL/gtest/googletest/include \ + -DJSON_SRC_DIR=$UTBOT_ALL/json \ + -DIMMER_SRC_DIR=$UTBOT_ALL/immer \ -DCMAKE_INSTALL_PREFIX=$UTBOT_ALL/klee \ -DENABLE_KLEE_LIBCXX=TRUE \ -DKLEE_LIBCXX_DIR=$UTBOT_ALL/libcxx/install \ @@ -28,6 +30,7 @@ $UTBOT_CMAKE_BINARY -G Ninja \ -DENABLE_KLEE_EH_CXX=TRUE \ -DKLEE_LIBCXXABI_SRC_DIR=$UTBOT_ALL/libcxx/libcxxabi \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DWARNINGS_AS_ERRORS=OFF \ .. $UTBOT_CMAKE_BINARY --build . diff --git a/submodules/klee b/submodules/klee index 1e1e8f8cb..f4316c595 160000 --- a/submodules/klee +++ b/submodules/klee @@ -1 +1 @@ -Subproject commit 1e1e8f8cb6e0529816caeff9708465ac433ab893 +Subproject commit f4316c595c003e7c11f7a678330b6e111b4ba36f From d92e8e6b929ad3547a231ca4e810140b6fdfe77c Mon Sep 17 00:00:00 2001 From: Vladislav Kalugin Date: Wed, 7 Aug 2024 19:11:47 +0300 Subject: [PATCH 3/3] Update KLEE --- server/src/KleeRunner.cpp | 10 +++++----- server/src/Server.cpp | 3 ++- submodules/klee | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/server/src/KleeRunner.cpp b/server/src/KleeRunner.cpp index ad82bc842..7c6eed236 100644 --- a/server/src/KleeRunner.cpp +++ b/server/src/KleeRunner.cpp @@ -58,9 +58,9 @@ void KleeRunner::runKlee(const std::vector &testMethods, LOG_SCOPE_FUNCTION(DEBUG); fs::path kleeOutDir = Paths::getKleeOutDir(projectContext); - if (fs::exists(kleeOutDir)) { - FileSystemUtils::removeAll(kleeOutDir); - } +// if (fs::exists(kleeOutDir)) { +// FileSystemUtils::removeAll(kleeOutDir); +// } fs::create_directories(kleeOutDir); CollectionUtils::MapFileTo> fileToMethods; for (const auto &method : testMethods) { @@ -219,9 +219,9 @@ KleeRunner::createKleeParams(const tests::TestMethod &testMethod, std::vector argvData = { "klee", - "--entry-point=" + KleeUtils::entryPointFunction(tests, testMethod.methodName, true), + "--entry-points=" + KleeUtils::entryPointFunction(tests, testMethod.methodName, true), "--libc=klee", - "--utbot", +// "--utbot", "--posix-runtime", "--skip-not-lazy-initialized", "--min-number-elements-li=1", diff --git a/server/src/Server.cpp b/server/src/Server.cpp index 960e43d1f..40c4e4d19 100644 --- a/server/src/Server.cpp +++ b/server/src/Server.cpp @@ -312,7 +312,8 @@ Status Server::TestsGenServiceImpl::ProcessBaseTestRequest(BaseTestGen &testGen, fetcher.getStructsToDeclare(), testGen.serverBuildDir, typesHandler) .generateTestHeaders(testGen.tests, stubGen, selectedTargets, testGen.progressWriter); KleeRunner kleeRunner{testGen.projectContext, testGen.settingsContext}; - bool interactiveMode = (dynamic_cast(&testGen) != nullptr); +// bool interactiveMode = (dynamic_cast(&testGen) != nullptr); + bool interactiveMode = false; auto generationStartTime = std::chrono::steady_clock::now(); StatsUtils::TestsGenerationStatsFileMap generationStatsMap(testGen.projectContext, std::chrono::duration_cast( diff --git a/submodules/klee b/submodules/klee index f4316c595..d572f454f 160000 --- a/submodules/klee +++ b/submodules/klee @@ -1 +1 @@ -Subproject commit f4316c595c003e7c11f7a678330b6e111b4ba36f +Subproject commit d572f454f7664df29affbaa5a08c896f4094ef99