-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from fosslight/develop2
Add returning item parameter
- Loading branch information
Showing
5 changed files
with
56 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
click==6.7 | ||
scancode-toolkit<=21.3.31 | ||
typecode_libmagic | ||
XlsxWriter | ||
fosslight_util | ||
PyYAML | ||
PyYAML |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
# Copyright (c) 2020 LG Electronics Inc. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
import getopt | ||
import os | ||
import sys | ||
import json | ||
from datetime import datetime | ||
import logging | ||
import fosslight_util.constant as constant | ||
from fosslight_util.set_log import init_log | ||
from fosslight_source.run_scancode import run_scan | ||
|
||
logger = logging.getLogger(constant.LOGGER_NAME) | ||
|
||
|
||
def main(): | ||
global logger | ||
|
||
argv = sys.argv[1:] | ||
path_to_find_bin = os.path.abspath("test/test") | ||
start_time = datetime.now().strftime('%Y-%m-%d_%H-%M-%S') | ||
output_file_name = "" | ||
|
||
oss_report_name = "test_result_func_call/result" | ||
output_dir = os.path.dirname(os.path.abspath(output_file_name)) | ||
|
||
logger = init_log(os.path.join(output_dir, "fosslight_src_log_"+start_time+".txt")) | ||
|
||
ret = run_scan(path_to_find_bin, oss_report_name, True, -1, True) | ||
|
||
logger.warn("[Scan] Result: %s" % (ret[0])) | ||
logger.warn("[Scan] Result_msg: %s" % (ret[1])) | ||
|
||
if len(ret) > 2: | ||
try: | ||
for scan_item in ret[2]: | ||
logger.warn(scan_item.get_row_to_print()) | ||
except Exception as ex: | ||
logger.error("Error:"+str(ex)) | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters