mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
tooling: use term.header for tests
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
|
||||
module runtime
|
||||
|
||||
import os
|
||||
|
||||
//$if linux {
|
||||
fn C.sysconf(name int) i64
|
||||
//}
|
||||
@@ -19,6 +21,16 @@ pub fn nr_cpus() int {
|
||||
return nr_cpus_nix()
|
||||
}
|
||||
|
||||
pub fn nr_jobs() int {
|
||||
mut cpus := nr_cpus()
|
||||
// allow for overrides, for example using `VJOBS=32 ./v test .`
|
||||
vjobs := os.getenv('VJOBS').int()
|
||||
if vjobs > 0 {
|
||||
cpus = vjobs
|
||||
}
|
||||
return cpus
|
||||
}
|
||||
|
||||
pub fn is_32bit() bool {
|
||||
mut x := false
|
||||
$if x32 { x = true }
|
||||
|
Reference in New Issue
Block a user