Test names are too long

Bug #1297500 reported by Chris Gregan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox GUI (Legacy)
Fix Released
Critical
Brendan Donegan

Bug Description

Build Version/Date: 1.8 Beta
Environment used for testing: Precise

Summary:
Test names are really long all of a sudden "2013.com.canonical.certification;;mediacard/sdhc-performance-manual" for instance.

Steps to Reproduce:
1) Launch latest build in precise
2) Select Media Card tests
3) Begin testing

Expected result:
Names for tests are not longer than they were in previous release

Actual result:
Names for tests include unneccesary information

Related branches

Chris Gregan (cgregan)
Changed in checkbox-ihv-ng:
status: New → Confirmed
importance: Undecided → Critical
assignee: nobody → Daniel Manrique (roadmr)
milestone: none → version1.8
Revision history for this message
Daniel Manrique (roadmr) wrote :

Hi Chris,

This was a consequence of job namespacing and i18n. Jobs now have a "summary" attribute that will be translatable and contain a short description to be show in user interfaces. Unfortunately we haven't added this to all the existing jobs, and I don't think we've propagated this to the upper UI layers so that checkbox-gui shows these summaries instead of the job name.

I'll think of ways to solve this in our allotted timeframe.

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

This is pretty trivial to fix. Instead of using job.name, we should use job.partial_id, or if we really want to fix this, go and provide a summary field to all jobs and use that instead. Then we'll have *readable* names for the first time.

Thanks
ZK

Revision history for this message
Daniel Manrique (roadmr) wrote :

Given time constraints, I'll probably go for partial_id. Thanks for the pointer!

Daniel Manrique (roadmr)
Changed in checkbox-ihv-ng:
status: Confirmed → In Progress
Revision history for this message
Daniel Manrique (roadmr) wrote :

Once plainbox is exporting the summary, this patch to testitemmodel.cpp uses the summary if the test has one (decided by whether the summary is different from the id), otherwise it uses partial_id.

=== modified file 'plainbox-gui/canonical-driver-test-suite/testitemmodel.cpp'
--- plainbox-gui/canonical-driver-test-suite/testitemmodel.cpp 2014-03-26 18:12:32 +0000
+++ plainbox-gui/canonical-driver-test-suite/testitemmodel.cpp 2014-03-26 18:56:08 +0000
@@ -178,9 +178,18 @@
                         description = variant.toString();
                     }

- variant = *iface->properties.find("partial_id");
- if (variant.isValid() && variant.canConvert(QMetaType::QString) ) {
- testname = variant.toString();
+ variant = *iface->properties.find("summary");
+ QVariant test_id;
+ test_id = *iface->properties.find("id");
+ if (variant.isValid() && variant.canConvert(QMetaType::QString) &&
+ test_id.isValid() && test_id.canConvert(QMetaType::QString)) {
+ if (variant.toString().compare(test_id.toString()) != 0){
+ testname = variant.toString();
+ } else {
+ variant = *iface->properties.find("partial_id");
+ if (variant.isValid() && variant.canConvert(QMetaType::QString))
+ testname = variant.toString();
+ }
                     }

                     variant = *iface->properties.find("requires");

Daniel Manrique (roadmr)
Changed in checkbox-ihv-ng:
status: In Progress → Fix Committed
Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

Can we please remember to file bugs on the UI against *both* checkbox and checkbox-ihv-ng? We need to make sure fixes get to both places, until we remove the plainbox-gui code from checkbox-ihv-ng and turn it into a provider.

Revision history for this message
Daniel Manrique (roadmr) wrote :

Brendan, sure, one problem with this particular one was that:

Proprietary bugs cannot affect multiple projects.

If we unprop this bug I'll gladly change it to affect checkbox-gui as well.

Zygmunt Krynicki (zyga)
information type: Proprietary → Public
Changed in checkbox-gui:
milestone: none → 0.17.9
assignee: nobody → Brendan Donegan (brendan-donegan)
importance: Undecided → Critical
status: New → Fix Committed
Chris Gregan (cgregan)
Changed in checkbox-ihv-ng:
status: Fix Committed → Fix Released
Daniel Manrique (roadmr)
Changed in checkbox-gui:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.