82
82
local_location = os.path.join(
84
84
'tests/autopilot/address_book_service_testability/data/vcard.vcf')
85
phablet_location = 'address_book_service_testability/data/vcard.vcf'
85
86
bin_location = '/usr/share/address-book-service/data/vcard.vcf'
86
87
cal_location = os.path.join('/usr/lib/python2.7/dist-packages/',
87
88
'address_book_service_testability/data/',
89
90
if os.path.exists(local_location):
91
print('Using %s for vcard' % local_location)
90
92
return local_location
93
elif os.path.exists(phablet_location):
94
print('Using %s for vcard' % phablet_location)
95
return phablet_location
96
elif os.path.exists(cal_location):
97
print('Using %s for vcard' % cal_location)
91
99
elif os.path.exists(bin_location):
93
elif os.path.exists(cal_location):
100
print('Using %s for vcard' % bin_location)
94
101
return bin_location
96
raise RuntimeError('No VCARD found in %s or %s or %s' %
97
(local_location, bin_location, cal_location))
103
raise RuntimeError('No VCARD found in %s or %s or %s or %s' %
104
(local_location, bin_location,
105
cal_location, phablet_location))
100
108
class RestartService(Fixture):