Skip to content

Commit

Permalink
Unhide pytest output by removing dotfile directory (#3631)
Browse files Browse the repository at this point in the history
Prior to this PR, output from pytest was generally hidden
by placing it in the .pytest directory.

After this PR, that .pytest directory is now pytest-parsl.

Most immediately, a breaking change in the GitHub actions
artifact upload has started respecting that dotfile
hiddenness, and so with that version of the artifact uploader,
test runs prior to this PR are missing a bunch of output.
actions/upload-artifact#602

The uploader now has an option to enable hidden files...

but ...

.. before this most immediate motivation, I've run into
a couple of developer experience cases that look like:

  Q: I cannot find the output of pytest
  A: We have deliberately made it hard for you to find

which is enough to make me rename the directory rather than
turn on the artifact uploader hidden files option.
  • Loading branch information
benclifford authored Oct 10, 2024
1 parent fd73930 commit 8356233
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
export PARSL_TEST_PRESERVE_NUM_RUNS=7
make test
ln -s .pytest/parsltest-current test_runinfo
ln -s pytest-parsl/parsltest-current test_runinfo
- name: Documentation checks
run: |
Expand All @@ -80,11 +80,11 @@ jobs:
# database manager log file or monitoring router log file. It would be better if
# the tests themselves failed immediately when there was a monitoring error, but
# in the absence of that, this is a dirty way to check.
bash -c '! grep ERROR .pytest/parsltest-current/runinfo*/*/database_manager.log'
bash -c '! grep ERROR .pytest/parsltest-current/runinfo*/*/monitoring_router.log'
bash -c '! grep ERROR pytest-parsl/parsltest-current/runinfo*/*/database_manager.log'
bash -c '! grep ERROR pytest-parsl/parsltest-current/runinfo*/*/monitoring_router.log'
# temporary; until test-matrixification
rm -f .pytest/parsltest-current test_runinfo
rm -f pytest-parsl/parsltest-current test_runinfo
- name: Checking parsl-visualize
run: |
Expand All @@ -105,6 +105,6 @@ jobs:
name: runinfo-${{ matrix.python-version }}-${{ steps.job-info.outputs.as-ascii }}-${{ github.sha }}
path: |
runinfo/
.pytest/
pytest-parsl/
ci_job_info.txt
compression-level: 9
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ coverage.xml
*.cover
.hypothesis/
/.pytest/
/pytest-parsl/

# Translations
*.mo
Expand Down
2 changes: 1 addition & 1 deletion parsl/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def _chmod(path: pathlib.Path, mode: int):

config = re.sub(r"[^A-z0-9_-]+", "_", pytestconfig.getoption('config')[0])
cwd = pathlib.Path(os.getcwd())
pytest_dir = cwd / ".pytest"
pytest_dir = cwd / "pytest-parsl"
pytest_dir.mkdir(mode=0o700, parents=True, exist_ok=True)

test_dir_prefix = "parsltest-"
Expand Down

0 comments on commit 8356233

Please sign in to comment.