Skip to content

Commit 7caac4b

Browse files
committed
Fix run ubuntu 22.04
1 parent df7f800 commit 7caac4b

File tree

5 files changed

+13
-12
lines changed

5 files changed

+13
-12
lines changed

docker/release_distribution_scripts/utbot_run_system.sh

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,19 @@ export UTBOT_LOGS_FOLDER=$UTBOT_ALL
3939
export UTBOT_INSTALL_DIR=$UTBOT_ALL/install
4040
export CC=$UTBOT_ALL/install/bin/clang
4141
export CXX=$UTBOT_ALL/install/bin/clang++
42-
export CPATH=$UTBOT_ALL/klee/include:$CPATH # Path for C and C++ includes
43-
export PATH=$UTBOT_ALL/bear/bin:$UTBOT_ALL/klee/bin:$UTBOT_INSTALL_DIR/bin:$PATH
42+
export CPATH=$UTBOT_ALL/klee/include${CPATH:+:${CPATH}} # Path for C and C++ includes
43+
export PATH=$UTBOT_ALL/bear/bin:$UTBOT_ALL/klee/bin:$UTBOT_INSTALL_DIR/bin${PATH:+:${PATH}}
4444
export KLEE_RUNTIME_LIBRARY_PATH=$UTBOT_ALL/klee/lib/klee/runtime/
4545

4646
# If the system is opensuse, variable is not empty. It is empty otherwise.
4747
IS_SUSE="$(grep '^NAME=' /etc/os-release | tr '[:upper:]' '[:lower:]' | grep suse)"
4848

4949
# Setting environment variables for debian packages
50-
export PATH=$UTBOT_ALL/debs-install/usr/bin:$PATH
51-
export LD_LIBRARY_PATH=$UTBOT_ALL/install/lib:$UTBOT_ALL/debs-install/lib/x86_64-linux-gnu:$UTBOT_ALL/debs-install/usr/lib/x86_64-linux-gnu:$UTBOT_ALL/debs-install/usr/local/lib:$UTBOT_ALL/debs-install/lib:$UTBOT_ALL/debs-install/usr/lib:$LD_LIBRARY_PATH
52-
export CPATH=$UTBOT_ALL/debs-install/usr/lib/gcc/x86_64-linux-gnu/9/include:$UTBOT_ALL/debs-install/usr/local/include:$UTBOT_ALL/debs-install/usr/include/x86_64-linux-gnu:$UTBOT_ALL/debs-install/usr/include:$CPATH
53-
export CPLUS_INCLUDE_PATH=$UTBOT_ALL/debs-install/usr/include/c++/9:$UTBOT_ALL/debs-install/usr/include/x86_64-linux-gnu/c++/9:$UTBOT_ALL/debs-install/usr/include/c++/9/backward:$CPLUS_INCLUDE_PATH
50+
export PATH=$UTBOT_ALL/debs-install/usr/bin${PATH:+:${PATH}}
51+
export LD_LIBRARY_PATH=$UTBOT_ALL/install/lib:$UTBOT_ALL/debs-install/lib/x86_64-linux-gnu:$UTBOT_ALL/debs-install/usr/lib/x86_64-linux-gnu:$UTBOT_ALL/debs-install/usr/local/lib:$UTBOT_ALL/debs-install/lib:$UTBOT_ALL/debs-install/usr/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
52+
export GENERAL_INCLUDES=$UTBOT_ALL/debs-install/usr/lib/gcc/x86_64-linux-gnu/9/include:$UTBOT_ALL/debs-install/usr/local/include:$UTBOT_ALL/debs-install/usr/include/x86_64-linux-gnu:$UTBOT_ALL/debs-install/usr/include
53+
export C_INCLUDE_PATH=GENERAL_INCLUDES${C_INCLUDE_PATH:+:${C_INCLUDE_PATH}}
54+
export CPLUS_INCLUDE_PATH=$UTBOT_ALL/debs-install/usr/include/c++/9:$UTBOT_ALL/debs-install/usr/include/x86_64-linux-gnu/c++/9:$UTBOT_ALL/debs-install/usr/include/c++/9/backward:GENERAL_INCLUDES${CPLUS_INCLUDE_PATH:+:${CPLUS_INCLUDE_PATH}}
5455
export LDFLAGS="-fuse-ld=gold $LDFLAGS"
5556

5657
# This function moves dev version of libc into $UTBOT_ALL/debs-install directory
@@ -133,7 +134,7 @@ then
133134
PROJECT_PATH=$4
134135
mkdir -p $PROJECT_PATH/build
135136
cd $PROJECT_PATH/build || exit
136-
137+
137138
if [ -f "../$UTBOT_BUILD_SCRIPT" ]
138139
then
139140
echo "Trying to run '$UTBOT_BUILD_SCRIPT'!"

server/src/KleeRunner.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ void KleeRunner::processBatchWithoutInteractive(const std::vector<tests::TestMet
285285
std::vector<char *> cargv, cenvp;
286286
std::vector<std::string> tmp;
287287
ExecUtils::toCArgumentsPtr(argvData, tmp, cargv, cenvp, false);
288-
LOG_S(DEBUG) << "Klee command :: " + StringUtils::joinWith(argvData, " ");
288+
LOG_S(DEBUG) << "Klee command: " + StringUtils::joinWith(argvData, " ");
289289
MEASURE_FUNCTION_EXECUTION_TIME
290290

291291
RunKleeTask task(cargv.size(), cargv.data(), settingsContext.timeoutPerFunction);
@@ -341,7 +341,7 @@ void KleeRunner::processBatchWithInteractive(const std::vector<tests::TestMethod
341341
std::vector<std::string> tmp;
342342
ExecUtils::toCArgumentsPtr(argvData, tmp, cargv, cenvp, false);
343343

344-
LOG_S(DEBUG) << "Klee command :: " + StringUtils::joinWith(argvData, " ");
344+
LOG_S(DEBUG) << "Klee command: " + StringUtils::joinWith(argvData, " ");
345345
MEASURE_FUNCTION_EXECUTION_TIME
346346

347347
RunKleeTask task(cargv.size(),

server/src/printers/NativeMakefilePrinter.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,6 @@ namespace printer {
250250
}
251251

252252
compileCommand.setOptimizationLevel(OPTIMIZATION_FLAG);
253-
compileCommand.addEnvironmentVariable("C_INCLUDE_PATH", "$UTBOT_LAUNCH_INCLUDE_PATH");
254253
compileCommand.addFlagToBegin(FPIC_FLAG);
255254
compileCommand.addFlagsToBegin(SANITIZER_NEEDED_FLAGS);
256255
compileCommand.addFlagsToBegin(

server/src/tasks/BaseForkTask.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ ExecUtils::ExecutionResult BaseForkTask::run() {
7070
status = TIMEOUT_CODE;
7171
}
7272
if (!ignoreErrors && status && status != TIMEOUT_CODE) {
73-
LOG_S(ERROR) << "Exit status: " << status;
73+
LOG_S(ERROR) << "Exit status '" << processName << "': " << status;
74+
LOG_S(ERROR) << "Output: " << output;
7475
LOG_S(ERROR) << "See details in " << logFilePath;
7576
}
7677
LOG_IF_S(DEBUG, status == 0) << "Exit status: 0";

server/test/framework/TestUtils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ namespace testUtils {
325325
case CompilationUtils::CompilerName::GCC:
326326
return StringUtils::stringFormat(
327327
"rm -rf build_gcc && mkdir -p build_gcc && cd build_gcc && "
328-
"export CC=%s && export CXX=%s && export C_INCLUDE_PATH=$UTBOT_LAUNCH_INCLUDE_PATH",
328+
"export CC=%s && export CXX=%s",
329329
Paths::getGcc(), Paths::getGpp());
330330
case CompilationUtils::CompilerName::CLANG:
331331
return StringUtils::stringFormat(

0 commit comments

Comments
 (0)