Message ID | a50cf5ab0907122310r1d76d203pc63913fee8933516@mail.gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Mon, Jul 13, 2009 at 3:10 AM, sudhir kumar<smalikphy@gmail.com> wrote: > This patch creates a link to the results html file generated by the test > under autotest. This is specific to the kvm part only. The assumption made is > that the file name is <test_name>_results.html and it is located under > <test_name>/results/ directory. This helps in quickly viewing the test results. Looks good to me. > The attached tar file contains the full results directory. The results.html file > points to ltp_results.html which looks quite fancy. > > Please have a look at the results and the patch and provide your comments. > > Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> > > Index: autotest/client/tests/kvm/kvm_tests.py > =================================================================== > --- autotest.orig/client/tests/kvm/kvm_tests.py > +++ autotest/client/tests/kvm/kvm_tests.py > @@ -391,6 +391,15 @@ def run_autotest(test, params, env): > Â Â if not vm.scp_from_remote("autotest/results/default/*", guest_results_dir): > Â Â Â Â logging.error("Could not copy results back from guest") > > + Â Â # Some tests create html file as a result, link it to be viewed under > + Â Â # the results statistics. We assume this file is located under > + Â Â # test_name/results/ directory and named as test_name_results.html, > + Â Â # e.g. ltp_result.html, vmmstress_results.html > + Â Â html_file = test_name + "_results.html" > + Â Â html_path = os.path.join(guest_results_dir, test_name, "results", > html_file) > + Â Â if os.path.exists(html_path): > + Â Â Â Â os.symlink(html_path, os.path.join(test.debugdir, html_file)) > + > Â Â # Fail the test if necessary > Â Â if status_fail: > Â Â Â Â raise error.TestFail(message_fail) > > > > -- > Sudhir Kumar > _______________________________________________ > Autotest mailing list > Autotest@test.kernel.org > http://test.kernel.org/cgi-bin/mailman/listinfo/autotest >
Index: autotest/client/tests/kvm/kvm_tests.py =================================================================== --- autotest.orig/client/tests/kvm/kvm_tests.py +++ autotest/client/tests/kvm/kvm_tests.py @@ -391,6 +391,15 @@ def run_autotest(test, params, env): if not vm.scp_from_remote("autotest/results/default/*", guest_results_dir): logging.error("Could not copy results back from guest") + # Some tests create html file as a result, link it to be viewed under + # the results statistics. We assume this file is located under + # test_name/results/ directory and named as test_name_results.html, + # e.g. ltp_result.html, vmmstress_results.html + html_file = test_name + "_results.html" + html_path = os.path.join(guest_results_dir, test_name, "results", html_file) + if os.path.exists(html_path): + os.symlink(html_path, os.path.join(test.debugdir, html_file)) + # Fail the test if necessary if status_fail:
This patch creates a link to the results html file generated by the test under autotest. This is specific to the kvm part only. The assumption made is that the file name is <test_name>_results.html and it is located under <test_name>/results/ directory. This helps in quickly viewing the test results. The attached tar file contains the full results directory. The results.html file points to ltp_results.html which looks quite fancy. Please have a look at the results and the patch and provide your comments. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> raise error.TestFail(message_fail)