Skip to content

Commit

Permalink
ci: fix autotest stuck on open '/tmp/yanet-dp.report'
Browse files Browse the repository at this point in the history
  • Loading branch information
Timur Aitov committed Jan 26, 2024
1 parent 2019ea5 commit 765f942
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 0 additions & 6 deletions autotest/autotest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1466,19 +1466,13 @@ void tAutotest::mainThread()
fflush(stdout);
fflush(stderr);

std::ofstream out("/tmp/yanet-dp.report");
out << dataPlane.getReport();

std::abort();
}

YANET_LOG_PRINT(ANSI_COLOR_GREEN "done '%s'\n\n" ANSI_COLOR_RESET, configFilePath.data());
fflush(stdout);
fflush(stderr);
}

std::ofstream out("/tmp/yanet-dp.report");
out << dataPlane.getReport();
}

void tAutotest::convert_ipv4Update(const std::string& string)
Expand Down
6 changes: 2 additions & 4 deletions autotest/yanet-autotest-run.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,13 @@ def start(self, dataplane_conf_path, units):
if self.p_autotest.returncode != 0:
self.kill_processes()
if self.debug:
with open("/tmp/yanet-dp.report", "r") as fin:
print(fin.read())
os.system("yanet-cli dontdoit podumoi dataplane report")
sys.exit(3)

if (self.p_dataplane.poll() != None) or (self.p_controlplane.poll() != None):
self.kill_processes()
if self.debug:
with open("/tmp/yanet-dp.report", "r") as fin:
print(fin.read())
os.system("yanet-cli dontdoit podumoi dataplane report")
sys.exit(4)

self.kill_processes()
Expand Down

0 comments on commit 765f942

Please sign in to comment.