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

Add a check on windows part, to exec commands on a non cygwin environment #77

Merged

Conversation

oskar-flores
Copy link
Contributor

When a PSwindows node neither rm nor /dev/null will work. This is a way to fix this (probably not the best one...)

@oskar-flores oskar-flores changed the title Add a check on windows part, to exec commads on a non cywing environment Add a check on windows part, to exec commands on a non cygwin environment Dec 18, 2015
@puppetlabs-jenkins
Copy link
Contributor

Can one of the admins verify this patch?

@DavidS
Copy link
Contributor

DavidS commented Dec 18, 2015

Thanks for your contribution! I would suggest putting both alternatives into the if like this:

if node.is_cygwin?
  delete_command = 'rm -f'
  redirection = '< /dev/null'
else
  # ...
end
on node, "#{delete_command} script1.ps"

That cleans up that a little bit. Also adjusting the comment at https://github.com/puppetlabs/beaker-rspec/pull/77/files#diff-befb1733680f635c46fc0aad3de0ba18R248 would be good.

@oskar-flores
Copy link
Contributor Author

Cleaned up a little bit.

Humm, thinking a little bit, should we change the class name from BeakerCygwin to something more descriptive like, BeakerWindows?

@DavidS
Copy link
Contributor

DavidS commented Dec 18, 2015

Renaming the class sounds like a good idea, now that it's not cygwin specific. I hope that nothing depends on the class name.

@kevpl
Copy link
Contributor

kevpl commented Jan 5, 2016

@puppetlabs-jenkins test this please

@puppetlabs-jenkins
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
http://jenkins-beaker.delivery.puppetlabs.net//job/qe_beaker-rspec_btc-intn-sys/29/
Test PASSed.

kevpl added a commit that referenced this pull request Jan 5, 2016
…-node

Add a check on windows part, to exec commands on a non cygwin environment
@kevpl kevpl merged commit a617f7b into voxpupuli:master Jan 5, 2016
petems added a commit to petems/puppet-windowsfeature that referenced this pull request Jun 9, 2016
* No longer need to use fork! Work has been pushed upstream properly
* Update sync file with changes
* Bump to 5.4.0 beaker-rspec to fix Powershell issue (voxpupuli/beaker-rspec#77)
petems added a commit to petems/puppet-windowsfeature that referenced this pull request Jun 9, 2016
* No longer need to use fork! Work has been pushed upstream properly
* Update sync file with changes
* Bump to 5.4.0 beaker-rspec to fix Powershell issue (voxpupuli/beaker-rspec#77)
petems added a commit to petems/puppet-windowsfeature that referenced this pull request Jun 15, 2016
* No longer need to use fork! Work has been pushed upstream properly
* Update sync file with changes
* Bump to 5.4.0 beaker-rspec to fix Powershell issue (voxpupuli/beaker-rspec#77)
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.

4 participants