X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=tests%2Fswig_python%2Fhighgui%2Fworks.py;fp=tests%2Fswig_python%2Fhighgui%2Fworks.py;h=db1eaab15c6c5d5f388acf2031eecd25a88f04a0;hb=e4c14cdbdf2fe805e79cd96ded236f57e7b89060;hp=0000000000000000000000000000000000000000;hpb=454138ff8a20f6edb9b65a910101403d8b520643;p=opencv diff --git a/tests/swig_python/highgui/works.py b/tests/swig_python/highgui/works.py new file mode 100755 index 0000000..db1eaab --- /dev/null +++ b/tests/swig_python/highgui/works.py @@ -0,0 +1,29 @@ +# needed for access() and remove() +import os + +# check for required featurest listet in 'filelist' and removes the old .works file of 'testname' +def check_files( filelist, testname ): + # delete old .works file of the calling test, if it exists + filename = "./"+testname+".works" + + if os.access(filename,os.F_OK): + os.remove(filename) + + # now check for existint .works files + if len(filelist) > 0: + for i in range(0,len(filelist)): + tmpname = "./"+filelist[i]+".works" + if not os.access(tmpname,os.F_OK): + print "(INFO) Skipping '"+testname+"' due to SKIP/FAIL of '"+filelist[i]+"'" + return False + + # either the filelist is empty (no requirements) or all requirements match + return True + + +# create the .works file for test 'testname' +def set_file( testname ): + # create .works file of calling test + works_file = file("./"+testname+".works", 'w',1) + works_file.close + return