← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 3711: Fix check-script

 

------------------------------------------------------------
revno: 3711
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Wed 2015-08-05 17:03:26 +0200
message:
  Fix check-script
modified:
  scripts/checks-and-tests/checks/checkViscElPM2.py


--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'scripts/checks-and-tests/checks/checkViscElPM2.py'
--- scripts/checks-and-tests/checks/checkViscElPM2.py	2015-06-02 17:09:57 +0000
+++ scripts/checks-and-tests/checks/checkViscElPM2.py	2015-08-05 15:03:26 +0000
@@ -61,16 +61,18 @@
   PyRunner(command = 'check()',iterPeriod = int(0.05/O.dt)-1)
 ]
 
-
-################################################################################
-# RUN
-O.saveTmp()
-O.run(int(0.05/O.dt))
 ################################################################################
 def check():
+	global resultStatus
 	# Compare imposed restitution coefficient and obtained one
 	enMeasured = (O.bodies[1].state.vel[2]-O.bodies[0].state.vel[2])/(2*v)
 	tolerance = 1e-2
-	if (abs(enMeasured -en)/en)<tolerance:
+	if (abs(enMeasured -en)/en)>tolerance:
 		resultStatus+=1
+################################################################################
+# RUN
+O.run(int(0.05/O.dt))
+O.wait()
+################################################################################
+