projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
d6b98e8
)
Use subprocess.Popen instead of popen2 to stop a deprecation warning when running...
author
Jordy Rose
<jediknil@belkadan.com>
Sat, 2 Jul 2011 17:28:55 +0000
(17:28 +0000)
committer
Jordy Rose
<jediknil@belkadan.com>
Sat, 2 Jul 2011 17:28:55 +0000
(17:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134324
91177308
-0d34-0410-b5e6-
96231b3b80d8
utils/lit/lit/Util.py
patch
|
blob
|
history
diff --git
a/utils/lit/lit/Util.py
b/utils/lit/lit/Util.py
index 5635f50baef337f25f67bc44cbae505b1d40c608..226e453f2859f4a419ed3465eb33b208e37aaffa 100644
(file)
--- a/
utils/lit/lit/Util.py
+++ b/
utils/lit/lit/Util.py
@@
-12,7
+12,7
@@
def detectCPUs():
if isinstance(ncpus, int) and ncpus > 0:
return ncpus
else: # OSX:
- return int(
os.popen2("sysctl -n hw.ncpu")[1].read(
))
+ return int(
capture(['sysctl', '-n', 'hw.ncpu']
))
# Windows:
if os.environ.has_key("NUMBER_OF_PROCESSORS"):
ncpus = int(os.environ["NUMBER_OF_PROCESSORS"])