forked from fosslight/fosslight_util
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
92 lines (87 loc) · 2.88 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Copyright (c) 2021 LG Electronics
# SPDX-License-Identifier: Apache-2.0
[tox]
envlist = test_run
skipdist = true
[testenv]
install_command = pip install {opts} {packages}
allowlist_externals = cat
ls
setenv =
PYTHONPATH=.
[flake8]
max-line-length = 130
exclude = .tox/*
[pytest]
filterwarnings = ignore::DeprecationWarning
norecursedirs = test_result/*
[testenv:test_run]
commands =
# Test - logging
python tests/test_log.py
ls test_result
cat test_result/log_file1.txt
# Test - writing text
python tests/test_text.py
cat test_result/txt/test.txt
# Test - writing excel and csv
python tests/test_excel_and_csv.py
ls test_result/excel_and_csv/
cat test_result/excel_and_csv/FOSSLight-Report_SRC.csv
cat test_result/excel_and_csv/FOSSLight-Report_BIN_TEST.csv
cat test_result/excel_and_csv/FOSSLight-Report_CUSTOM_HEADER_SHEET.csv
cat test_result/excel_and_csv/csv/Test_Csv.csv
# Test - downloading source
fosslight_download -s "https://github.com/LGE-OSS/example" -t test_git/
ls test_git/
fosslight_download -s "https://pypi.org/project/fosslight-dependency/3.0.5/" -t test_wget -d test_logs
fosslight_download -s "https://www.npmjs.com/package/json-schema/v/0.3.0" -t test_wget -d test_logs
fosslight_download -s "https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind/2.12.2" -t test_wget -d test_logs
fosslight_download -s "https://pub.dev/packages/file/versions/5.2.1" -t test_wget -d test_logs
ls test_wget/
# Test - write output file
python tests/test_output_format.py
# Test - get spdx licenses
python tests/test_spdx_licenses.py
# Test - convert excel to yaml
python tests/test_convert_to_yaml.py
cat test_result/convert/fosslight-sbom-info.yaml
[testenv:release]
deps =
-r{toxinidir}/requirements-dev.txt
wheel = true
commands =
# Test - print help msg
python tests/test_help.py
# Test - logging
python tests/test_log.py
ls test_result
cat test_result/log_file1.txt
# Test - writing text
python tests/test_text.py
cat test_result/txt/test.txt
# Test - writing excel
python tests/test_excel_and_csv.py
ls test_result/excel_and_csv/
cat test_result/excel_and_csv/FOSSLight-Report_SRC.csv
cat test_result/excel_and_csv/FOSSLight-Report_BIN_TEST.csv
cat test_result/excel_and_csv/FOSSLight-Report_CUSTOM_HEADER_SHEET.csv
cat test_result/excel_and_csv/csv/Test_Csv.csv
# Test - writing opossum
python tests/test_opossum.py
ls test_result/opossum
# Test - writing yaml
python tests/test_yaml.py
cat test_result/yaml/FL-TEST_yaml.yaml
cat test_result/yaml/FL-TEST2_yaml.yaml
# Test - timer
python tests/test_timer.py
# Test - downloading source
python tests/test_download.py
ls test_result/download
# Test - write output file
python tests/test_output_format.py
# Test - get spdx licenses
python tests/test_spdx_licenses.py
# Test - check PEP8
pytest -v --flake8