5 import shutil, sys, os, valtools
7 from optparse
import OptionParser
12 parser = OptionParser()
13 parser.usage =
"usage: %prog" 15 parser.add_option(
"-e",
"--extension", dest=
"extension",
16 help=
"adds an extension to the name of this benchmark",
19 parser.add_option(
"-f",
"--force", dest=
"force",action=
"store_true",
20 help=
"force the submission. Be careful!",
24 (options,args) = parser.parse_args()
36 print 'submitting from local: ', localBench
39 comparisons = website.listComparisons( bench )
40 if len(comparisons)>0:
41 print 'You are about to make the following list of comparison pages obsolete. These pages will thus be removed:' 45 while answer !=
'y' and answer !=
'n':
46 answer = raw_input(
'do you agree? [y/n]')
53 bench.makeRelease( website )
56 if bench.exists( website ) ==
True:
57 if options.force ==
False:
58 print 'please use the -e option to choose another extension' 59 print ' e.g: submit.py -e Feb10' 63 print 'overwriting...' 64 shutil.rmtree(bench.benchmarkOnWebSite(website))
69 shutil.copytree(localBench.fullName(), bench.benchmarkOnWebSite(website) )
70 print 'done. Access your benchmark here:' 71 print bench.benchmarkUrl( website )
75 for comparison
in comparisons:
76 rm =
'rm -rf '+comparison