Skip to content

Commit

Permalink
Merge pull request #3868 from Szelethus/add_cmdline_diff_tests
Browse files Browse the repository at this point in the history
[test] Add missing tests for cmdline diffing, and display a bug for tag diffs
  • Loading branch information
Szelethus authored Jul 7, 2023
2 parents f19abba + 44a1d19 commit 310311e
Show file tree
Hide file tree
Showing 4 changed files with 680 additions and 2 deletions.
9 changes: 7 additions & 2 deletions web/server/codechecker_server/api/mass_store_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -1323,10 +1323,15 @@ def store(self) -> int:
runtime = round(time.time() - start_time, 2)
zip_size_kb = round(zip_size / 1024)

tag_desc = ""
if self.__tag:
tag_desc = f", under tag '{self.__tag}'"

LOG.info("'%s' stored results (%s KB "
"/decompressed/) to run '%s' (id: %d) in "
"/decompressed/) to run '%s' (id: %d) %s in "
"%s seconds.", self.user_name,
zip_size_kb, self.__name, run_id, runtime)
zip_size_kb, self.__name, run_id, tag_desc,
runtime)

iso_start_time = datetime.fromtimestamp(
start_time).isoformat()
Expand Down
3 changes: 3 additions & 0 deletions web/tests/functional/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,7 @@
REPO_ROOT = os.path.abspath(os.environ['REPO_ROOT'])
PKG_ROOT = os.path.join(REPO_ROOT, 'build', 'CodeChecker')

os.environ["CC_DATA_FILES_DIR"] = PKG_ROOT
os.environ["CC_LIB_DIR"] = os.path.join(PKG_ROOT, "lib", "python3")

sys.path.append(os.path.join(PKG_ROOT, 'lib', 'python3'))
8 changes: 8 additions & 0 deletions web/tests/functional/diff_cmdline/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# coding=utf-8
# -------------------------------------------------------------------------
#
# Part of the CodeChecker project, under the Apache License v2.0 with
# LLVM Exceptions. See LICENSE for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
# -------------------------------------------------------------------------
Loading

0 comments on commit 310311e

Please sign in to comment.