Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Enable deactivated tests for Windows #246

Merged
merged 13 commits into from
Aug 19, 2021
Merged

Enable deactivated tests for Windows #246

merged 13 commits into from
Aug 19, 2021

Conversation

justahero
Copy link
Contributor

@justahero justahero commented Aug 16, 2021

This PR enables a number of tests to run on Windows, which were previously only tested on Unix-like systems.

  • use dirs crate to obtain the OS specific home directory for some of the tests
  • refactor building of paths by using PathBuf::join

Fixes #227

justahero and others added 6 commits August 16, 2021 11:59
Duplicate the test to check behaviour on Windows. This also uses the
[dirs](https://github.com/dirs-dev/dirs-rs) crate to get the user's
home directory, e.g. `C:\Users\<user>\`.

It also looks like the
This refactors the code to use `PathBuf::join` to create paths from.
@justahero justahero marked this pull request as draft August 16, 2021 13:30
justahero and others added 3 commits August 16, 2021 15:44
* prepend home directory to have an absolute path on Unix & Windows
@justahero justahero changed the title Activate some tests for Windows Enable deactivated tests for Windows Aug 16, 2021
src/dep/mod.rs Outdated Show resolved Hide resolved
src/dep/mod.rs Outdated Show resolved Hide resolved
src/dep/mod.rs Outdated Show resolved Hide resolved
src/dep/mod.rs Outdated Show resolved Hide resolved
src/dep/mod.rs Outdated Show resolved Hide resolved
src/dep/rust_std.rs Outdated Show resolved Hide resolved
src/dep/rust_std.rs Outdated Show resolved Hide resolved
src/dep/rustc.rs Outdated Show resolved Hide resolved
src/dep/rustc.rs Outdated Show resolved Hide resolved
src/dep/rustc.rs Outdated Show resolved Hide resolved
* deref `path` instead of calling `.as_path()`
* use `PathBuf::from` instead of `PathBuf::new`
@justahero justahero marked this pull request as ready for review August 17, 2021 08:49
@Urhengulas
Copy link
Member

bors r+

@bors
Copy link
Contributor

bors bot commented Aug 19, 2021

Build succeeded:

@bors bors bot merged commit f32a73d into main Aug 19, 2021
@bors bors bot deleted the fix-windows-tests branch August 19, 2021 15:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cargo tests fails on windows
2 participants