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

Added Mac OS X support #7

Merged
merged 8 commits into from
Nov 11, 2014
Merged

Added Mac OS X support #7

merged 8 commits into from
Nov 11, 2014

Conversation

ptitvert
Copy link
Contributor

As promised here is the OS X Support, until I find the time for the other OS, like OpenBSD, FreeBSD and AIX.
And until I get also the time to add a bit more comments :-D

@dblock
Copy link
Collaborator

dblock commented Nov 10, 2014

First, this is fantastic.

Now, edit .travis.yml and set it up to also run on OSX, see this doc. It will also run this pull request, so we can make sure it works.

README needs an update, too.

Squash your commits.

@ptitvert
Copy link
Contributor Author

I hope I found how to do it, since this is my first try with Travis !! :-)

@dblock
Copy link
Collaborator

dblock commented Nov 11, 2014

It looks good. Unfortunately Travis is not accepting enabling OSX builds anymore for open-source projects, as per http://blog.travis-ci.com/2014-05-13-multi-os-feature-available, but I will see with them at some point :)

@dblock
Copy link
Collaborator

dblock commented Nov 11, 2014

I got this on my OSX laptop, haven't debugged (yet).

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running oshi.SystemInfoTest
Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.397 sec <<< FAILURE!
testGetProcessors(oshi.SystemInfoTest)  Time elapsed: 0.011 sec  <<< ERROR!
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.util.ArrayList.rangeCheck(ArrayList.java:653)
    at java.util.ArrayList.get(ArrayList.java:429)
    at oshi.util.ExecutingCommand.getFirstAnswer(ExecutingCommand.java:46)
    at oshi.software.os.mac.MacHardwareAbstractionLayer.getProcessors(MacHardwareAbstractionLayer.java:34)
    at oshi.SystemInfoTest.testGetProcessors(SystemInfoTest.java:35)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
    at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
    at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
    at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

Running oshi.util.FormatUtilTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 sec

Results :

Tests in error: 
  testGetProcessors(oshi.SystemInfoTest): Index: 0, Size: 0

@dblock
Copy link
Collaborator

dblock commented Nov 11, 2014

Closes #6.

dblock added a commit that referenced this pull request Nov 11, 2014
@dblock dblock merged commit 757f509 into oshi:master Nov 11, 2014
@dblock dblock mentioned this pull request Nov 11, 2014
@ptitvert
Copy link
Contributor Author

Thanks for the output, I've corrected it now. Should work for all version of OS-X... at least from 10.3 :-)

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.

None yet

2 participants