Bläddra i källkod

* threadlist -> tasklist

Michaël Van Canneyt 4 månader sedan
förälder
incheckning
a341661f98
2 ändrade filer med 16 tillägg och 13 borttagningar
  1. 7 7
      tests/utils/README.md
  2. 9 6
      tests/utils/dbdigest.pp

+ 7 - 7
tests/utils/README.md

@@ -45,17 +45,17 @@ Other than the database connection, the following global options can be
 given:
 - `-r --relsrcdir=DIR` the relative source dir for getting test files.
 - `-S --testsrcdir=DIR` the absolute test source dir
-- `-T --threadlist=FILE`  file with configuration file names to import.
-- `-j --threadcount=N` Maximum number of threads to use when importing.
+- `-T --tasklist=FILE`  file with configuration file names to import.
+- `-j --taskcount=N` Maximum number of threads to use when importing.
 - `-V --verbose` be more verbose (writes lots of debug info)
 - `-f --config=FILENAME` in case a single digest file is imported, the name of the config file. 
     If not set, dbdigest.cfg is used.
 
-If the -T --threadlist option is given, then -f/--config is ignored: no
+If the -T --tasklist option is given, then -f/--config is ignored: no
 default file will be read. Only the files in the threadlist file will be
 treated.
 
-Example of a thread list file:
+Example of a thread list file (mytests.lst):
 ```
 2025-05-01-i386/gcc-dbdigest.cfg
 2025-05-01-arm/llvm-dbdigest.cfg
@@ -96,17 +96,17 @@ and you can specify comments using the usual # sign.
 ## Examples
 Import data from a single testrun, with testrun data in `mytest.cfg`:
 ```text
-dbdigest -f mytest.cfg
+dbdigest -f mytest.lst
 ```
 The database connection data will be read from the global configuration.
 
 Import data from a list of testruns in `mytests.lst` (4 threads):
 ```text
-dbdigest -T mytests.cfg
+dbdigest -T mytests.lst
 ```
 Import data from a list of testruns in `mytests.lst` (8 threads):
 ```text
-dbdigest -T mytests.cfg -j 8
+dbdigest -T mytests.lst -j 8
 ```
 
 # DBAdd tool.

+ 9 - 6
tests/utils/dbdigest.pp

@@ -61,7 +61,7 @@ Type
       'C'+ {  Comment }
       'S'+ {  TestSrcDir }
       'r'+ {  RelSrcDir }
-      'T'+ {  ThreadList }
+      'T'+ {  TaskList }
       'j'+ {  ThreadCount }
       'V'+ {  Verbose }
       'Q'  {  SQL }
@@ -85,7 +85,7 @@ Type
       'comment',
       'testsrcdir',
       'relsrcdir',
-      'threadlist',
+      'tasklist',
       'threadcount',
       'verbose',
       'sql',
@@ -210,6 +210,11 @@ begin
         begin
         hour:=StrToInt(Copy(aValue,9,2));
         min:=StrToInt(Copy(aValue,11,2));
+        end
+      else
+        begin
+        hour:=0;
+        min:=0;
         end;
       Result:=EncodeDate(year,month,day)+EncodeTime(hour,min,0,0);
     end
@@ -316,7 +321,7 @@ begin
   Writeln('-r --relsrcdir                    relative source dir');
   Writeln('-S --testsrcdir                   test source dir');
   Writeln('-u --username=USER                database user name');
-  Writeln('-T --tasklist=FILE              file with configuration file names to imports.');
+  Writeln('-T --tasklist=FILE                file with configuration file names to imports.');
   Writeln('-j --threadcount=N                Number of threads to use');
   Writeln('-V --verbose                      be more verbose');
   Writeln('Test run data:');
@@ -404,8 +409,6 @@ begin
     if I<=Length(ShortOpts) then
       begin
       Short:=ShortOpts[I];
-      if Short='r' then
-        Writeln('ag');
       lHas:=HasOption(Short,Long);
       lValue:=GetOptionValue(Short,Long);
       end
@@ -610,7 +613,7 @@ begin
   lConfig:=Default(TDigestConfig);
   lConfig.RelSrcDir:='tests/';
   ReadSystemDBConfig(lConfig);
-  if not HasOption('T','threadlist') then
+  if not HasOption('T','tasklist') then
     begin
     lData:=Default(TTestRunData);
     ProcessConfigFile(lConfigFile,lConfig,lData);