mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
7a459419f6 | ||
|
596fd73f77 | ||
|
7f69a34460 | ||
|
b64e262453 | ||
|
c07e731c58 | ||
|
b7adbb269f | ||
|
f36aec808f | ||
|
8ee9c2f49a | ||
|
75744d9c23 | ||
|
d0e5a2e38d |
2562
data/occ/hammer.brep
2562
data/occ/hammer.brep
File diff suppressed because one or more lines are too long
@@ -192,7 +192,11 @@ Use prefix <i>bug</i> followed by Mantis issue ID and, if necessary, additional
|
||||
* If the test case reports error due to an existing problem and the fix is not available, add @ref testmanual_3_6 "TODO" statement for each error to mark it as a known problem. The TODO statements must be specific so as to match the actually generated messages but not all similar errors.
|
||||
* To check expected output which should be obtained as the test result, add @ref testmanual_3_7 "REQUIRED" statement for each line of output to mark it as required.
|
||||
* If the test case produces error messages (contained in parse.rules), which are expected in that test and should not be considered as its failure (e.g. test for *checkshape* command), add REQUIRED statement for each error to mark it as required output.
|
||||
4. If the test uses data file(s) that are not yet present in the test database, it is possible to put them to (sub)directory pointed out by *CSF_TestDataPath* variable for running test. The files should be attached to the Mantis issue corresponding to the tested modification.
|
||||
4. To check whether the data files needed for the test are already present in the database, use DRAW command *testfile* (see below).
|
||||
If the data file is already present, use it for new test instead of adding a duplicate.
|
||||
If the data file(s) are not yet present in the test database, put them to some folder and add it to the environment variable *CSF_TestDataPath* to be found by the test system.
|
||||
Information on where the data files can be accessed by OCC team for putting to official database should be provided in comment to Mantis issue, clearly indicating how names of the files used by the test script match the actual names of the files.
|
||||
The simplest way is to attach the data files to the Mantis issue, with the same names as used by the test script.
|
||||
5. Check that the test case runs as expected (test for fix: OK with the fix, FAILED without the fix; test for existing problem: BAD), and integrate it to the Git branch created for the issue.
|
||||
|
||||
Example:
|
||||
@@ -218,6 +222,33 @@ fixshape result a 0.01 0.01
|
||||
checkshape result
|
||||
~~~~~
|
||||
|
||||
DRAW command testfile should be used to check the data files being used by the test for possible duplication of content or names.
|
||||
The command accepts list of paths to files being checked as single argument, and will give conclusion on each of the files, for instance:
|
||||
|
||||
~~~~~
|
||||
Draw[1]> testfile [glob /my/data/path/bug12345*]
|
||||
Collecting info on test data files repository...
|
||||
Checking new file(s)...
|
||||
|
||||
* /my/data/path/bug12345.brep: duplicate
|
||||
already present under name bug28773_1.brep
|
||||
--> //server/occt_tests_data/public/brep/bug28773_1.brep
|
||||
|
||||
* /my/data/path/cadso.brep: new file
|
||||
Warning: DOS encoding detected, consider converting to
|
||||
UNIX unless DOS line ends are needed for the test
|
||||
Warning: shape contains triangulation (946 triangles),
|
||||
consider removing them unless they are needed for the test!
|
||||
BREP size=201 KiB, nbfaces=33, nbedges=94 -> private
|
||||
|
||||
* /my/data/path/case_8_wire3.brep: already present
|
||||
--> //server/occt_tests_data/public/brep/case_8_wire3.brep
|
||||
|
||||
* /my/data/path/case_8_wire4.brep: error
|
||||
name is already used by existing file
|
||||
--> //server/occt_tests_data/public/brep/case_8_wire4.brep
|
||||
~~~~~
|
||||
|
||||
@section testmanual_2 Organization of Test Scripts
|
||||
|
||||
@subsection testmanual_2_1 General Layout
|
||||
|
@@ -3,19 +3,24 @@
|
||||
export aSamplePath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
if [ -e "custom.sh" ]; then
|
||||
source "custom.sh";
|
||||
source "custom.sh" $*;
|
||||
fi
|
||||
|
||||
if [ -e "${aSamplePath}/../../../env.sh" ]; then
|
||||
source "${aSamplePath}/../../../env.sh";
|
||||
source "${aSamplePath}/../../../env.sh" $*;
|
||||
fi
|
||||
|
||||
if test "${QTDIR}" == ""; then
|
||||
echo "Environment variable \"QTDIR\" not defined. Define it in \"custom.sh\" script."
|
||||
exit 1
|
||||
if [ "${QTDIR}" != "" ]; then
|
||||
export PATH=${QTDIR}/bin:${PATH}
|
||||
else
|
||||
aQMakePath=`which qmake`
|
||||
echo "Environment variable \"QTDIR\" not defined.. Define it in \"custom.sh\" script."
|
||||
if [ -x "$aQMakePath" ]; then
|
||||
echo "qmake from PATH will be used instead."
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
host=`uname -s`
|
||||
export STATION=$host
|
||||
|
||||
export PATH=${QTDIR}/bin:${PATH}
|
||||
|
@@ -1,13 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
export aSamplePath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
if [ -e "${aSamplePath}/env.sh" ]; then source "${aSamplePath}/env.sh"; fi
|
||||
if [ -e "${aSamplePath}/env.sh" ]; then source "${aSamplePath}/env.sh" $*; fi
|
||||
cd $aSamplePath
|
||||
qmake FuncDemo.pro
|
||||
if [ "$(uname -s)" != "Darwin" ] || [ "$MACOSX_USE_GLX" == "true" ]; then
|
||||
aNbJobs="$(getconf _NPROCESSORS_ONLN)"
|
||||
if [ "${CASDEB}" == "d" ]; then
|
||||
make debug
|
||||
make -j $aNbJobs debug
|
||||
else
|
||||
make release
|
||||
make -j $aNbJobs release
|
||||
fi
|
||||
fi
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
export aSamplePath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
if [ -e "${aSamplePath}/env.sh" ]; then source "${aSamplePath}/env.sh"; fi
|
||||
if [ -e "${aSamplePath}/env.sh" ]; then source "${aSamplePath}/env.sh" $*; fi
|
||||
cd $aSamplePath
|
||||
|
||||
aSystem=`uname -s`
|
||||
|
@@ -3,20 +3,25 @@
|
||||
export aSamplePath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
if [ -e "custom.sh" ]; then
|
||||
source "custom.sh";
|
||||
source "custom.sh" $*;
|
||||
fi
|
||||
|
||||
if [ -e "${aSamplePath}/../../../env.sh" ]; then
|
||||
source "${aSamplePath}/../../../env.sh";
|
||||
source "${aSamplePath}/../../../env.sh" $*;
|
||||
fi
|
||||
|
||||
if test "${QTDIR}" == ""; then
|
||||
echo "Environment variable \"QTDIR\" not defined. Define it in \"custom.sh\" script."
|
||||
exit 1
|
||||
if [ "${QTDIR}" != "" ]; then
|
||||
export PATH=${QTDIR}/bin:${PATH}
|
||||
else
|
||||
aQMakePath=`which qmake`
|
||||
echo "Environment variable \"QTDIR\" not defined.. Define it in \"custom.sh\" script."
|
||||
if [ -x "$aQMakePath" ]; then
|
||||
echo "qmake from PATH will be used instead."
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
host=`uname -s`
|
||||
export STATION=$host
|
||||
export RES_DIR=${aSamplePath}/${STATION}/res
|
||||
|
||||
export PATH=${QTDIR}/bin:${PATH}
|
||||
|
@@ -1,13 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
export aSamplePath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
if [ -e "${aSamplePath}/env.sh" ]; then source "${aSamplePath}/env.sh"; fi
|
||||
if [ -e "${aSamplePath}/env.sh" ]; then source "${aSamplePath}/env.sh" $*; fi
|
||||
cd $aSamplePath
|
||||
qmake IESample.pro
|
||||
if [ "$(uname -s)" != "Darwin" ] || [ "$MACOSX_USE_GLX" == "true" ]; then
|
||||
aNbJobs="$(getconf _NPROCESSORS_ONLN)"
|
||||
if [ "${CASDEB}" == "d" ]; then
|
||||
make debug
|
||||
make -j $aNbJobs debug
|
||||
else
|
||||
make release
|
||||
make -j $aNbJobs release
|
||||
fi
|
||||
fi
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
export aSamplePath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
if [ -e "${aSamplePath}/env.sh" ]; then source "${aSamplePath}/env.sh"; fi
|
||||
if [ -e "${aSamplePath}/env.sh" ]; then source "${aSamplePath}/env.sh" $*; fi
|
||||
cd $aSamplePath
|
||||
|
||||
aSystem=`uname -s`
|
||||
|
@@ -3,20 +3,25 @@
|
||||
export aSamplePath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
if [ -e "custom.sh" ]; then
|
||||
source "custom.sh";
|
||||
source "custom.sh" $*;
|
||||
fi
|
||||
|
||||
if [ -e "${aSamplePath}/../../../env.sh" ]; then
|
||||
source "${aSamplePath}/../../../env.sh";
|
||||
source "${aSamplePath}/../../../env.sh" $*;
|
||||
fi
|
||||
|
||||
if test "${QTDIR}" == ""; then
|
||||
echo "Environment variable \"QTDIR\" not defined. Define it in \"custom.sh\" script."
|
||||
exit 1
|
||||
if [ "${QTDIR}" != "" ]; then
|
||||
export PATH=${QTDIR}/bin:${PATH}
|
||||
else
|
||||
aQMakePath=`which qmake`
|
||||
echo "Environment variable \"QTDIR\" not defined.. Define it in \"custom.sh\" script."
|
||||
if [ -x "$aQMakePath" ]; then
|
||||
echo "qmake from PATH will be used instead."
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
host=`uname -s`
|
||||
export STATION=$host
|
||||
export RES_DIR=${aSamplePath}/${STATION}/res
|
||||
|
||||
export PATH=${QTDIR}/bin:${PATH}
|
||||
|
@@ -1,13 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
export aSamplePath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
if [ -e "${aSamplePath}/env.sh" ]; then source "${aSamplePath}/env.sh"; fi
|
||||
if [ -e "${aSamplePath}/env.sh" ]; then source "${aSamplePath}/env.sh" $*; fi
|
||||
cd $aSamplePath
|
||||
qmake Tutorial.pro
|
||||
if [ "$(uname -s)" != "Darwin" ] || [ "$MACOSX_USE_GLX" == "true" ]; then
|
||||
aNbJobs="$(getconf _NPROCESSORS_ONLN)"
|
||||
if [ "${CASDEB}" == "d" ]; then
|
||||
make debug
|
||||
make -j $aNbJobs debug
|
||||
else
|
||||
make release
|
||||
make -j $aNbJobs release
|
||||
fi
|
||||
fi
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
export aSamplePath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
if [ -e "${aSamplePath}/env.sh" ]; then source "${aSamplePath}/env.sh"; fi
|
||||
if [ -e "${aSamplePath}/env.sh" ]; then source "${aSamplePath}/env.sh" $*; fi
|
||||
cd $aSamplePath
|
||||
|
||||
aSystem=`uname -s`
|
||||
|
@@ -800,20 +800,29 @@ proc testdiff {dir1 dir2 args} {
|
||||
|
||||
# Procedure to check data file before adding it to repository
|
||||
help testfile {
|
||||
Check data file and prepare it for putting to test data files repository.
|
||||
Use: testfile [filelist]
|
||||
Checks specified data files for putting them into the test data files repository.
|
||||
|
||||
Use: testfile filelist
|
||||
|
||||
Will report if:
|
||||
- data file (non-binary) is in DOS encoding (CR/LF)
|
||||
- same data file (with same or another name) already exists in the repository
|
||||
- another file with the same name already exists
|
||||
Note that names are assumed to be case-insensitive (for Windows).
|
||||
Note that names are considered to be case-insensitive (for compatibility
|
||||
with Windows).
|
||||
|
||||
Unless the file is already in the repository, tries to load it, reports
|
||||
the recognized file format, file size, number of faces and edges in the
|
||||
loaded shape (if any), and makes snapshot (in the temporary directory).
|
||||
loaded shape (if any), information contained its triangulation, and makes
|
||||
snapshot (in the temporary directory).
|
||||
|
||||
Finally it advises whether the file should be put to public section of the
|
||||
repository.
|
||||
|
||||
Use: testfile -check
|
||||
|
||||
If "-check" is given as an argument, then procedure will check files already
|
||||
located in the repository (for possible duplicates and for DOS encoding).
|
||||
}
|
||||
proc testfile {filelist} {
|
||||
global env
|
||||
@@ -823,8 +832,11 @@ proc testfile {filelist} {
|
||||
error "Environment variable CSF_TestDataPath must be defined!"
|
||||
}
|
||||
|
||||
set checkrepo f
|
||||
if { "$filelist" == "-check" } { set checkrepo t }
|
||||
|
||||
# build registry of existing data files (name -> path) and (size -> path)
|
||||
puts "Checking available test data files..."
|
||||
puts "Collecting info on test data files repository..."
|
||||
foreach dir [_split_path $env(CSF_TestDataPath)] {
|
||||
while {[llength $dir] != 0} {
|
||||
set curr [lindex $dir 0]
|
||||
@@ -833,89 +845,143 @@ proc testfile {filelist} {
|
||||
foreach file [glob -nocomplain -directory $curr -type f *] {
|
||||
set name [file tail $file]
|
||||
set name_lower [string tolower $name]
|
||||
set size [file size $file]
|
||||
|
||||
# check that the file is not in DOS encoding
|
||||
if { [_check_dos_encoding $file] } {
|
||||
puts "Warning: file $file is in DOS encoding; was this intended?"
|
||||
}
|
||||
_check_file_format $file
|
||||
|
||||
# check if file with the same name is present twice or more
|
||||
if { [info exists names($name_lower)] } {
|
||||
puts "Error: more than one file with name $name is present in the repository:"
|
||||
if { [_diff_files $file $names($name_lower)] } {
|
||||
puts "(files are different by content)"
|
||||
} else {
|
||||
puts "(files are same by content)"
|
||||
if { $checkrepo } {
|
||||
if { [_check_dos_encoding $file] } {
|
||||
puts "Warning: file $file is in DOS encoding; was this intended?"
|
||||
}
|
||||
puts "--> $file"
|
||||
puts "--> $names($name_lower)"
|
||||
continue
|
||||
}
|
||||
_check_file_format $file
|
||||
|
||||
# check if file with the same name is present twice or more
|
||||
if { [info exists names($name_lower)] } {
|
||||
puts "Error: more than one file with name $name is present in the repository:"
|
||||
if { [_diff_files $file $names($name_lower)] } {
|
||||
puts "(files are different by content)"
|
||||
} else {
|
||||
puts "(files are same by content)"
|
||||
}
|
||||
puts "--> $file"
|
||||
puts "--> $names($name_lower)"
|
||||
continue
|
||||
}
|
||||
|
||||
# check if file with the same content exists
|
||||
set size [file size $file]
|
||||
if { [info exists sizes($size)] } {
|
||||
foreach other $sizes($size) {
|
||||
if { ! [_diff_files $file $other] } {
|
||||
puts "Warning: two files with the same content found:"
|
||||
puts "--> $file"
|
||||
puts "--> $other"
|
||||
# check if file with the same content exists
|
||||
if { [info exists sizes($size)] } {
|
||||
foreach other $sizes($size) {
|
||||
if { ! [_diff_files $file $other] } {
|
||||
puts "Warning: two files with the same content found:"
|
||||
puts "--> $file"
|
||||
puts "--> $other"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# add the file to the registry
|
||||
set names($name_lower) $file
|
||||
lappend names($name_lower) $file
|
||||
lappend sizes($size) $file
|
||||
}
|
||||
}
|
||||
}
|
||||
if { [llength $filelist] <= 0 } { return }
|
||||
if { $checkrepo || [llength $filelist] <= 0 } { return }
|
||||
|
||||
# check the new files
|
||||
set has_images f
|
||||
puts "Checking new file(s)..."
|
||||
foreach file $filelist {
|
||||
# check for DOS encoding
|
||||
if { [_check_dos_encoding $file] } {
|
||||
puts "$file: Warning: DOS encoding detected"
|
||||
}
|
||||
|
||||
set name [file tail $file]
|
||||
set name_lower [string tolower $name]
|
||||
set found f
|
||||
|
||||
# check for presence of the file with same name
|
||||
if { [info exists names($name_lower)] } {
|
||||
if { [_diff_files $file $names($name_lower)] } {
|
||||
puts "$file: Error: name is already used by existing file\n--> $names($name_lower)"
|
||||
} else {
|
||||
puts "$file: OK: already in the repository \n--> $names($name_lower)"
|
||||
continue
|
||||
set found f
|
||||
foreach other $names($name_lower) {
|
||||
# avoid comparing the file with itself
|
||||
if { [file normalize $file] == [file normalize $other] } {
|
||||
continue
|
||||
}
|
||||
# compare content
|
||||
if { [_diff_files $file $other] } {
|
||||
puts "\n* $file: error\n name is already used by existing file\n --> $other"
|
||||
} else {
|
||||
puts "\n* $file: already present \n --> $other"
|
||||
}
|
||||
set found t
|
||||
break
|
||||
}
|
||||
if { $found } { continue }
|
||||
}
|
||||
|
||||
# get size of the file; if it is in DOS encoding and less than 1 MB,
|
||||
# estimate also its size in UNIX encoding to be able to find same
|
||||
# file if already present but in UNIX encoding
|
||||
set sizeact [file size $file]
|
||||
set sizeunx ""
|
||||
set isdos [_check_dos_encoding $file]
|
||||
if { $isdos && $sizeact < 10000000 } {
|
||||
set fd [open $file r]
|
||||
fconfigure $fd -translation crlf
|
||||
set sizeunx [string length [read $fd]]
|
||||
close $fd
|
||||
}
|
||||
|
||||
# check if file with the same content exists
|
||||
set size [file size $file]
|
||||
if { [info exists sizes($size)] } {
|
||||
set found f
|
||||
foreach size "$sizeact $sizeunx" {
|
||||
if { [info exists sizes($size)] } {
|
||||
foreach other $sizes($size) {
|
||||
# avoid comparing the file with itself
|
||||
if { [file normalize $file] == [file normalize $other] } {
|
||||
continue
|
||||
}
|
||||
# compare content
|
||||
if { ! [_diff_files $file $other] } {
|
||||
puts "$file: OK: the same file is already present under name [file tail $other]\n--> $other"
|
||||
puts "\n* $file: duplicate \n already present under name [file tail $other]\n --> $other"
|
||||
set found t
|
||||
break
|
||||
}
|
||||
}
|
||||
if { $found } { continue }
|
||||
if { $found } { break }
|
||||
}
|
||||
}
|
||||
if { $found } { continue }
|
||||
|
||||
# file is not present yet, so to be analyzed
|
||||
puts "\n* $file: new file"
|
||||
|
||||
# add the file to the registry as if it were added to the repository,
|
||||
# to report possible duplicates among the currently processed files
|
||||
lappend names($name_lower) $file
|
||||
if { "$sizeunx" != "" } {
|
||||
lappend sizes($sizeunx) $file
|
||||
} else {
|
||||
lappend sizes($sizeact) $file
|
||||
}
|
||||
|
||||
# first of all, complain if it is in DOS encoding
|
||||
if { $isdos } {
|
||||
puts " Warning: DOS encoding detected, consider converting to"
|
||||
puts " UNIX unless DOS line ends are needed for the test"
|
||||
}
|
||||
|
||||
# try to read the file
|
||||
set format [_check_file_format $file]
|
||||
if { [catch {uplevel load_data_file $file $format a}] } {
|
||||
puts "$file: Error: Cannot read as $format file"
|
||||
puts " Warning: Cannot read as $format file"
|
||||
continue
|
||||
}
|
||||
|
||||
# warn if shape contains triangulation
|
||||
pload MODELING
|
||||
if { "$format" != "STL" &&
|
||||
[regexp {contains\s+([0-9]+)\s+triangles} [uplevel trinfo a] res nbtriangles] &&
|
||||
$nbtriangles != 0 } {
|
||||
puts " Warning: shape contains triangulation ($nbtriangles triangles),"
|
||||
puts " consider removing them unless they are needed for the test!"
|
||||
}
|
||||
|
||||
# get number of faces and edges
|
||||
set edges 0
|
||||
set faces 0
|
||||
@@ -928,16 +994,10 @@ proc testfile {filelist} {
|
||||
set dir public
|
||||
} else {
|
||||
set dir private
|
||||
# check if one of names of that file corresponds to typical name for
|
||||
# MDTV bugs or has extension .rle, this should be old model
|
||||
if { [regexp -nocase {.*(cts|ats|pro|buc|ger|fra|usa|uki)[0-9]+.*} $name] ||
|
||||
[regexp -nocase {[.]rle\y} $name] } {
|
||||
set dir old
|
||||
}
|
||||
}
|
||||
|
||||
# add stats
|
||||
puts "$file: $format size=[expr $size / 1024] KiB, nbfaces=$faces, nbedges=$edges -> $dir"
|
||||
puts " $format size=[expr $size / 1024] KiB, nbfaces=$faces, nbedges=$edges -> $dir"
|
||||
|
||||
set tmpdir [_get_temp_dir]
|
||||
file mkdir $tmpdir/$dir
|
||||
@@ -945,6 +1005,7 @@ proc testfile {filelist} {
|
||||
# make snapshot
|
||||
pload AISV
|
||||
uplevel vdisplay a
|
||||
uplevel vsetdispmode 1
|
||||
uplevel vfit
|
||||
uplevel vzfit
|
||||
uplevel vdump $tmpdir/$dir/[file rootname [file tail $file]].png
|
||||
@@ -1517,7 +1578,7 @@ proc _html_highlight {status line} {
|
||||
|
||||
# Internal procedure to generate HTML page presenting log of the tests
|
||||
# execution in tabular form, with links to reports on individual cases
|
||||
proc _log_html_summary {logdir log totals regressions improvements total_time} {
|
||||
proc _log_html_summary {logdir log totals regressions improvements skipped total_time} {
|
||||
global _test_case_regexp
|
||||
|
||||
# create missing directories as needed
|
||||
@@ -1564,7 +1625,7 @@ proc _log_html_summary {logdir log totals regressions improvements total_time} {
|
||||
}
|
||||
|
||||
# print regressions and improvements
|
||||
foreach featured [list $regressions $improvements] {
|
||||
foreach featured [list $regressions $improvements $skipped] {
|
||||
if { [llength $featured] <= 1 } { continue }
|
||||
set status [string trim [lindex $featured 0] { :}]
|
||||
puts $fd "<h2>$status</h2>"
|
||||
@@ -1671,13 +1732,16 @@ proc _log_summarize {logdir log {total_time {}}} {
|
||||
set totals {}
|
||||
set improvements {Improvements:}
|
||||
set regressions {Failed:}
|
||||
set skipped {Skipped:}
|
||||
if { [info exists stat] } {
|
||||
foreach status [lsort [array names stat]] {
|
||||
lappend totals [list [llength $stat($status)] $status]
|
||||
|
||||
# separately count improvements (status starting with IMP) and regressions (all except IMP, OK, BAD, and SKIP)
|
||||
# separately count improvements (status starting with IMP), skipped (status starting with SKIP) and regressions (all except IMP, OK, BAD, and SKIP)
|
||||
if { [regexp -nocase {^IMP} $status] } {
|
||||
eval lappend improvements $stat($status)
|
||||
} elseif { [regexp -nocase {^SKIP} $status] } {
|
||||
eval lappend skipped $stat($status)
|
||||
} elseif { $status != "OK" && ! [regexp -nocase {^BAD} $status] && ! [regexp -nocase {^SKIP} $status] } {
|
||||
eval lappend regressions $stat($status)
|
||||
}
|
||||
@@ -1692,6 +1756,9 @@ proc _log_summarize {logdir log {total_time {}}} {
|
||||
if { [llength $regressions] > 1 } {
|
||||
_log_and_puts log [join $regressions "\n "]
|
||||
}
|
||||
if { [llength $skipped] > 1 } {
|
||||
_log_and_puts log [join $skipped "\n "]
|
||||
}
|
||||
if { [llength $improvements] == 1 && [llength $regressions] == 1 } {
|
||||
_log_and_puts log "No regressions"
|
||||
}
|
||||
@@ -1701,7 +1768,7 @@ proc _log_summarize {logdir log {total_time {}}} {
|
||||
|
||||
# save log to files
|
||||
if { $logdir != "" } {
|
||||
_log_html_summary $logdir $log $totals $regressions $improvements $total_time
|
||||
_log_html_summary $logdir $log $totals $regressions $improvements $skipped $total_time
|
||||
_log_save $logdir/tests.log [join $log "\n"] "Tests summary"
|
||||
}
|
||||
|
||||
@@ -2340,7 +2407,7 @@ proc load_data_file {file format shape} {
|
||||
DRAW { uplevel restore $file $shape }
|
||||
IGES { pload XSDRAW; uplevel igesbrep $file $shape * }
|
||||
STEP { pload XSDRAW; uplevel stepread $file __a *; uplevel renamevar __a_1 $shape }
|
||||
STL { pload XSDRAW; uplevel readstl $shape $file }
|
||||
STL { pload XSDRAW; uplevel readstl $shape $file triangulation }
|
||||
default { error "Cannot read $format file $file" }
|
||||
}
|
||||
}
|
||||
|
28
tests/bugs/modalg_7/bug24909_1
Normal file
28
tests/bugs/modalg_7/bug24909_1
Normal file
@@ -0,0 +1,28 @@
|
||||
puts "TODO OCC24909 ALL: Tcl Exception: Buildsweep : Not Done"
|
||||
|
||||
puts "TODO OCC24909 ALL: An exception was caught"
|
||||
puts "TODO OCC24909 ALL: \\*\\* Exception \\*\\*.*"
|
||||
|
||||
puts "TODO OCC24909 ALL: TEST INCOMPLETE"
|
||||
|
||||
puts "========"
|
||||
puts "OCC24909"
|
||||
puts "========"
|
||||
puts ""
|
||||
##################################
|
||||
# 0024909: SIGSEGV in buildsweep
|
||||
##################################
|
||||
|
||||
restore [locate_data_file bug24909_sweep3-draw-Sweep-0-spine.brep] Sweep-0-spine
|
||||
|
||||
mksweep Sweep-0-spine
|
||||
setsweep -CF
|
||||
|
||||
restore [locate_data_file bug24909_sweep3-draw-Sweep-0-section-00-Sketch.brep] Sweep-0-section-00-Sketch
|
||||
|
||||
addsweep Sweep-0-section-00-Sketch
|
||||
|
||||
restore [locate_data_file bug24909_sweep3-draw-Sweep-0-section-01-Sketch001.brep] Sweep-0-section-01-Sketch001
|
||||
addsweep Sweep-0-section-01-Sketch001
|
||||
|
||||
buildsweep Sweep
|
31
tests/bugs/modalg_7/bug24909_2
Normal file
31
tests/bugs/modalg_7/bug24909_2
Normal file
@@ -0,0 +1,31 @@
|
||||
puts "TODO OCC24909 ALL: Tcl Exception: Buildsweep : Not Done"
|
||||
|
||||
puts "TODO OCC24909 ALL: An exception was caught"
|
||||
puts "TODO OCC24909 ALL: \\*\\* Exception \\*\\*.*"
|
||||
|
||||
puts "TODO OCC24909 ALL: TEST INCOMPLETE"
|
||||
|
||||
puts "========"
|
||||
puts "OCC24909"
|
||||
puts "========"
|
||||
puts ""
|
||||
##################################
|
||||
# 0024909: SIGSEGV in buildsweep
|
||||
##################################
|
||||
|
||||
circle c1 0 0 0 40
|
||||
mkedge e1 c1
|
||||
wire w1 e1
|
||||
tcopy w1 Sketch002
|
||||
tcopy w1 Sketch001
|
||||
renamevar w1 Sketch
|
||||
trotate Sketch 0 0 0 0. 1. 0. 90
|
||||
ttranslate Sketch 0. 0. 75.
|
||||
trotate Sketch001 0 0 0 0. 1. 0. 90
|
||||
ttranslate Sketch001 0. 0. -75.
|
||||
ttranslate Sketch002 50. 0. 0.
|
||||
mksweep Sketch002
|
||||
setsweep -CF
|
||||
addsweep Sketch001
|
||||
addsweep Sketch
|
||||
buildsweep Sweep
|
32
tests/bugs/modalg_7/bug24909_3
Normal file
32
tests/bugs/modalg_7/bug24909_3
Normal file
@@ -0,0 +1,32 @@
|
||||
puts "TODO OCC24909 ALL: Tcl Exception: Buildsweep : Not Done"
|
||||
puts "TODO OCC24909 ALL: TEST INCOMPLETE"
|
||||
|
||||
puts "========"
|
||||
puts "OCC24909"
|
||||
puts "========"
|
||||
puts ""
|
||||
##################################
|
||||
# 0024909: SIGSEGV in buildsweep
|
||||
##################################
|
||||
|
||||
restore [locate_data_file bug24909_minihyd-draw-BezCurve.brep] BezCurve
|
||||
|
||||
ttranslate BezCurve 0 -8 0
|
||||
explode BezCurve E
|
||||
wire Sweep001-0-spine BezCurve_1
|
||||
mksweep Sweep001-0-spine
|
||||
setsweep -CF
|
||||
circle Circle-curve 0 0 0 18
|
||||
mkedge Circle-edge Circle-curve 0 0
|
||||
wire Circle Circle-edge
|
||||
trotate Circle 0 0 0 0.577350269189625731 0.577350269189625731 0.577350269189625731 120
|
||||
ttranslate Circle 0 -71 203.5
|
||||
addsweep Circle
|
||||
circle Circle001-curve 0 0 0 16
|
||||
mkedge Circle001-edge Circle001-curve 0 0
|
||||
wire Circle001 Circle001-edge
|
||||
trotate Circle001 0 0 0 0.577350269189625731 0.577350269189625731 0.577350269189625731 120
|
||||
ttranslate Circle001 0 -71 203.5
|
||||
addsweep Circle001
|
||||
|
||||
buildsweep Sweep001 -C -S
|
15
tests/bugs/modalg_7/bug24997
Normal file
15
tests/bugs/modalg_7/bug24997
Normal file
@@ -0,0 +1,15 @@
|
||||
puts "TODO OCC24997 ALL: An exception was caught"
|
||||
puts "TODO OCC24997 ALL: \\*\\* Exception \\*\\*.*"
|
||||
puts "TODO OCC24997 ALL: TEST INCOMPLETE"
|
||||
|
||||
puts "========"
|
||||
puts "OCC24997"
|
||||
puts "========"
|
||||
puts ""
|
||||
#########################################
|
||||
# SIGSEGV in BRepOffsetAPI_ThruSections
|
||||
#########################################
|
||||
|
||||
restore [locate_data_file bug24997_loft3-draw-Loft-00-section.brep] Loft-00-section
|
||||
restore [locate_data_file bug24997_loft3-draw-Loft-01-section.brep] Loft-01-section
|
||||
thrusections Loft 0 0 Loft-00-section Loft-01-section
|
22
tests/bugs/modalg_7/bug25081
Normal file
22
tests/bugs/modalg_7/bug25081
Normal file
@@ -0,0 +1,22 @@
|
||||
puts "TODO OCC25081 ALL: TEST INCOMPLETE"
|
||||
puts "TODO OCC25081 ALL: Process killed by CPU limit"
|
||||
|
||||
puts "========"
|
||||
puts "OCC25081"
|
||||
puts "========"
|
||||
puts ""
|
||||
############################
|
||||
# bopcheck does not return
|
||||
############################
|
||||
|
||||
cpulimit 1200
|
||||
|
||||
restore [locate_data_file bug25081_v1-sweep-draw-Sweep-0-spine.brep] Sweep-0-spine
|
||||
restore [locate_data_file bug25081_v1-sweep-draw-Sweep-0-section-00-Wire.brep] Sweep-0-section-00-Wire
|
||||
|
||||
mksweep Sweep-0-spine
|
||||
setsweep -FR
|
||||
addsweep Sweep-0-section-00-Wire
|
||||
buildsweep Sweep -C -S
|
||||
|
||||
bopcheck Sweep
|
20
tests/bugs/modalg_7/bug25110
Normal file
20
tests/bugs/modalg_7/bug25110
Normal file
@@ -0,0 +1,20 @@
|
||||
puts "TODO OCC25110 ALL: An exception was caught"
|
||||
puts "TODO OCC25110 ALL: \\*\\* Exception \\*\\*.*"
|
||||
puts "TODO OCC25110 ALL: TEST INCOMPLETE"
|
||||
|
||||
puts "========"
|
||||
puts "OCC25110"
|
||||
puts "========"
|
||||
puts ""
|
||||
########################################################################################
|
||||
# TCollection_IndexedDataMap::FindFromKey error when sweeping circle along BezierCurve
|
||||
########################################################################################
|
||||
|
||||
restore [locate_data_file bug25110_unsweepable1-draw-Sweep-0-spine.brep] Sweep-0-spine
|
||||
restore [locate_data_file bug25110_unsweepable1-draw-Sweep-0-section-00-Circle.brep] Sweep-0-section-00-Circle
|
||||
|
||||
mksweep Sweep-0-spine
|
||||
setsweep -CF
|
||||
addsweep Sweep-0-section-00-Circle
|
||||
|
||||
buildsweep Sweep -C -S
|
21
tests/bugs/modalg_7/bug26030
Normal file
21
tests/bugs/modalg_7/bug26030
Normal file
@@ -0,0 +1,21 @@
|
||||
puts "TODO OCC26030 ALL: An exception was caught"
|
||||
puts "TODO OCC26030 ALL: \\*\\* Exception \\*\\*.*"
|
||||
puts "TODO OCC26030 ALL: TEST INCOMPLETE"
|
||||
|
||||
puts "========"
|
||||
puts "OCC26030"
|
||||
puts "========"
|
||||
puts ""
|
||||
#################################################
|
||||
# Offset of a lofted body fails after long time
|
||||
#################################################
|
||||
|
||||
restore [locate_data_file bug26030_thickness-crash1-tcl-Loft001-00-section.brep] Loft001-00-section
|
||||
restore [locate_data_file bug26030_thickness-crash1-tcl-Loft001-01-section.brep] Loft001-01-section
|
||||
|
||||
thrusections Loft001 1 0 Loft001-00-section Loft001-01-section
|
||||
explode Loft001 F
|
||||
offsetparameter 1e-7 p i
|
||||
offsetload Loft001 1
|
||||
|
||||
offsetperform Offset
|
16
tests/bugs/modalg_7/bug26088
Normal file
16
tests/bugs/modalg_7/bug26088
Normal file
@@ -0,0 +1,16 @@
|
||||
puts "TODO OCC26088 ALL: An exception was caught"
|
||||
puts "TODO OCC26088 ALL: \\*\\* Exception \\*\\*.*"
|
||||
puts "TODO OCC26088 ALL: TEST INCOMPLETE"
|
||||
|
||||
puts "========"
|
||||
puts "OCC26088"
|
||||
puts "========"
|
||||
puts ""
|
||||
###############################
|
||||
# Exception in pipe algorithm
|
||||
###############################
|
||||
|
||||
restore [locate_data_file bug26088_path0.brep] p
|
||||
restore [locate_data_file bug26088_profile0.brep] pr
|
||||
|
||||
pipe result p pr
|
17
tests/bugs/moddata_3/bug24621
Normal file
17
tests/bugs/moddata_3/bug24621
Normal file
@@ -0,0 +1,17 @@
|
||||
puts "TODO OCC24621 ALL: An exception was caught"
|
||||
puts "TODO OCC24621 ALL: \\*\\* Exception \\*\\*.*"
|
||||
puts "TODO OCC24621 ALL: TEST INCOMPLETE"
|
||||
|
||||
puts "========"
|
||||
puts "OCC24621"
|
||||
puts "========"
|
||||
puts ""
|
||||
##################################################
|
||||
# Failed to build Geom_OffsetSurface on B-Spline
|
||||
##################################################
|
||||
|
||||
restore [locate_data_file bug24621_bs.draw] bs
|
||||
|
||||
offset obs bs -2
|
||||
setunotperiodic bs
|
||||
offset obs bs -2
|
52
tests/demo/testsystem/testfile
Normal file
52
tests/demo/testsystem/testfile
Normal file
@@ -0,0 +1,52 @@
|
||||
puts "# This test is for command testfile, used to check new data files "
|
||||
puts "# before adding to the data base:"
|
||||
puts "# - bottle.brep should be reported as already in data base"
|
||||
puts "# - hammer_copy.igs should be reported as duplicate"
|
||||
puts "# - square.brep should be reported as new, with warnings on DOS encoding"
|
||||
puts "# and presence of triangulation"
|
||||
puts ""
|
||||
|
||||
puts "# Preparing test data files..."
|
||||
|
||||
# find reference data files (they should be present, otherwise test is meaningless)
|
||||
set bottle [locate_data_file bottle.brep]
|
||||
set hammer [locate_data_file hammer.iges]
|
||||
|
||||
# bottle is simply copied
|
||||
file copy -force $bottle ${imagedir}/bottle.brep
|
||||
|
||||
# hammer is copied with different name and DOS encoding
|
||||
set fd [open $hammer r]
|
||||
set hammer_content [read $fd]
|
||||
close $fd
|
||||
set fd [open ${imagedir}/_hammer_copy.igs w]
|
||||
fconfigure $fd -translation crlf
|
||||
puts -nonewline $fd $hammer_content
|
||||
close $fd
|
||||
|
||||
# square is created anew
|
||||
pload MODELING
|
||||
box b 11.1 11.1 11.1
|
||||
explode b f
|
||||
tcopy b_1 f
|
||||
incmesh f 0.01
|
||||
save f ${imagedir}/_square.brep
|
||||
|
||||
set fd [open ${imagedir}/_square.brep r]
|
||||
set square_content [read $fd]
|
||||
close $fd
|
||||
set fd [open ${imagedir}/_square.brep w]
|
||||
fconfigure $fd -translation crlf
|
||||
puts -nonewline $fd $square_content
|
||||
close $fd
|
||||
|
||||
puts ""
|
||||
puts "REQUIRED ALL: bottle.brep: already present"
|
||||
puts "REQUIRED ALL: hammer_copy.igs: duplicate"
|
||||
puts "REQUIRED ALL: square.brep: new file"
|
||||
puts "REQUIRED ALL: Warning: DOS encoding detected"
|
||||
puts "REQUIRED ALL: Warning: shape contains triangulation"
|
||||
|
||||
testfile [list ${imagedir}/bottle.brep ${imagedir}/_hammer_copy.igs ${imagedir}/_square.brep]
|
||||
|
||||
puts "TEST COMPLETED"
|
Reference in New Issue
Block a user