Fix Linux 'platform status' command. Its output is now closer to that on Mac OS X

- resolves llvm.org/pr14806

Patch by Matthew Sorrels!

llvm-svn: 182030
This commit is contained in:
Daniel Malea 2013-05-16 17:52:04 +00:00
parent 072d47b67f
commit 3be69dac8d
2 changed files with 7 additions and 6 deletions

View File

@ -336,12 +336,14 @@ PlatformLinux::GetStatus (Stream &strm)
{
struct utsname un;
if (uname(&un)) {
strm << "Linux";
return;
}
Platform::GetStatus(strm);
strm << un.sysname << ' ' << un.release << ' ' << un.version << '\n';
if (uname(&un))
return;
strm.Printf (" Kernel: %s\n", un.sysname);
strm.Printf (" Release: %s\n", un.release);
strm.Printf (" Version: %s\n", un.version);
}
size_t

View File

@ -27,7 +27,6 @@ class PlatformCommandTestCase(TestBase):
self.expect("platform process info", error=True,
substrs = ['one or more process id(s) must be specified'])
@expectedFailureLinux # due to llvm.org/pr14806 -- "platform status" prints more information on Mac OS X than on Linux
def test_status(self):
self.expect("platform status",
substrs = ['Platform', 'Triple', 'OS Version', 'Kernel', 'Hostname'])