Message ID | 7c14834269583764af3beb2e811ac62bec3a2c96.1248102188.git.mgoldish@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Mon, Jul 20, 2009 at 12:07 PM, Michael Goldish<mgoldish@redhat.com> wrote: > The name 'debug_dir' makes it clearer that it corresponds to test.debugdir. Applied. > Signed-off-by: Michael Goldish <mgoldish@redhat.com> > --- > Â client/tests/kvm/kvm_guest_wizard.py | Â 20 ++++++++++---------- > Â 1 files changed, 10 insertions(+), 10 deletions(-) > > diff --git a/client/tests/kvm/kvm_guest_wizard.py b/client/tests/kvm/kvm_guest_wizard.py > index 2dd9be5..143e61e 100644 > --- a/client/tests/kvm/kvm_guest_wizard.py > +++ b/client/tests/kvm/kvm_guest_wizard.py > @@ -18,7 +18,7 @@ def handle_var(vm, params, varname): > > > Â def barrier_2(vm, words, fail_if_stuck_for, stuck_detection_history, > - Â Â Â Â Â Â Â output_dir, data_scrdump_filename, current_step_num): > + Â Â Â Â Â Â Â debug_dir, data_scrdump_filename, current_step_num): > Â Â if len(words) < 7: > Â Â Â Â logging.error("Bad barrier_2 command line") > Â Â Â Â return False > @@ -34,12 +34,12 @@ def barrier_2(vm, words, fail_if_stuck_for, stuck_detection_history, > Â Â if sleep_duration < 1.0: sleep_duration = 1.0 > Â Â if sleep_duration > 10.0: sleep_duration = 10.0 > > - Â Â scrdump_filename = os.path.join(output_dir, "scrdump.ppm") > - Â Â cropped_scrdump_filename = os.path.join(output_dir, "cropped_scrdump.ppm") > - Â Â expected_scrdump_filename = os.path.join(output_dir, "scrdump_expected.ppm") > - Â Â expected_cropped_scrdump_filename = os.path.join(output_dir, > + Â Â scrdump_filename = os.path.join(debug_dir, "scrdump.ppm") > + Â Â cropped_scrdump_filename = os.path.join(debug_dir, "cropped_scrdump.ppm") > + Â Â expected_scrdump_filename = os.path.join(debug_dir, "scrdump_expected.ppm") > + Â Â expected_cropped_scrdump_filename = os.path.join(debug_dir, > Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â "cropped_scrdump_expected.ppm") > - Â Â comparison_filename = os.path.join(output_dir, "comparison.ppm") > + Â Â comparison_filename = os.path.join(debug_dir, "comparison.ppm") > > Â Â end_time = time.time() + timeout > Â Â end_time_stuck = time.time() + fail_if_stuck_for > @@ -99,7 +99,7 @@ def barrier_2(vm, words, fail_if_stuck_for, stuck_detection_history, > Â Â Â Â prev_whole_image_md5sums.insert(0, whole_image_md5sum) > Â Â Â Â # Limit queue length to stuck_detection_history > Â Â Â Â prev_whole_image_md5sums = \ > - Â Â Â Â prev_whole_image_md5sums[:stuck_detection_history] > + Â Â Â Â Â Â Â Â prev_whole_image_md5sums[:stuck_detection_history] > > Â Â Â Â # Sleep for a while > Â Â Â Â time.sleep(sleep_duration) > @@ -113,12 +113,12 @@ def barrier_2(vm, words, fail_if_stuck_for, stuck_detection_history, > Â Â Â Â logging.info(message) > Â Â Â Â return False > Â Â else: > - Â Â Â Â # Collect information and put it in output_dir > + Â Â Â Â # Collect information and put it in debug_dir > Â Â Â Â if data_scrdump_filename and os.path.exists(data_scrdump_filename): > Â Â Â Â Â Â # Read expected screendump image > Â Â Â Â Â Â (ew, eh, edata) = \ > Â Â Â Â Â Â ppm_utils.image_read_from_ppm_file(data_scrdump_filename) > - Â Â Â Â Â Â # Write it in output_dir > + Â Â Â Â Â Â # Write it in debug_dir > Â Â Â Â Â Â ppm_utils.image_write_to_ppm_file(expected_scrdump_filename, > Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â ew, eh, edata) > Â Â Â Â Â Â # Write the cropped version as well > @@ -131,7 +131,7 @@ def barrier_2(vm, words, fail_if_stuck_for, stuck_detection_history, > Â Â Â Â Â Â Â Â ppm_utils.image_write_to_ppm_file(comparison_filename, w, h, > Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â data) > Â Â Â Â # Print error messages and fail the test > - Â Â Â Â long_message = message + "\n(see analysis at %s)" % output_dir > + Â Â Â Â long_message = message + "\n(see analysis at %s)" % debug_dir > Â Â Â Â logging.error(long_message) > Â Â Â Â raise error.TestFail, message > > -- > 1.5.4.1 > > _______________________________________________ > Autotest mailing list > Autotest@test.kernel.org > http://test.kernel.org/cgi-bin/mailman/listinfo/autotest >
diff --git a/client/tests/kvm/kvm_guest_wizard.py b/client/tests/kvm/kvm_guest_wizard.py index 2dd9be5..143e61e 100644 --- a/client/tests/kvm/kvm_guest_wizard.py +++ b/client/tests/kvm/kvm_guest_wizard.py @@ -18,7 +18,7 @@ def handle_var(vm, params, varname): def barrier_2(vm, words, fail_if_stuck_for, stuck_detection_history, - output_dir, data_scrdump_filename, current_step_num): + debug_dir, data_scrdump_filename, current_step_num): if len(words) < 7: logging.error("Bad barrier_2 command line") return False @@ -34,12 +34,12 @@ def barrier_2(vm, words, fail_if_stuck_for, stuck_detection_history, if sleep_duration < 1.0: sleep_duration = 1.0 if sleep_duration > 10.0: sleep_duration = 10.0 - scrdump_filename = os.path.join(output_dir, "scrdump.ppm") - cropped_scrdump_filename = os.path.join(output_dir, "cropped_scrdump.ppm") - expected_scrdump_filename = os.path.join(output_dir, "scrdump_expected.ppm") - expected_cropped_scrdump_filename = os.path.join(output_dir, + scrdump_filename = os.path.join(debug_dir, "scrdump.ppm") + cropped_scrdump_filename = os.path.join(debug_dir, "cropped_scrdump.ppm") + expected_scrdump_filename = os.path.join(debug_dir, "scrdump_expected.ppm") + expected_cropped_scrdump_filename = os.path.join(debug_dir, "cropped_scrdump_expected.ppm") - comparison_filename = os.path.join(output_dir, "comparison.ppm") + comparison_filename = os.path.join(debug_dir, "comparison.ppm") end_time = time.time() + timeout end_time_stuck = time.time() + fail_if_stuck_for @@ -99,7 +99,7 @@ def barrier_2(vm, words, fail_if_stuck_for, stuck_detection_history, prev_whole_image_md5sums.insert(0, whole_image_md5sum) # Limit queue length to stuck_detection_history prev_whole_image_md5sums = \ - prev_whole_image_md5sums[:stuck_detection_history] + prev_whole_image_md5sums[:stuck_detection_history] # Sleep for a while time.sleep(sleep_duration) @@ -113,12 +113,12 @@ def barrier_2(vm, words, fail_if_stuck_for, stuck_detection_history, logging.info(message) return False else: - # Collect information and put it in output_dir + # Collect information and put it in debug_dir if data_scrdump_filename and os.path.exists(data_scrdump_filename): # Read expected screendump image (ew, eh, edata) = \ ppm_utils.image_read_from_ppm_file(data_scrdump_filename) - # Write it in output_dir + # Write it in debug_dir ppm_utils.image_write_to_ppm_file(expected_scrdump_filename, ew, eh, edata) # Write the cropped version as well @@ -131,7 +131,7 @@ def barrier_2(vm, words, fail_if_stuck_for, stuck_detection_history, ppm_utils.image_write_to_ppm_file(comparison_filename, w, h, data) # Print error messages and fail the test - long_message = message + "\n(see analysis at %s)" % output_dir + long_message = message + "\n(see analysis at %s)" % debug_dir logging.error(long_message) raise error.TestFail, message
The name 'debug_dir' makes it clearer that it corresponds to test.debugdir. Signed-off-by: Michael Goldish <mgoldish@redhat.com> --- client/tests/kvm/kvm_guest_wizard.py | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-)