Skip to content

Commit d33b254

Browse files
[fix] Fix deviating fixed_at date, add separately runnable functional tests
Fix deviating fixed_at date for issue suppression which might caused issues in statistics graph. Add option to run analyzer and web functional tests separately.
1 parent 09f27e7 commit d33b254

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,12 @@ test_unit_cov_in_env:
236236
BUILD_DIR=$(BUILD_DIR) $(MAKE) -C $(CC_ANALYZER) test_unit_cov_in_env
237237
BUILD_DIR=$(BUILD_DIR) $(MAKE) -C $(CC_WEB) test_unit_cov_in_env
238238

239-
test_functional:
239+
test_functional: test_analyzer_functional test_web_functional
240+
241+
test_analyzer_functional:
240242
BUILD_DIR=$(BUILD_DIR) $(MAKE) -C $(CC_ANALYZER) test_functional
243+
244+
test_web_functional:
241245
BUILD_DIR=$(BUILD_DIR) $(MAKE) -C $(CC_WEB) test_functional
242246

243247
test_functional_in_env:

web/server/codechecker_server/api/mass_store_run.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,7 +1130,7 @@ def get_missing_file_ids(report: Report) -> List[str]:
11301130
# rules, only review status source code comments
11311131
if old_report and old_report.review_status in \
11321132
['false_positive', 'intentional']:
1133-
fixed_at = old_report.review_status_date
1133+
fixed_at = old_report.fixed_at
11341134
else:
11351135
fixed_at = run_history_time
11361136

@@ -1322,7 +1322,7 @@ def get_skip_handler(
13221322
# rules, only review status source code comments
13231323
if old_report and old_report.review_status in \
13241324
['false_positive', 'intentional']:
1325-
fixed_at = old_report.review_status_date
1325+
fixed_at = old_report.fixed_at
13261326
else:
13271327
fixed_at = run_history_time
13281328

web/tests/functional/review_status/test_review_status.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -885,14 +885,13 @@ def get_report():
885885
self.assertEqual(report.fixedAt, fixed_at)
886886

887887
# A reopened and false positive report gets its "fixed at" date from
888-
# ReviewStatus table. This is the date when the false positive review
889-
# status was assigned to this bug.
888+
# where the false positive status firstly given.
890889

891890
setup_test_project(3)
892891
report = get_report()
893892
self.assertEqual(report.detectionStatus, DetectionStatus.REOPENED)
894893
self.assertEqual(report.reviewData.status, ReviewStatus.FALSE_POSITIVE)
895-
self.assertNotEqual(report.fixedAt, fixed_at)
894+
self.assertEqual(report.fixedAt, fixed_at)
896895

897896
# Setting its review status to confirmed makes it outstanding.
898897

0 commit comments

Comments
 (0)