Closed Bug 1012833 Opened 11 years ago Closed 11 years ago

Negatus should build on Mac OS X

Categories

(Testing Graveyard :: SUTAgent, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sydpolk, Assigned: sydpolk)

References

Details

Attachments

(1 obsolete file)

We are going to need the agent to run on all supported platforms. This report is for Negatus to build and run on Mac OS X.
Assignee: nobody → mcote
Attached patch 0001-Support-Mac-OS-X.patch (obsolete) — Splinter Review
Mark, I have added a Makefile, and changed the server code to report Mac OS X on the Mac. I have also added instructions in README.md for building on Linux and Mac.
Assignee: mcote → spolk
Attachment #8425045 - Flags: review?(mcote)
Comment on attachment 8425045 [details] [diff] [review] 0001-Support-Mac-OS-X.patch Review of attachment 8425045 [details] [diff] [review]: ----------------------------------------------------------------- So this works fine, but on a standard OS X installation there will be problems using DeviceManagerSUT.getFile() from the mozdevice Python package. It expects the md5sum util to exist and provide the same output as on a Linux system. I think this is probably out of scope here, though... but I'm not sure of the best way to fix it, unless we provide a simple md5sum command or something. A few little nits to fix on commit. ::: README.md @@ +56,5 @@ > + > +The linux build requires the nspr libraries and headers. On Ubuntu, you can do > + > + sudo apt-get install git g++ libnspr4-dev > + Remove trailing spaces. Also not sure if you need to list git explicitly... pretty obvious if you want to get the code, and if you don't know to install git ahead of time, you probably need a lot more help. :) @@ +60,5 @@ > + > +Build with: > + > + make -f Makefile.linux > + And here. @@ +69,5 @@ > +Prerequisites - Mac OS X > + > +You need to have the latest version of Xcode (available from the App Store) and the > +command line developer tools packages installed. You will have to build your own > +nsrp Mac installation, available at And here. Also "nsrp" -> "nspr". @@ +76,5 @@ > +The default nspr build installed nspr to /usr/local, the Mac Makefile assumes that you > +have done that. To build Negatus, do: > + > + make -f Makefile.macosx > + And here. ::: src/CommandEventHandler.cpp @@ +463,5 @@ > { > // not really supported yet. Best we could do is > // cat /system/sources.xml | grep gaia and another grep for m-c > +#if defined(__apple_build_version__) > + return std::string("macosx"); Fix indentation.
Attachment #8425045 - Flags: review?(mcote) → review+
You are right about md5sum; I installed it with homebrew. Ideally, there should be a longterm solution which calls the builtin md5 function on the Mac. Let me play with that.
Comment on attachment 8425045 [details] [diff] [review] 0001-Support-Mac-OS-X.patch Sorry, I was mistaken: md5sum is executed from within Negatus, in Hash.cpp specifically. I think you should modify it to correctly use the OS X md5 command.
Attachment #8425045 - Flags: review+ → review-
Pull request was modified on GitHub and then merged in (with fix for bug 1012855): https://github.com/mozilla/Negatus/commit/cd0bdf1ad6ff4205b4ec4229faf3d7fabbed23e3 I did some trivial whitespace cleanup in a subsequent commit: https://github.com/mozilla/Negatus/commit/ea382a7da8b572d2369c6d10be9c80568e4d61c8
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Attachment #8425045 - Attachment is obsolete: true
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: