* [AUTOTEST][PATCH 1/2] Subtest return test result.
@ 2011-06-13 16:26 Jiří Župka
2011-06-13 16:26 ` [AUTOTEST][PATCH 2/2] Extend base_job_unittest for support subtest change Jiří Župka
2011-06-14 0:31 ` [AUTOTEST][PATCH 1/2] Subtest return test result Lucas Meneghel Rodrigues
0 siblings, 2 replies; 4+ messages in thread
From: Jiří Župka @ 2011-06-13 16:26 UTC (permalink / raw)
To: kvm-autotest, kvm, autotest, lmr, ldoktor, akong; +Cc: jzupka
If subtest is successful runsubtest returns True otherwise False.
Signed-off-by: Jiří Župka <jzupka@redhat.com>
---
client/common_lib/test.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/client/common_lib/test.py b/client/common_lib/test.py
index d5564c3..5b2e12c 100644
--- a/client/common_lib/test.py
+++ b/client/common_lib/test.py
@@ -479,8 +479,8 @@ class base_test(object):
"""
dargs["profile_only"] = dargs.get("profile_only", False)
test_basepath = self.outputdir[len(self.job.resultdir + "/"):]
- self.job.run_test(url, master_testpath=test_basepath,
- *args, **dargs)
+ return self.job.run_test(url, master_testpath=test_basepath,
+ *args, **dargs)
def _get_nonstar_args(func):
--
1.7.4.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [AUTOTEST][PATCH 2/2] Extend base_job_unittest for support subtest change.
2011-06-13 16:26 [AUTOTEST][PATCH 1/2] Subtest return test result Jiří Župka
@ 2011-06-13 16:26 ` Jiří Župka
2011-06-14 0:32 ` Lucas Meneghel Rodrigues
2011-06-14 0:31 ` [AUTOTEST][PATCH 1/2] Subtest return test result Lucas Meneghel Rodrigues
1 sibling, 1 reply; 4+ messages in thread
From: Jiří Župka @ 2011-06-13 16:26 UTC (permalink / raw)
To: kvm-autotest, kvm, autotest, lmr, ldoktor, akong
Signed-off-by: Jiří Župka <jzupka@redhat.com>
---
client/common_lib/base_job_unittest.py | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/client/common_lib/base_job_unittest.py b/client/common_lib/base_job_unittest.py
index 503b62c..b98b01d 100755
--- a/client/common_lib/base_job_unittest.py
+++ b/client/common_lib/base_job_unittest.py
@@ -1334,6 +1334,26 @@ class test_job_tags(unittest.TestCase):
self.assertEqual(expected, actual)
+ def test_subtest_with_master_test_path_and_subdir(self):
+ self.assertEqual(
+ ('test9', 'subtestdir/test9.subdirtag', 'subdirtag'),
+ self.job._build_tagged_test_name('test9',
+ {'master_testpath': 'subtestdir',
+ 'subdir_tag': 'subdirtag'}))
+
+
+ def test_subtest_all_tag_components_together_subdir(self):
+ self.job.use_sequence_number = True
+ self.job.automatic_test_tag = 'auto'
+ expected = ('test10.tag._01_.auto',
+ 'subtestdir/test10.tag._01_.auto.subdir',
+ 'tag._01_.auto.subdir')
+ actual = self.job._build_tagged_test_name(
+ 'test10', {'tag': 'tag', 'subdir_tag': 'subdir',
+ 'master_testpath': 'subtestdir'})
+ self.assertEqual(expected, actual)
+
+
class test_make_outputdir(unittest.TestCase):
def setUp(self):
self.resultdir = tempfile.mkdtemp(suffix='unittest')
--
1.7.4.4
_______________________________________________
Autotest mailing list
Autotest@test.kernel.org
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [AUTOTEST][PATCH 1/2] Subtest return test result.
2011-06-13 16:26 [AUTOTEST][PATCH 1/2] Subtest return test result Jiří Župka
2011-06-13 16:26 ` [AUTOTEST][PATCH 2/2] Extend base_job_unittest for support subtest change Jiří Župka
@ 2011-06-14 0:31 ` Lucas Meneghel Rodrigues
1 sibling, 0 replies; 4+ messages in thread
From: Lucas Meneghel Rodrigues @ 2011-06-14 0:31 UTC (permalink / raw)
To: Jiří Župka; +Cc: autotest, kvm, kvm-autotest
On Mon, 2011-06-13 at 18:26 +0200, Jiří Župka wrote:
> If subtest is successful runsubtest returns True otherwise False.
Applied, thanks!
http://autotest.kernel.org/changeset/5421
> Signed-off-by: Jiří Župka <jzupka@redhat.com>
> ---
> client/common_lib/test.py | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/client/common_lib/test.py b/client/common_lib/test.py
> index d5564c3..5b2e12c 100644
> --- a/client/common_lib/test.py
> +++ b/client/common_lib/test.py
> @@ -479,8 +479,8 @@ class base_test(object):
> """
> dargs["profile_only"] = dargs.get("profile_only", False)
> test_basepath = self.outputdir[len(self.job.resultdir + "/"):]
> - self.job.run_test(url, master_testpath=test_basepath,
> - *args, **dargs)
> + return self.job.run_test(url, master_testpath=test_basepath,
> + *args, **dargs)
>
>
> def _get_nonstar_args(func):
_______________________________________________
Autotest mailing list
Autotest@test.kernel.org
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [AUTOTEST][PATCH 2/2] Extend base_job_unittest for support subtest change.
2011-06-13 16:26 ` [AUTOTEST][PATCH 2/2] Extend base_job_unittest for support subtest change Jiří Župka
@ 2011-06-14 0:32 ` Lucas Meneghel Rodrigues
0 siblings, 0 replies; 4+ messages in thread
From: Lucas Meneghel Rodrigues @ 2011-06-14 0:32 UTC (permalink / raw)
To: Jiří Župka; +Cc: autotest, kvm, kvm-autotest
On Mon, 2011-06-13 at 18:26 +0200, Jiří Župka wrote:
Applied, thanks!
http://autotest.kernel.org/changeset/5422
> Signed-off-by: Jiří Župka <jzupka@redhat.com>
> ---
> client/common_lib/base_job_unittest.py | 20 ++++++++++++++++++++
> 1 files changed, 20 insertions(+), 0 deletions(-)
>
> diff --git a/client/common_lib/base_job_unittest.py b/client/common_lib/base_job_unittest.py
> index 503b62c..b98b01d 100755
> --- a/client/common_lib/base_job_unittest.py
> +++ b/client/common_lib/base_job_unittest.py
> @@ -1334,6 +1334,26 @@ class test_job_tags(unittest.TestCase):
> self.assertEqual(expected, actual)
>
>
> + def test_subtest_with_master_test_path_and_subdir(self):
> + self.assertEqual(
> + ('test9', 'subtestdir/test9.subdirtag', 'subdirtag'),
> + self.job._build_tagged_test_name('test9',
> + {'master_testpath': 'subtestdir',
> + 'subdir_tag': 'subdirtag'}))
> +
> +
> + def test_subtest_all_tag_components_together_subdir(self):
> + self.job.use_sequence_number = True
> + self.job.automatic_test_tag = 'auto'
> + expected = ('test10.tag._01_.auto',
> + 'subtestdir/test10.tag._01_.auto.subdir',
> + 'tag._01_.auto.subdir')
> + actual = self.job._build_tagged_test_name(
> + 'test10', {'tag': 'tag', 'subdir_tag': 'subdir',
> + 'master_testpath': 'subtestdir'})
> + self.assertEqual(expected, actual)
> +
> +
> class test_make_outputdir(unittest.TestCase):
> def setUp(self):
> self.resultdir = tempfile.mkdtemp(suffix='unittest')
_______________________________________________
Autotest mailing list
Autotest@test.kernel.org
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-06-14 0:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-13 16:26 [AUTOTEST][PATCH 1/2] Subtest return test result Jiří Župka
2011-06-13 16:26 ` [AUTOTEST][PATCH 2/2] Extend base_job_unittest for support subtest change Jiří Župka
2011-06-14 0:32 ` Lucas Meneghel Rodrigues
2011-06-14 0:31 ` [AUTOTEST][PATCH 1/2] Subtest return test result Lucas Meneghel Rodrigues
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox