[moblab] pass part_id, bug_id to memqual via test args
Currently part_id, bug_id are passed via suite args. This
complicates the pipeline, as it needs to delay processing
until the suite job has been uploaded. Pass the 2 variables
via test args, so that the memqual pipeline is not dependent
on the suite job.
BUG=b:92031054
TEST=run memqual on local device, verify that part_id, bug_id
are written to the keyval
Change-Id: I2dbd86c3db092bb2fea0cf76e3db93bd0a38ad2b
Reviewed-on: https://chromium-review.googlesource.com/1249615
Commit-Ready: Matt Mallett <mattmallett@chromium.org>
Tested-by: Matt Mallett <mattmallett@chromium.org>
Reviewed-by: Keith Haddow <haddowk@chromium.org>
diff --git a/server/site_tests/sequences/control.memory_qual_moblab b/server/site_tests/sequences/control.memory_qual_moblab
index 56cf1b2..7ff79ab 100644
--- a/server/site_tests/sequences/control.memory_qual_moblab
+++ b/server/site_tests/sequences/control.memory_qual_moblab
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+from autotest_lib.client.common_lib import utils
+
AUTHOR = "puthik"
NAME = "MemoryQual.moblab"
ATTRIBUTES = "suite:memory_qual"
@@ -64,6 +66,14 @@
client.reboot()
job.run_test(test, client_ip=machine, **argv)
+keyval = dict()
+try:
+ keyval['bug_id'] = bug_id
+ keyval['part_id'] = part_id
+except NameError:
+ # bug_id and/or part_id variables not defined
+ pass
+utils.write_keyval(job.resultdir, keyval)
job.parallel_on_machines(run_client_test, machines)
parallel_simple(run_server_test, machines)
diff --git a/server/site_tests/sequences/control.memory_qual_quick b/server/site_tests/sequences/control.memory_qual_quick
index daa5f1a..e75b77a 100644
--- a/server/site_tests/sequences/control.memory_qual_quick
+++ b/server/site_tests/sequences/control.memory_qual_quick
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+from autotest_lib.client.common_lib import utils
+
AUTHOR = "puthik"
NAME = "MemoryQual.quick"
ATTRIBUTES = "suite:memory_qual_quick"
@@ -49,6 +51,14 @@
client.reboot()
job.run_test(test, client_ip=machine, **argv)
+keyval = dict()
+try:
+ keyval['bug_id'] = bug_id
+ keyval['part_id'] = part_id
+except NameError:
+ # bug_id and/or part_id variables not defined
+ pass
+utils.write_keyval(job.resultdir, keyval)
job.parallel_on_machines(run_client_test, machines)
parallel_simple(run_server_test, machines)