Skip to content

Commit

Permalink
Merge pull request Ericsson#3213 from csordasmarton/fix_duplicate_war…
Browse files Browse the repository at this point in the history
…ning_in_failed_zip

[analyze] Fix duplication warning when creating failed zip
  • Loading branch information
bruntib authored Feb 24, 2021
2 parents 4a1fcdf + 116979c commit fef103a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions analyzer/tests/functional/analyze/test_analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,8 @@ def test_failure(self):
errcode = process.returncode
self.assertEqual(errcode, 3)

self.assertNotIn("UserWarning: Duplicate name", err)

# We expect a failure archive to be in the failed directory.
failed_files = os.listdir(failed_dir)
self.assertEqual(len(failed_files), 1)
Expand Down
3 changes: 3 additions & 0 deletions analyzer/tests/functional/analyze/test_files/failure.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#include "includes/simple.h"
#include "includes/../includes/simple.h"

int main(void){
return 0;
xxx //will cause a compilation error
Expand Down
3 changes: 2 additions & 1 deletion tools/tu_collector/tu_collector/tu_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,8 @@ def add_sources_to_zip(zip_file, files):

with zipfile.ZipFile(zip_file, 'a') as archive:
for f in files:
archive_path = os.path.join('sources-root', f.lstrip(os.sep))
archive_path = os.path.normpath(
os.path.join('sources-root', f.lstrip(os.sep)))

try:
archive.getinfo(archive_path)
Expand Down

0 comments on commit fef103a

Please sign in to comment.