Skip to content

Commit b8c8c3f

Browse files
committed
Add custom marker for window and ubuntu
Signed-off-by: yongjunhong <[email protected]>
1 parent 30f7c36 commit b8c8c3f

File tree

11 files changed

+37
-11
lines changed

11 files changed

+37
-11
lines changed

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ requirements-parser
1010
defusedxml
1111
packageurl-python
1212
igraph
13-
matplotlib
13+
matplotlib
14+
pytest

tests/pytest/package_manager/test_android.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
# -*- coding: utf-8 -*-
33
# Copyright (c) 2021 LG Electronics Inc.
44
# SPDX-License-Identifier: Apache-2.0
5-
import os.path
5+
import os
6+
import pytest
67

78
UBUNTU_COMMANDS = [
89
"fosslight_dependency -p tests/test_android -o tests/result/android -m android"
@@ -15,12 +16,14 @@
1516
WINDOW_COMMANDS = [f"{DIST_PATH} -p {INPUT_PATH} -o {OUTPUT_PATH}"]
1617

1718

19+
@pytest.mark.ubuntu
1820
def test_ubuntu(run_command):
1921
for command in UBUNTU_COMMANDS:
2022
return_code, stdout, stderr = run_command(command)
2123
assert return_code == 0, f"Command failed: {command}\nstdout: {stdout}\nstderr: {stderr}"
2224

2325

26+
@pytest.mark.windows
2427
def test_windows(run_command):
2528
for command in WINDOW_COMMANDS:
2629
return_code, stdout, stderr = run_command(command)

tests/pytest/package_manager/test_carthage.py renamed to tests/pytest/package_manager/test_cocoapods.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
# -*- coding: utf-8 -*-
33
# Copyright (c) 2021 LG Electronics Inc.
44
# SPDX-License-Identifier: Apache-2.0
5+
import pytest
56

67
UBUNTU_COMMANDS = [
7-
"fosslight_dependency -p tests/test_carthage -o tests/result/carthage -m carthage"
8+
"fosslight_dependency -p tests/test_cocoapods -o tests/result/cocoapods -m cocoapods"
89
]
910

1011

12+
@pytest.mark.ubuntu
1113
def test_ubuntu(run_command):
1214
for command in UBUNTU_COMMANDS:
1315
return_code, stdout, stderr = run_command(command)

tests/pytest/package_manager/test_gradle.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# Copyright (c) 2021 LG Electronics Inc.
44
# SPDX-License-Identifier: Apache-2.0
55
import os
6+
import pytest
67

78
UBUNTU_COMMANDS = [
89
"fosslight_dependency -p tests/test_gradle/jib -o tests/result/gradle",
@@ -21,12 +22,14 @@
2122
]
2223

2324

25+
@pytest.mark.ubuntu
2426
def test_ubuntu(run_command):
2527
for command in UBUNTU_COMMANDS:
2628
return_code, stdout, stderr = run_command(command)
2729
assert return_code == 0, f"Command failed: {command}\nstdout: {stdout}\nstderr: {stderr}"
2830

2931

32+
@pytest.mark.windows
3033
def test_windows(run_command):
3134
for command in WINDOW_COMMANDS:
3235
return_code, stdout, stderr = run_command(command)

tests/pytest/package_manager/test_helm.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
# -*- coding: utf-8 -*-
33
# Copyright (c) 2021 LG Electronics Inc.
44
# SPDX-License-Identifier: Apache-2.0
5+
import pytest
56

67
UBUNTU_COMMANDS = [
78
"fosslight_dependency -p tests/test_helm -o tests/result/helm -m helm"
89
]
910

1011

12+
@pytest.mark.ubuntu
1113
def test_ubuntu(run_command):
1214
for command in UBUNTU_COMMANDS:
1315
return_code, stdout, stderr = run_command(command)

tests/pytest/package_manager/test_maven.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
# -*- coding: utf-8 -*-
33
# Copyright (c) 2021 LG Electronics Inc.
44
# SPDX-License-Identifier: Apache-2.0
5-
import os.path
5+
import os
6+
import pytest
67

78
UBUNTU_COMMANDS = [
89
"fosslight_dependency -p tests/test_maven1/lombok.maven -o tests/result/maven1",
@@ -16,12 +17,14 @@
1617
WINDOW_COMMANDS = [f"{DIST_PATH} -p {INPUT_PATH} -o {OUTPUT_PATH} -m maven"]
1718

1819

20+
@pytest.mark.ubuntu
1921
def test_ubuntu(run_command):
2022
for command in UBUNTU_COMMANDS:
2123
return_code, stdout, stderr = run_command(command)
2224
assert return_code == 0, f"Command failed: {command}\nstdout: {stdout}\nstderr: {stderr}"
2325

2426

27+
@pytest.mark.windows
2528
def test_windows(run_command):
2629
for command in WINDOW_COMMANDS:
2730
return_code, stdout, stderr = run_command(command)

tests/pytest/package_manager/test_npm.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
# -*- coding: utf-8 -*-
33
# Copyright (c) 2021 LG Electronics Inc.
44
# SPDX-License-Identifier: Apache-2.0
5+
import pytest
56

67
UBUNTU_COMMANDS = [
78
"fosslight_dependency -p tests/test_npm1 -o tests/result/npm1",
89
"fosslight_dependency -p tests/test_npm2 -o tests/result/npm2 -m npm"
910
]
1011

1112

13+
@pytest.mark.ubuntu
1214
def test_ubuntu(run_command):
1315
for command in UBUNTU_COMMANDS:
1416
return_code, stdout, stderr = run_command(command)

tests/pytest/package_manager/test_nuget.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
# -*- coding: utf-8 -*-
33
# Copyright (c) 2021 LG Electronics Inc.
44
# SPDX-License-Identifier: Apache-2.0
5-
import os.path
5+
import os
6+
import pytest
67

78
UBUNTU_COMMANDS = [
89
"fosslight_dependency -p tests/test_nuget -o tests/result/nuget1",
@@ -21,12 +22,14 @@
2122
]
2223

2324

25+
@pytest.mark.ubuntu
2426
def test_ubuntu(run_command):
2527
for command in UBUNTU_COMMANDS:
2628
return_code, stdout, stderr = run_command(command)
2729
assert return_code == 0, f"Command failed: {command}\nstdout: {stdout}\nstderr: {stderr}"
2830

2931

32+
@pytest.mark.windows
3033
def test_windows(run_command):
3134
for command in WINDOW_COMMANDS:
3235
return_code, stdout, stderr = run_command(command)

tests/pytest/package_manager/test_pub.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
# -*- coding: utf-8 -*-
33
# Copyright (c) 2021 LG Electronics Inc.
44
# SPDX-License-Identifier: Apache-2.0
5-
import os.path
5+
import os
6+
import pytest
67

78
UBUNTU_COMMANDS = [
89
"fosslight_dependency -p tests/test_pub -o tests/result/pub",
@@ -22,12 +23,14 @@
2223
]
2324

2425

26+
@pytest.mark.ubuntu
2527
def test_ubuntu(run_command):
2628
for command in UBUNTU_COMMANDS:
2729
return_code, stdout, stderr = run_command(command)
2830
assert return_code == 0, f"Command failed: {command}\nstdout: {stdout}\nstderr: {stderr}"
2931

3032

33+
@pytest.mark.windows
3134
def test_windows(run_command):
3235
for command in WINDOW_COMMANDS:
3336
return_code, stdout, stderr = run_command(command)

tests/pytest/package_manager/test_pypi.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
# -*- coding: utf-8 -*-
33
# Copyright (c) 2021 LG Electronics Inc.
44
# SPDX-License-Identifier: Apache-2.0
5-
import os.path
5+
import os
6+
import pytest
67

78
UBUNTU_COMMANDS = [
89
"fosslight_dependency -p tests/test_pypi -o tests/result/pypi",
@@ -17,12 +18,14 @@
1718
WINDOW_COMMANDS = [f"{DIST_PATH} -p {INPUT_PATH} -o {OUTPUT_PATH}"]
1819

1920

21+
@pytest.mark.ubuntu
2022
def test_ubuntu(run_command):
2123
for command in UBUNTU_COMMANDS:
2224
return_code, stdout, stderr = run_command(command)
2325
assert return_code == 0, f"Command failed: {command}\nstdout: {stdout}\nstderr: {stderr}"
2426

2527

28+
@pytest.mark.windows
2629
def test_windows(run_command):
2730
for command in WINDOW_COMMANDS:
2831
return_code, stdout, stderr = run_command(command)

0 commit comments

Comments
 (0)