Skip to content

Commit 48d68c9

Browse files
committed
Add shell option in ubuntu tests
Signed-off-by: yongjunhong <[email protected]>
1 parent f02c365 commit 48d68c9

File tree

9 files changed

+9
-9
lines changed

9 files changed

+9
-9
lines changed

tests/pytest/package_manager/test_android.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
@pytest.mark.ubuntu
1616
def test_ubuntu(input_path, output_path, extra_args):
1717
command = f"fosslight_dependency -p {input_path} -o {output_path} {extra_args}"
18-
result = subprocess.run(command, capture_output=True, text=True)
18+
result = subprocess.run(command, shell=True, capture_output=True, text=True)
1919
assert result.returncode == 0, f"Command failed: {command}\nstdout: {result.stdout}\nstderr: {result.stderr}"
2020
assert any(os.scandir(output_path)), f"Output file does not exist: {output_path}"
2121

tests/pytest/package_manager/test_cocoapods.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
@pytest.mark.ubuntu
1414
def test_ubuntu(input_path, output_path, extra_args):
1515
command = f"fosslight_dependency -p {input_path} -o {output_path} {extra_args}"
16-
result = subprocess.run(command, capture_output=True, text=True)
16+
result = subprocess.run(command, shell=True, capture_output=True, text=True)
1717
assert result.returncode == 0, f"Command failed: {command}\nstdout: {result.stdout}\nstderr: {result.stderr}"
1818
assert any(os.scandir(output_path)), f"Output file does not exist: {output_path}"

tests/pytest/package_manager/test_gradle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
@pytest.mark.ubuntu
1717
def test_ubuntu(input_path, output_path):
1818
command = f"fosslight_dependency -p {input_path} -o {output_path}"
19-
result = subprocess.run(command, capture_output=True, text=True)
19+
result = subprocess.run(command, shell=True, capture_output=True, text=True)
2020
assert result.returncode == 0, f"Command failed: {command}\nstdout: {result.stdout}\nstderr: {result.stderr}"
2121
assert any(os.scandir(output_path)), f"Output file does not exist: {output_path}"
2222

tests/pytest/package_manager/test_helm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
@pytest.mark.ubuntu
1414
def test_ubuntu(input_path, output_path, extra_args):
1515
command = f"fosslight_dependency -p {input_path} -o {output_path} {extra_args}"
16-
result = subprocess.run(command, capture_output=True, text=True)
16+
result = subprocess.run(command, shell=True, capture_output=True, text=True)
1717
assert result.returncode == 0, f"Command failed: {command}\nstdout: {result.stdout}\nstderr: {result.stderr}"
1818
assert any(os.scandir(output_path)), f"Output file does not exist: {output_path}"

tests/pytest/package_manager/test_maven.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
@pytest.mark.ubuntu
1717
def test_ubuntu(input_path, output_path):
1818
command = f"fosslight_dependency -p {input_path} -o {output_path}"
19-
result = subprocess.run(command, capture_output=True, text=True)
19+
result = subprocess.run(command, shell=True, capture_output=True, text=True)
2020
assert result.returncode == 0, f"Command failed: {command}\nstdout: {result.stdout}\nstderr: {result.stderr}"
2121
assert any(os.scandir(output_path)), f"Output file does not exist: {output_path}"
2222

tests/pytest/package_manager/test_npm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
@pytest.mark.ubuntu
1515
def test_ubuntu(input_path, output_path, extra_args):
1616
command = f"fosslight_dependency -p {input_path} -o {output_path} {extra_args}"
17-
result = subprocess.run(command, capture_output=True, text=True)
17+
result = subprocess.run(command, shell=True, capture_output=True, text=True)
1818
assert result.returncode == 0, f"Command failed: {command}\nstdout: {result.stdout}\nstderr: {result.stderr}"
1919
assert any(os.scandir(output_path)), f"Output file does not exist: {output_path}"

tests/pytest/package_manager/test_nuget.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
@pytest.mark.ubuntu
2222
def test_ubuntu(input_path, output_path):
2323
command = f"fosslight_dependency -p {input_path} -o {output_path}"
24-
result = subprocess.run(command, capture_output=True, text=True)
24+
result = subprocess.run(command, shell=True, capture_output=True, text=True)
2525
assert result.returncode == 0, f"Command failed: {command}\nstdout: {result.stdout}\nstderr: {result.stderr}"
2626
assert any(os.scandir(output_path)), f"Output file does not exist: {output_path}"
2727

tests/pytest/package_manager/test_pub.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
@pytest.mark.ubuntu
1717
def test_ubuntu(input_path, output_path):
1818
command = f"fosslight_dependency -p {input_path} -o {output_path}"
19-
result = subprocess.run(command, capture_output=True, text=True)
19+
result = subprocess.run(command, shell=True, capture_output=True, text=True)
2020
assert result.returncode == 0, f"Command failed: {command}\nstdout: {result.stdout}\nstderr: {result.stderr}"
2121
assert any(os.scandir(output_path)), f"Output file does not exist: {output_path}"
2222

tests/pytest/package_manager/test_pypi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@pytest.mark.ubuntu
1818
def test_ubuntu(input_path, output_path, extra_args):
1919
command = f"fosslight_dependency -p {input_path} -o {output_path} {extra_args}"
20-
result = subprocess.run(command, capture_output=True, text=True)
20+
result = subprocess.run(command, shell=True, capture_output=True, text=True)
2121
assert result.returncode == 0, f"Command failed: {command}\nstdout: {result.stdout}\nstderr: {result.stderr}"
2222
assert any(os.scandir(output_path)), f"Output file does not exist: {output_path}"
2323

0 commit comments

Comments
 (0)