X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=rec10%2Ftrunk%2Fsrc%2Fauto_test.py;h=b5c5f2a56b57cc503a1dd45b84e7847df4c785cc;hb=6f529f8a75e472a51a0a8949be96ee17e1a81977;hp=78ddcca10c489cb73de7ea7204f20b8926a0bbad;hpb=ad07c3acea4f226acbe34ce169d3b4a1aaaf0739;p=rec10%2Frec10-git.git diff --git a/rec10/trunk/src/auto_test.py b/rec10/trunk/src/auto_test.py index 78ddcca..b5c5f2a 100644 --- a/rec10/trunk/src/auto_test.py +++ b/rec10/trunk/src/auto_test.py @@ -5,19 +5,22 @@ import os import os.path import time +import optparse +import sys +import datetime import configreader import chdb import tv2mp4 import tv2ts -def test_all_ch_encode(option,time): +def test_all_ch_encode(option,stime): chl=chdb.getall() print chl path= configreader.getpath("test") tpath=os.path.join(path, "encode_test") if not os.path.exists(tpath): os.mkdir(tpath) - dnowt=datetime.datetime.now().strftime("%Y-%m-%d_%H:%M:%S")+"("+option+")" + dnowt=datetime.datetime.now().strftime("%Y-%m-%d_%H:%M:%S")+"_"+option+"" tpatht=os.path.join(tpath,dnowt) if not os.path.exists(tpatht): os.mkdir(tpatht) @@ -26,7 +29,7 @@ def test_all_ch_encode(option,time): print t pathname=os.path.join(tpatht,t['chtxt']) print pathname - tv2ts.tv2ts(pathname+".ts",t['ch'],t['csch'], time) + tv2ts.tv2ts(pathname+".ts",t['ch'],t['csch'], stime) tv2mp4.ts2mp4(pathname+".ts", pathname+".mp4", option) time.sleep(2) if __name__ == "__main__": @@ -36,4 +39,5 @@ if __name__ == "__main__": parser.add_option("-e","--Encode",action="store",type="string",dest="encode_option",default="",metavar="TITLE",help="encode test(option)") (opts,args)=parser.parse_args(sys.argv) if opts.encode_option != "":##-sの場合 - test_all_ch_encode(opts.encode_option, 10) \ No newline at end of file + print "test_all_ch_encode" + test_all_ch_encode(opts.encode_option, "10") \ No newline at end of file