SQLite

Check-in [d969792f34]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:In the releasetest.tcl script, add the --progress option to cause the start of each subprocess to be shown. Otherwise, revert to the old-style display. Improvements to the handling of the --buildonly option.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d969792f34c484bd055c933b1c2c5a99eb88b61b
User & Date: drh 2015-11-03 15:39:29.385
Context
2015-11-03
19:13
In 'e_uri.test', make sure all created test database files get deleted. (check-in: 40c4f4a65e user: mistachkin tags: trunk)
15:39
In the releasetest.tcl script, add the --progress option to cause the start of each subprocess to be shown. Otherwise, revert to the old-style display. Improvements to the handling of the --buildonly option. (check-in: d969792f34 user: drh tags: trunk)
15:16
In the releasetest.tcl script, show the --jobs object on the command-line summary. Report the time of each "starting:" event. Do not show errors on a --dryrun. (check-in: b75107778f user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/releasetest.tcl.
16
17
18
19
20
21
22

23
24
25
26
27
28
29
    --veryquick                        (Run "make smoketest" only)
    --msvc                             (Use MSVC as the compiler)
    --buildonly                        (Just build testfixture - do not run)
    --dryrun                           (Print what would have happened)
    --info                             (Show diagnostic info)
    --with-tcl=DIR                     (Use TCL build at DIR)
    --jobs     N                       (Use N processes - default 1)


The default value for --srcdir is the parent of the directory holding
this script.

The script determines the default value for --platform using the
$tcl_platform(os) and $tcl_platform(machine) variables.  Supported
platforms are "Linux-x86", "Linux-x86_64", "Darwin-i386",







>







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    --veryquick                        (Run "make smoketest" only)
    --msvc                             (Use MSVC as the compiler)
    --buildonly                        (Just build testfixture - do not run)
    --dryrun                           (Print what would have happened)
    --info                             (Show diagnostic info)
    --with-tcl=DIR                     (Use TCL build at DIR)
    --jobs     N                       (Use N processes - default 1)
    --progress                         (Show progress messages)

The default value for --srcdir is the parent of the directory holding
this script.

The script determines the default value for --platform using the
$tcl_platform(os) and $tcl_platform(machine) variables.  Supported
platforms are "Linux-x86", "Linux-x86_64", "Darwin-i386",
378
379
380
381
382
383
384

385
386
387
388
389
390
391
392
393
394
        set rc 1
        set errmsg "version conflict: {$::SQLITE_VERSION} vs. {$v}"
      }
    }
  }
  close $fd
  if {$::BUILDONLY} {

    if {$rc==0} {
      set errmsg "Build complete"
    } else {
      set errmsg "Build failed"
    }
  } elseif {!$seen} {
    set rc 1
    set errmsg "Test did not complete"
    if {[file readable core]} {
      append errmsg " - core file exists"







>
|
<
<







379
380
381
382
383
384
385
386
387


388
389
390
391
392
393
394
        set rc 1
        set errmsg "version conflict: {$::SQLITE_VERSION} vs. {$v}"
      }
    }
  }
  close $fd
  if {$::BUILDONLY} {
    incr ::NTESTCASE
    if {$rc!=0} {


      set errmsg "Build failed"
    }
  } elseif {!$seen} {
    set rc 1
    set errmsg "Test did not complete"
    if {[file readable core]} {
      append errmsg " - core file exists"
480
481
482
483
484
485
486

487



488
489
490
491
492
493
494
        set status FAIL
        incr ::NERR
      } else {
        set status Ok
      }

      set n [string length $title]

      PUTS "finished: ${title}[string repeat . [expr {53-$n}]] $status $tm"



      if {$errmsg!=""} {PUTS "     $errmsg"}
      flush stdout
    }

    incr G(nJob) -1
  } else {
    set line [gets $fd]







>
|
>
>
>







480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
        set status FAIL
        incr ::NERR
      } else {
        set status Ok
      }

      set n [string length $title]
      if {$::PROGRESS_MSGS} {
        PUTS "finished: ${title}[string repeat . [expr {53-$n}]] $status $tm"
      } else {
        PUTS "${title}[string repeat . [expr {63-$n}]] $status $tm"
      }
      if {$errmsg!=""} {PUTS "     $errmsg"}
      flush stdout
    }

    incr G(nJob) -1
  } else {
    set line [gets $fd]
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
      vwait G(nJob)
    }

    if {[llength $tests]>0} {
      set T [lindex $tests 0]
      set tests [lrange $tests 1 end]
      foreach {title dir configOpts testtarget makeOpts cflags opts} $T {}
      if {!$::TRACE} {
        set n [string length $title]
        PUTS "starting: ${title} at [now]"
        flush stdout
      }

      # Run the job.
      #







|







525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
      vwait G(nJob)
    }

    if {[llength $tests]>0} {
      set T [lindex $tests 0]
      set tests [lrange $tests 1 end]
      foreach {title dir configOpts testtarget makeOpts cflags opts} $T {}
      if {$::PROGRESS_MSGS && !$::TRACE} {
        set n [string length $title]
        PUTS "starting: ${title} at [now]"
        flush stdout
      }

      # Run the job.
      #
692
693
694
695
696
697
698
699
700
701
702
703
704

705
706
707
708
709
710
711
712
# This proc processes the command line options passed to this script.
# Currently the only option supported is "-makefile", default
# "releasetest.mk". Set the ::MAKEFILE variable to the value of this
# option.
#
proc process_options {argv} {
  set ::SRCDIR    [file normalize [file dirname [file dirname $::argv0]]]
  set ::QUICK     0
  set ::MSVC      0
  set ::BUILDONLY 0
  set ::DRYRUN    0
  set ::TRACE     0
  set ::JOBS      1

  set ::WITHTCL   {}
  set config {}
  set platform $::tcl_platform(os)-$::tcl_platform(machine)

  for {set i 0} {$i < [llength $argv]} {incr i} {
    set x [lindex $argv $i]
    if {[regexp {^--[a-z]} $x]} {set x [string range $x 1 end]}
    switch -glob -- $x {







|
|
|
|
|
|
>
|







696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
# This proc processes the command line options passed to this script.
# Currently the only option supported is "-makefile", default
# "releasetest.mk". Set the ::MAKEFILE variable to the value of this
# option.
#
proc process_options {argv} {
  set ::SRCDIR    [file normalize [file dirname [file dirname $::argv0]]]
  set ::QUICK          0
  set ::MSVC           0
  set ::BUILDONLY      0
  set ::DRYRUN         0
  set ::TRACE          0
  set ::JOBS           1
  set ::PROGRESS_MSGS  0
  set ::WITHTCL        {}
  set config {}
  set platform $::tcl_platform(os)-$::tcl_platform(machine)

  for {set i 0} {$i < [llength $argv]} {incr i} {
    set x [lindex $argv $i]
    if {[regexp {^--[a-z]} $x]} {set x [string range $x 1 end]}
    switch -glob -- $x {
725
726
727
728
729
730
731




732
733
734
735
736
737
738
        set platform [lindex $argv $i]
      }

      -jobs {
        incr i
        set ::JOBS [lindex $argv $i]
      }





      -quick {
        set ::QUICK 1
      }
      -veryquick {
        set ::QUICK 2
      }







>
>
>
>







730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
        set platform [lindex $argv $i]
      }

      -jobs {
        incr i
        set ::JOBS [lindex $argv $i]
      }

      -progress {
        set ::PROGRESS_MSGS 1
      }

      -quick {
        set ::QUICK 1
      }
      -veryquick {
        set ::QUICK 2
      }
823
824
825
826
827
828
829

830
831
832
833
834
835
836
    set ::CONFIGLIST $config
  } else {
    set ::CONFIGLIST $::Platforms($platform)
  }
  PUTS "Running the following test configurations for $platform:"
  PUTS "    [string trim $::CONFIGLIST]"
  PUTS -nonewline "Flags:"

  if {$::DRYRUN} {PUTS -nonewline " --dryrun"}
  if {$::BUILDONLY} {PUTS -nonewline " --buildonly"}
  if {$::MSVC} {PUTS -nonewline " --msvc"}
  switch -- $::QUICK {
     1 {PUTS -nonewline " --quick"}
     2 {PUTS -nonewline " --veryquick"}
  }







>







832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
    set ::CONFIGLIST $config
  } else {
    set ::CONFIGLIST $::Platforms($platform)
  }
  PUTS "Running the following test configurations for $platform:"
  PUTS "    [string trim $::CONFIGLIST]"
  PUTS -nonewline "Flags:"
  if {$::PROGRESS_MSGS} {PUTS -nonewline " --progress"}
  if {$::DRYRUN} {PUTS -nonewline " --dryrun"}
  if {$::BUILDONLY} {PUTS -nonewline " --buildonly"}
  if {$::MSVC} {PUTS -nonewline " --msvc"}
  switch -- $::QUICK {
     1 {PUTS -nonewline " --quick"}
     2 {PUTS -nonewline " --veryquick"}
  }
862
863
864
865
866
867
868

869

870
871
872
873
874
875
876
    if {$target ne "checksymbols"} {
      switch -- $::QUICK {
         1 {set target quicktest}
         2 {set target smoketest}
      }
      if {$::BUILDONLY} {
        set target testfixture

        if {$::MSVC} {append target .exe}

      }
    }
    set config_options [concat $::Configs($zConfig) $::EXTRACONFIG]

    incr NTEST
    add_test_suite all $zConfig $target $config_options








>
|
>







872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
    if {$target ne "checksymbols"} {
      switch -- $::QUICK {
         1 {set target quicktest}
         2 {set target smoketest}
      }
      if {$::BUILDONLY} {
        set target testfixture
        if {$::tcl_platform(platform)=="windows"} {
          append target .exe
        }
      }
    }
    set config_options [concat $::Configs($zConfig) $::EXTRACONFIG]

    incr NTEST
    add_test_suite all $zConfig $target $config_options