@@ -1282,15 +1282,36 @@ def test_toy_modaltsoftname(self):
12821282 toy_ec_txt ,
12831283 "versionsuffix = '-two'" ,
12841284 "dependencies = [('toy', '0.0', '-one')]" ,
1285+ "modaltsoftname = 'toytwo'" ,
12851286 ])
12861287 write_file (ec2 , ec2_txt )
12871288
12881289 extra_args = [
12891290 '--module-naming-scheme=HierarchicalMNS' ,
1290- '--robot-paths=%s' % self .test_prefix ,
1291+ '--robot-paths=%s' % self .test_prefix ,
12911292 ]
12921293 self .test_toy_build (ec_file = self .test_prefix , verify = False , extra_args = extra_args , raise_error = True )
12931294
1295+ software_path = os .path .join (self .test_installpath , 'software' , 'Core' )
1296+ modules_path = os .path .join (self .test_installpath , 'modules' , 'all' , 'Core' )
1297+
1298+ # install dirs for both installations should be there (using original software name)
1299+ self .assertTrue (os .path .exists (os .path .join (software_path , 'toy' , '0.0-one' , 'bin' , 'toy' )))
1300+ self .assertTrue (os .path .exists (os .path .join (software_path , 'toy' , '0.0-two' , 'bin' , 'toy' )))
1301+
1302+ # modules for both installations with alternative name should be there
1303+ self .assertTrue (os .path .exists (os .path .join (modules_path , 'toytwo' , '0.0-two.lua' )))
1304+ self .assertTrue (os .path .exists (os .path .join (modules_path , 'yot' , '0.0-one.lua' )))
1305+
1306+ # only subdirectories for software should be created
1307+ self .assertEqual (os .listdir (software_path ), ['toy' ])
1308+ self .assertEqual (sorted (os .listdir (os .path .join (software_path , 'toy' ))), ['0.0-one' , '0.0-two' ])
1309+
1310+ # only subdirectories for modules with alternative names should be created
1311+ self .assertEqual (sorted (os .listdir (modules_path )), ['toytwo' , 'yot' ])
1312+ self .assertEqual (os .listdir (os .path .join (modules_path , 'toytwo' )), ['0.0-two.lua' ])
1313+ self .assertEqual (os .listdir (os .path .join (modules_path , 'yot' )), ['0.0-one.lua' ])
1314+
12941315
12951316def suite ():
12961317 """ return all the tests in this file """
0 commit comments