[PATCH] testbot: Adjust the StepsTasks fields.

Francois Gouget fgouget at codeweavers.com
Thu May 31 03:59:40 CDT 2018


The StepTask class duplicates the Step and Task classes and its fields
are mostly used in read-only mode so we don't care about their exact
type too much, particularly for enums. Still, try to specify valid
lengths so we don't get errors one day if Validate() is called.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 testbot/lib/WineTestBot/StepsTasks.pm | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/testbot/lib/WineTestBot/StepsTasks.pm b/testbot/lib/WineTestBot/StepsTasks.pm
index ff94b1452..db0cc0667 100644
--- a/testbot/lib/WineTestBot/StepsTasks.pm
+++ b/testbot/lib/WineTestBot/StepsTasks.pm
@@ -162,20 +162,21 @@ sub CreateItem($)
   return WineTestBot::StepTask->new($self);
 }
 
+# Note: To simplify maintenance replace enums with simple string fields.
 my @PropertyDescriptors = (
-  CreateBasicPropertyDescriptor("Id", "Id", 1,  1, "N", 4),
-  CreateBasicPropertyDescriptor("StepNo", "Step no", !1,  1, "N", 2),
-  CreateBasicPropertyDescriptor("TaskNo", "Task no", ! 1,  1, "N", 2),
-  CreateBasicPropertyDescriptor("Type", "Step type", !1, 1, "A", 6),
-  CreateBasicPropertyDescriptor("Status", "Status",  !1,  1, "A", 9),
-  CreateItemrefPropertyDescriptor("VM", "VM", !1,  1, \&CreateVMs, ["VMName"]),
+  CreateBasicPropertyDescriptor("Id", "Id", 1, 1, "N", 4),
+  CreateBasicPropertyDescriptor("StepNo", "Step no", !1, 1, "N", 2),
+  CreateBasicPropertyDescriptor("TaskNo", "Task no", !1, 1, "N", 2),
+  CreateBasicPropertyDescriptor("Type", "Step type", !1, 1, "A", 32),
+  CreateBasicPropertyDescriptor("Status", "Status", !1, 1, "A", 32),
+  CreateItemrefPropertyDescriptor("VM", "VM", !1, 1, \&CreateVMs, ["VMName"]),
   CreateBasicPropertyDescriptor("Timeout", "Timeout", !1, 1, "N", 4),
-  CreateBasicPropertyDescriptor("FileName", "File name",  !1,  1, "A", 64),
-  CreateBasicPropertyDescriptor("FileType", "File Type",  !1,  1, "A", 64),
+  CreateBasicPropertyDescriptor("FileName", "File name", !1, 1, "A", 100),
+  CreateBasicPropertyDescriptor("FileType", "File Type", !1, 1, "A", 32),
   CreateBasicPropertyDescriptor("CmdLineArg", "Command line args", !1, !1, "A", 256),
   CreateBasicPropertyDescriptor("Started", "Execution started", !1, !1, "DT", 19),
   CreateBasicPropertyDescriptor("Ended", "Execution ended", !1, !1, "DT", 19),
-  CreateBasicPropertyDescriptor("TestFailures", "Number of test failures", !1, !1, "N", 5),
+  CreateBasicPropertyDescriptor("TestFailures", "Number of test failures", !1, !1, "N", 6),
 );
 
 sub CreateStepsTasks(;$$)
-- 
2.17.0




More information about the wine-devel mailing list