Skip to content

Commit

Permalink
[make] Package warning-to-plist converter
Browse files Browse the repository at this point in the history
  • Loading branch information
csordasmarton committed Jan 15, 2020
1 parent 6d1a928 commit c743b57
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ script:
make clean_travis &&
make package &&
make -C tools/plist_to_html test &&
make -C tools/warning-to-plist test &&
make -C tools/warning-to-plist package test &&
if [[ "$CC_MODULE" = "analyzer" ]]; then
BUILD_DIR=$TRAVIS_BUILD_DIR/build make -C analyzer \
test_unit \
Expand Down
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,17 @@ package_tu_collector: build_tu_collector package_dir_structure
cd $(CC_BUILD_DIR) && \
ln -sf ../lib/python2.7/tu_collector/tu_collector.py bin/tu_collector

package: package_dir_structure set_git_commit_template package_plist_to_html package_tu_collector
build_warning_to_plist:
$(MAKE) -C $(ROOT)/tools/warning-to-plist build

package_warning_to_plist: build_warning_to_plist package_dir_structure
# Copy tu_collector files.
cp -rp $(CC_TOOLS)/warning-to-plist/build/warning_to_plist/warning_to_plist $(CC_BUILD_LIB_DIR) && \
chmod u+x $(CC_BUILD_LIB_DIR)/warning_to_plist/WarningToPlist.py && \
cd $(CC_BUILD_DIR) && \
ln -sf ../lib/python2.7/warning_to_plist/WarningToPlist.py bin/warning-to-plist

package: package_dir_structure set_git_commit_template package_plist_to_html package_tu_collector package_warning_to_plist
BUILD_DIR=$(BUILD_DIR) BUILD_LOGGER_64_BIT_ONLY=$(BUILD_LOGGER_64_BIT_ONLY) $(MAKE) -C $(CC_ANALYZER) package_analyzer
BUILD_DIR=$(BUILD_DIR) $(MAKE) -C $(CC_WEB) package_web

Expand Down
29 changes: 24 additions & 5 deletions tools/warning-to-plist/warning_to_plist/WarningToPlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,30 @@
import shutil
import sys

from .converter.clang_tidy.plist_converter import ClangTidyPlistConverter
from .converter.sanitizers.address.plist_converter import ASANPlistConverter
from .converter.sanitizers.memory.plist_converter import MSANPlistConverter
from .converter.sanitizers.thread.plist_converter import TSANPlistConverter
from .converter.sanitizers.ub.plist_converter import UBSANPlistConverter
try:
from .converter.clang_tidy.plist_converter import \
ClangTidyPlistConverter
from .converter.sanitizers.address.plist_converter import \
ASANPlistConverter
from .converter.sanitizers.memory.plist_converter import \
MSANPlistConverter
from .converter.sanitizers.thread.plist_converter import \
TSANPlistConverter
from .converter.sanitizers.ub.plist_converter import \
UBSANPlistConverter
except ValueError:
# Attempted relative import in non-package.
from converter.clang_tidy.plist_converter import \
ClangTidyPlistConverter
from converter.sanitizers.address.plist_converter import \
ASANPlistConverter
from converter.sanitizers.memory.plist_converter import \
MSANPlistConverter
from converter.sanitizers.thread.plist_converter import \
TSANPlistConverter
from converter.sanitizers.ub.plist_converter import \
UBSANPlistConverter


LOG = logging.getLogger('WarningToPlist')

Expand Down

0 comments on commit c743b57

Please sign in to comment.