Olmayan test suite çıkartıldı [ yerine konunca ekleriz ], birazdan autotools gelecek, böcek ezmekle uğraşıyorum actionsapi içinde
This commit is contained in:
@@ -4,6 +4,8 @@
|
|||||||
import os, string, re, shutil
|
import os, string, re, shutil
|
||||||
from shell import *
|
from shell import *
|
||||||
|
|
||||||
|
from pisi.ui import ui
|
||||||
|
|
||||||
def gnuconfig_findnewest():
|
def gnuconfig_findnewest():
|
||||||
''' find the newest config.* file according to
|
''' find the newest config.* file according to
|
||||||
timestamp and return it'''
|
timestamp and return it'''
|
||||||
@@ -15,25 +17,26 @@ def gnuconfig_findnewest():
|
|||||||
'/usr/share/automake-1.6/config.sub',
|
'/usr/share/automake-1.6/config.sub',
|
||||||
'/usr/share/automake-1.5/config.sub',
|
'/usr/share/automake-1.5/config.sub',
|
||||||
'/usr/share/automake-1.4/config.sub',
|
'/usr/share/automake-1.4/config.sub',
|
||||||
'share/config.sub']
|
'share/config.sub']
|
||||||
|
|
||||||
newer_location = {}
|
newer_location = {}
|
||||||
|
|
||||||
for i in locations:
|
for i in locations:
|
||||||
if not os.path.exists(i):
|
if not os.path.exists(i):
|
||||||
continue
|
continue
|
||||||
newer_location[i] = re.sub('\'',
|
newer_location[i] = re.sub('\'', '',
|
||||||
'',
|
string.split((cat(i) | tr(str.rstrip)
|
||||||
string.split((cat(i) |
|
| grep ('^timestamp')
|
||||||
tr(str.rstrip) |
|
| join), '=')[1])
|
||||||
grep ('^timestamp') |
|
|
||||||
join), '=')[1])
|
|
||||||
|
|
||||||
keys = newer_location.keys()
|
keys = newer_location.keys()
|
||||||
keys.sort()
|
keys.sort()
|
||||||
map(newer_location.get, keys)
|
|
||||||
|
|
||||||
return os.path.dirname(newer_location.popitem()[0])
|
thelist=[]
|
||||||
|
for i in keys:
|
||||||
|
thelist.append((i, newer_location[i]))
|
||||||
|
|
||||||
|
return os.path.dirname(thelist[0][0])
|
||||||
|
|
||||||
def gnuconfig_update():
|
def gnuconfig_update():
|
||||||
''' copy newest config.* onto source's '''
|
''' copy newest config.* onto source's '''
|
||||||
@@ -42,11 +45,11 @@ def gnuconfig_update():
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
shutil.copyfile(newer_location + '/config.sub',
|
shutil.copyfile(newer_location + '/config.sub',
|
||||||
os.getcwd() + '/config.sub')
|
os.getcwd() + '/config.sub')
|
||||||
shutil.copyfile(newer_location + '/config.guess',
|
shutil.copyfile(newer_location + '/config.guess',
|
||||||
os.getcwd() + '/config.guess')
|
os.getcwd() + '/config.guess')
|
||||||
except IOError:
|
except IOError, e:
|
||||||
print 'Hata mata...'
|
ui.error ("Error : %s\n" % e)
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
print 'GNU Config Update Finished...'
|
ui.info('GNU Config Update Finished...\n')
|
||||||
|
|||||||
+2
-4
@@ -14,16 +14,14 @@ def run_all():
|
|||||||
import archivetests
|
import archivetests
|
||||||
import installdbtests
|
import installdbtests
|
||||||
import packagedbtests
|
import packagedbtests
|
||||||
import versiontests
|
|
||||||
|
|
||||||
alltests = unittest.TestSuite((
|
alltests = unittest.TestSuite((
|
||||||
specfiletests.suite,
|
specfiletests.suite,
|
||||||
contexttests.suite,
|
contexttests.suite,
|
||||||
fetchertests.suite,
|
fetchertests.suite,
|
||||||
archivetests.suite,
|
archivetests.suite,
|
||||||
versiontests.suite,
|
installdbtests.suite,
|
||||||
installdbtests.suite,
|
packagedbtests. suite
|
||||||
packagedbtests. suite
|
|
||||||
))
|
))
|
||||||
|
|
||||||
runTestSuite(alltests)
|
runTestSuite(alltests)
|
||||||
|
|||||||
Reference in New Issue
Block a user