@@ -132,6 +132,7 @@ def test_install_dirty_flag(arguments, expected): |
132 | 132 | assert args.dirty == expected |
133 | 133 |
|
134 | 134 |
|
| 135 | +@pytest.mark.not_on_windows("Windows logger I/O operation on closed file") |
135 | 136 | def test_package_output(capsys, install_mockery, mock_fetch): |
136 | 137 | """ |
137 | 138 | Ensure output printed from pkgs is captured by output redirection. |
@@ -141,7 +142,7 @@ def test_package_output(capsys, install_mockery, mock_fetch): |
141 | 142 | # when nested AND in pytest |
142 | 143 | spec = spack.concretize.concretize_one("printing-package") |
143 | 144 | pkg = spec.package |
144 | | - PackageInstaller([pkg], explicit=True, verbose=True, tests=sys.platform != "win32").install() |
| 145 | + PackageInstaller([pkg], explicit=True, verbose=True, tests=True).install() |
145 | 146 |
|
146 | 147 | with gzip.open(pkg.install_log_path, "rt") as f: |
147 | 148 | out = f.read() |
@@ -151,16 +152,15 @@ def test_package_output(capsys, install_mockery, mock_fetch): |
151 | 152 | assert "BEFORE INSTALL" in out |
152 | 153 | assert "AFTER INSTALL" in out |
153 | 154 |
|
154 | | - if not sys.platform == "win32": |
155 | | - # Check that install-time test log contains check and installcheck output |
156 | | - log_path = pkg.tester.archived_install_test_log |
157 | | - assert os.path.exists(log_path), f"Missing install-time test log at {log_path}" |
| 155 | + # Check that install-time test log contains check and installcheck output |
| 156 | + log_path = pkg.tester.archived_install_test_log |
| 157 | + assert os.path.exists(log_path), f"Missing install-time test log at {log_path}" |
158 | 158 |
|
159 | | - with open(log_path, "r", encoding="utf-8") as f: |
160 | | - test_log_contents = f.read() |
| 159 | + with open(log_path, "r", encoding="utf-8") as f: |
| 160 | + test_log_contents = f.read() |
161 | 161 |
|
162 | | - assert "PRINTING PACKAGE CHECK" in test_log_contents |
163 | | - assert "PRINTING PACKAGE INSTALLCHECK" in test_log_contents |
| 162 | + assert "PRINTING PACKAGE CHECK" in test_log_contents |
| 163 | + assert "PRINTING PACKAGE INSTALLCHECK" in test_log_contents |
164 | 164 |
|
165 | 165 |
|
166 | 166 | @pytest.mark.disable_clean_stage_check |
|