Increase timeout for Linux tests.
They were timing out on Jenkins, as it is slower than Kokoro.
Change-Id: I5d43a06d9d7c093b6a3011b9c80fb0553a653daf
diff --git a/kokoro/test.sh b/kokoro/test.sh
index 803add7..58cb302 100755
--- a/kokoro/test.sh
+++ b/kokoro/test.sh
@@ -109,5 +109,5 @@
"${HFTEST_CPU[@]}" hafnium --initrd test/vmapi/arch/aarch64/gicv3/gicv3_test
"${HFTEST_CPU[@]}" hafnium --initrd test/vmapi/primary_only/primary_only_test
"${HFTEST_CPU[@]}" hafnium --initrd test/vmapi/primary_with_secondaries/primary_with_secondaries_test
- "${HFTEST_CPU[@]}" hafnium --initrd test/linux/linux_test --vm_args "rdinit=/test_binary --"
+ "${HFTEST_CPU[@]}" hafnium --initrd test/linux/linux_test --force-long-running --vm_args "rdinit=/test_binary --"
done
diff --git a/test/hftest/hftest.py b/test/hftest/hftest.py
index e3ee493..a84dda5 100755
--- a/test/hftest/hftest.py
+++ b/test/hftest/hftest.py
@@ -427,11 +427,12 @@
available tests and driving their execution."""
def __init__(self, artifacts, driver, image_name, suite_regex, test_regex,
- skip_long_running_tests):
+ skip_long_running_tests, force_long_running):
self.artifacts = artifacts
self.driver = driver
self.image_name = image_name
self.skip_long_running_tests = skip_long_running_tests
+ self.force_long_running = force_long_running
self.suite_re = re.compile(suite_regex or ".*")
self.test_re = re.compile(test_regex or ".*")
@@ -450,7 +451,7 @@
def get_test_json(self):
"""Invoke the test platform and request a JSON of available test and
test suites."""
- out = self.driver.run("json", "json", False)
+ out = self.driver.run("json", "json", self.force_long_running)
hf_out = "\n".join(self.extract_hftest_lines(out))
try:
return json.loads(hf_out)
@@ -513,7 +514,7 @@
out = self.extract_hftest_lines(self.driver.run(
log_name, "run {} {}".format(suite["name"], test["name"]),
- test["is_long_running"]))
+ test["is_long_running"] or self.force_long_running))
if self.is_passed_test(out):
print(" PASS")
@@ -589,6 +590,7 @@
parser.add_argument("--serial-baudrate", type=int, default=115200)
parser.add_argument("--serial-no-init-wait", action="store_true")
parser.add_argument("--skip-long-running-tests", action="store_true")
+ parser.add_argument("--force-long-running", action="store_true")
parser.add_argument("--cpu",
help="Selects the CPU configuration for the run environment.")
parser.add_argument("--tfa", action="store_true")
@@ -622,7 +624,7 @@
# Create class which will drive test execution.
runner = TestRunner(artifacts, driver, image_name, args.suite, args.test,
- args.skip_long_running_tests)
+ args.skip_long_running_tests, args.force_long_running)
# Run tests.
runner_result = runner.run_tests()