Skip to content

Commit

Permalink
Merge pull request #423 from openxc/vmthreadingfix
Browse files Browse the repository at this point in the history
Vmthreadingfix
  • Loading branch information
pjt0620 committed Dec 5, 2019
2 parents 776b075 + 158bed9 commit c41c393
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
15 changes: 14 additions & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,25 @@
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"

def total_cpus
require 'etc'
Etc.nprocessors
end

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# For a complete reference, please see the online documentation at
# vagrantup.com.

# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "bento/ubuntu-18.04"
config.vm.box_version = "201912.03.0"
config.vm.provider :virtualbox do |v|
if total_cpus > 1
v.cpus = total_cpus - 1
else
v.cpus = 1
end
end

# Check for proxy enviroment variable and set it
if ENV['HTTP_PROXY'] || ENV['HTTPS_PROXY']
Expand All @@ -31,7 +44,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
end
end


config.vm.box_download_insecure = true
config.vm.provision "shell", privileged: false, keep_color: true do |s|
s.inline = "ln -fs /vagrant vi-firmware;"
s.inline += "VAGRANT=1 vi-firmware/script/bootstrap.sh"
Expand Down
6 changes: 3 additions & 3 deletions fabfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,9 @@ def test(long=False):

with(lcd("src")):
if long in (True, 'True', 'true'):
local("PLATFORM=TESTING make -j4 test_long")
local("PLATFORM=TESTING make -j1 test_long")
else:
local("PLATFORM=TESTING make -j4 test")
local("PLATFORM=TESTING make -j1 test")

@task
def functional_test_flash(skip_flashing=False):
Expand Down Expand Up @@ -338,7 +338,7 @@ def build(capture=False, do_clean=False):
with lcd("%s/src" % env.root_dir):
if do_clean:
clean();
output = local("%s make -j4" % options, capture=capture)
output = local("%s make -j1 " % options, capture=capture)
if output.failed:
puts(output)
abort(red("Building %s failed" % board_options['name']))
Expand Down

0 comments on commit c41c393

Please sign in to comment.