Skip to content

Commit 63c9039

Browse files
committed
fix auto target detection
1 parent b0926f2 commit 63c9039

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

.github/workflows/build-utbot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ jobs:
153153

154154
build-portable-container:
155155
needs: build-utbot-and-generate-test
156-
runs-on: ubuntu-latest
156+
runs-on: ubuntu-20
157157
env:
158158
DOCKER_IMAGE_TAG: docker-image
159159
PORTABLE_CONTAINER_NAME: Portable

server/src/building/TargetBuildDatabase.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ TargetBuildDatabase::TargetBuildDatabase(BuildDatabase *baseBuildDatabase, const
1010
if (Paths::isSourceFile(targetOrSourcePath)) {
1111
target = baseBuildDatabase->getRootForSource(targetOrSourcePath);
1212
} else if (targetOrSourcePath == GrpcUtils::UTBOT_AUTO_TARGET_PATH || targetOrSourcePath.empty()) {
13+
isAutoTarget = true;
1314
if (sourceFile.has_value()) {
1415
target = baseBuildDatabase->getRootForSource(sourceFile.value());
1516
} else {
@@ -25,7 +26,6 @@ TargetBuildDatabase::TargetBuildDatabase(BuildDatabase *baseBuildDatabase, const
2526
}
2627

2728
LOG_S(INFO) << StringUtils::stringFormat("Chosen target: %s", target);
28-
isAutoTarget = target == GrpcUtils::UTBOT_AUTO_TARGET_PATH;
2929

3030
{
3131
auto objectFilesList = baseBuildDatabase->getArchiveObjectFiles(target);

server/src/building/TargetBuildDatabase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class TargetBuildDatabase : public BuildDatabase {
88
private:
99
fs::path target;
10-
bool isAutoTarget;
10+
bool isAutoTarget = false;
1111

1212
public:
1313
TargetBuildDatabase(BuildDatabase *baseBuildDatabase, const std::string &targetOrSourcePath,

0 commit comments

Comments
 (0)