Commit 895387ec authored by anonym's avatar anonym

Bump RAM for single scenario to make it pass.

With the default 2 GiB of RAM this scenario otherwise fails: during
the "I can open the Additional Software documentation from the
notification" step, Tor Browser starts and is displayed, but the
system then freezes for 10-30 minutes (or indefinitely) due to low
memory (yay for Linux over-commit strategy!) while trying to load the
desired page.
parent 4d8f71fd
......@@ -10,7 +10,17 @@ Feature: Additional software
# dependencies (which are documented below).
Scenario: I am warned I can not use Additional Software when I start Tails from a DVD and install a package
Given I have started Tails from DVD and logged in with an administration password and the network is connected
Given a computer
And the computer has 2650 MiB of RAM
And the network is unplugged
And I start the computer
And the computer boots Tails
And I set an administration password
And I log in to a new session
And the network is plugged
And Tor is ready
And all notifications have disappeared
And available upgrades have been checked
And I update APT using apt
When I install "sslh" using apt
Then I am notified I can not use Additional Software for "sslh"
......
......@@ -48,6 +48,10 @@ Given /^a computer$/ do
$vm = VM.new($virt, VM_XML_PATH, $vmnet, $vmstorage, DISPLAY)
end
Given /^the computer has (\d+) ([[:alpha:]]+) of RAM$/ do |size, unit|
$vm.set_ram_size(size, unit)
end
Given /^the computer is set to boot from the Tails DVD$/ do
$vm.set_cdrom_boot(TAILS_ISO)
end
......
......@@ -394,6 +394,16 @@ class VM
return list
end
def set_ram_size(size, unit = "KiB")
raise "System memory can only be added to inactive vms" if is_running?
domain_xml = REXML::Document.new(@domain.xml_desc)
domain_xml.elements['domain/memory'].text = size
domain_xml.elements['domain/memory'].attributes['unit'] = unit
domain_xml.elements['domain/currentMemory'].text = size
domain_xml.elements['domain/currentMemory'].attributes['unit'] = unit
update(domain_xml.to_s)
end
def set_os_loader(type)
if is_running?
raise "boot settings can only be set for inactive vms"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment