Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Windows for package testing #32

Merged
merged 3 commits into from
Nov 2, 2020
Merged

Support Windows for package testing #32

merged 3 commits into from
Nov 2, 2020

Conversation

taldcroft
Copy link
Member

@taldcroft taldcroft commented Oct 27, 2020

Description

This makes the testr + ska_testr pair work on Windows. Key changes:

  • Use subprocess.run for testing on Windows, but still use pexpect on linux / Mac to support bash test scripts (and for consistency with historical behavior).
  • Drop support for overwriting an existing test output directory. I don't think this was being used. This change was needed to get rid of a call to rsync.
  • Drop support for a get_version_id bash script that makes the test directory name. Instead just hardwire something reasonable into testr.
    • Note that a path name that includes colons breaks both Windows and the Ska.engarchive regression test, so colon is changed to dash.
  • PEP8 fixes.

Testing

  • [N/A] Passes unit tests on MacOS, linux, Windows.
  • Functional testing

Functional testing

Windows

The following runs to completion and gives the expected results. There are some fails that have the correct diagnostic information and passes that look good.

python -m testr.packages --root C:\Users\aldcroft\git/ska_testr --test-spec=test_spec_SKA3

I did not verify the output of the XML test results. Most likely things are OK, but this will be done as part of getting automated Windows CI running.

Linux (HEAD)

The following runs to completion and gives the expected results.

python -m testr.packages --root ~/git/ska_testr --include=agasc --include=Ska.engarchive --include=acisfp_check

Fixes #31

@taldcroft taldcroft changed the title WIP support Windows Support Windows for package testing Nov 1, 2020
@taldcroft taldcroft requested a review from javierggt November 1, 2020 12:58
@taldcroft
Copy link
Member Author

taldcroft commented Nov 1, 2020

after removing the get_version_id scripts, where are logs placed now?

The only thing different is using testr.packages.get_version_id() instead of running a bash script ska_testr/get_version_id. So should be an easy change, and arguably a better implementation.

@taldcroft taldcroft merged commit 7ca7cc4 into master Nov 2, 2020
@taldcroft taldcroft deleted the windows-support branch November 2, 2020 15:39
@javierggt javierggt mentioned this pull request Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow tests to run on Windows
1 participant