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 testing framework #1

Merged
merged 1 commit into from
Feb 2, 2018

Conversation

andrewkroh
Copy link
Member

This adds the beginnings of a Vagrant based testing framework. It's important for this project to have a good way to test and develop across a wide range of operating system. More OSes will be added later this is just enough to vet that the framework works.

Usage example:

cd testing
make setup     # Boot VMs and install Go
make           # Run go test in each VM and write output to this host.
vim *TEST.out  # View test output from all OSes

Due to licensing the Windows boxes are private to the Elastic org on Vagrant cloud.

This adds the beginnings of a Vagrant based testing framework. It's important for this project to have a good way to test and develop across a wide range of operating system. More OSes will be added later this is just enough to vet that the framework works.

Usage example:

```
cd testing
make setup     # Boot VMs and install Go
make           # Run go test in each VM and write output to this host.
vim *TEST.out  # View test output from all OSes
```

Due to licensing the Windows boxes are private to the Elastic org on Vagrant cloud.
Copy link
Contributor

@ruflin ruflin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WFG

@andrewkroh andrewkroh merged commit 92fba7e into elastic:master Feb 2, 2018
@andrewkroh andrewkroh deleted the feature/vagrant-testing branch February 7, 2018 19:03
redanthrax referenced this pull request in redanthrax/go-sysinfo Aug 4, 2022
* Add HostInfo support for FreeBSD

Initial implementation of HostInfo for FreeBSD platforms.

* Use os.SameFile to compare cwds

On some platforms (e.g. FreeBSD) user home directories are symlinks
and os.Getcwd will return the symlink path.

On FreeBSD CWD for processes that's not the running process will not
give the symlink but the resolved path causing the test to fail at this
point.

Fix is to use the os.SameFile call to resolve both Os.Getcwd and CWD.

* Add basic support for ProcessInfo on FreeBSD.

Implement Process(), Self() and Processes() to the bare minimum.
That is passing all basic tests.

* Add support for OpenHandleEnumerator and OpenHandleCounter.

* Add support for Environment

* Review fixes.

- Fix issue on FreeBSD 12.
- Minor cosmetic issues.

* Clean up build process.

- Remove cgo build directives from things not needing it.
- Add linker flags into .go files.
sarog pushed a commit to jetrmm/go-sysinfo that referenced this pull request Mar 20, 2024
Make disabled CGO work, replace pkg/errors usage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants