0023430: Tests in xcaf group fail in parallel mode
authorski <ski@opencascade.com>
Wed, 12 Sep 2012 14:24:01 +0000 (18:24 +0400)
committerbugmaster <bugmaster@opencascade.com>
Fri, 14 Sep 2012 10:31:28 +0000 (14:31 +0400)
tests/xcaf/begin
tests/xcaf/end

index 04aa069..72f8b86 100644 (file)
@@ -24,11 +24,13 @@ set ErrorCode 0
 if { [info exists imagedir] == 0 } {
    set imagedir .
 }
+if { [info exists test_image ] == 0 } {
+   set test_image photo
+}
 
 #set WorkDirectory "$env(TmpDir)"
 set WorkDirectory $imagedir
 
-
 if {![file exists $WorkDirectory]} {
     catch {[file mkdir $WorkDirectory]}
 } else {
index 222fdaf..efc0e2b 100644 (file)
@@ -527,19 +527,19 @@ if { [regexp "LAYERS" $CompareDocumentsMode] || [regexp "ALL" $CompareDocumentsM
 ################## WRITING FILE ##################"
 ###Open temporary file
 if { [string compare ${TypeOfFile} ""] == 0  } {
-    set saving [SaveAs D_First $WorkDirectory/D_First.dxc]
+    set saving [SaveAs D_First $WorkDirectory/${casename}_D_First.dxc]
     set closing [Close D_First]
-    set opening [Open $WorkDirectory/D_First.dxc D_Second]
+    set opening [Open $WorkDirectory/${casename}_D_First.dxc D_Second]
 } elseif {[string compare ${TypeOfFile} "igs"] == 0 } {
-    set writing [WriteIges D_First $WorkDirectory/D_First.igs]
-    set reading [ReadIges D_Second $WorkDirectory/D_First.igs]
+    set writing [WriteIges D_First $WorkDirectory/${casename}_D_First.igs]
+    set reading [ReadIges D_Second $WorkDirectory/${casename}_D_First.igs]
 } elseif {[string compare ${TypeOfFile} "stp"] == 0 } {
-    set writing [WriteStep D_First $WorkDirectory/D_First.stp]
-    set reading [ReadStep D_Second $WorkDirectory/D_First.stp]
+    set writing [WriteStep D_First $WorkDirectory/${casename}_D_First.stp]
+    set reading [ReadStep D_Second $WorkDirectory/${casename}_D_First.stp]
 } elseif {[string compare ${TypeOfFile} "brep"] == 0 } {
     XGetOneShape Shape1 D_First
-    set saving [save Shape1 $WorkDirectory/D_First.brep]
-    restore $WorkDirectory/D_First.brep NewShape1 
+    set saving [save Shape1 $WorkDirectory/${casename}_D_First.brep]
+    restore $WorkDirectory/${casename}_D_First.brep NewShape1 
     XNewDoc D_Second
     XAddShape D_Second NewShape1 
 } else {
@@ -548,13 +548,13 @@ if { [string compare ${TypeOfFile} ""] == 0  } {
 }
 
 if { [string compare ${TypeOfFile} ""] == 0  } {
-    catch {[file delete $WorkDirectory/D_First.dxc]}
+    catch {[file delete $WorkDirectory/${casename}_D_First.dxc]}
 } elseif {[string compare ${TypeOfFile} "igs"] == 0 } {
-    catch {[file delete $WorkDirectory/D_First.igs]}    
+    catch {[file delete $WorkDirectory/${casename}_D_First.igs]}    
 } elseif {[string compare ${TypeOfFile} "stp"] == 0} {
-    catch {[file delete $WorkDirectory/D_First.stp]}
+    catch {[file delete $WorkDirectory/${casename}_D_First.stp]}
 } elseif {[string compare ${TypeOfFile} "brep"] == 0} {
-    catch {[file delete $WorkDirectory/D_First.brep]}
+    catch {[file delete $WorkDirectory/${casename}_D_First.brep]}
 }
 # Get information
 # Get shape for standard analysis
@@ -923,7 +923,7 @@ if {[isdraw result]} {
     smallview
     donly result
     fit
-    xwd $imagedir/photo.gif
+    xwd $imagedir/${test_image}.gif
 }
 
 if {[expr $ErrorCode == 2]} {