@@ -638,7 +638,7 @@ def test_get_easyblock_instance(self):
638638 from easybuild .easyblocks .toy import EB_toy
639639 testdir = os .path .abspath (os .path .dirname (__file__ ))
640640
641- ec = process_easyconfig (os .path .join (testdir , 'easyconfigs' , 'toy-0.0.eb' ))[0 ]
641+ ec = process_easyconfig (os .path .join (testdir , 'easyconfigs' , 'test_ecs' , 't' , 'toy' , ' toy-0.0.eb' ))[0 ]
642642 eb = get_easyblock_instance (ec )
643643 self .assertTrue (isinstance (eb , EB_toy ))
644644
@@ -652,7 +652,7 @@ def test_fetch_patches(self):
652652 """Test fetch_patches method."""
653653 # adjust PYTHONPATH such that test easyblocks are found
654654 testdir = os .path .abspath (os .path .dirname (__file__ ))
655- ec = process_easyconfig (os .path .join (testdir , 'easyconfigs' , 'toy-0.0.eb' ))[0 ]
655+ ec = process_easyconfig (os .path .join (testdir , 'easyconfigs' , 'test_ecs' , 't' , 'toy' , ' toy-0.0.eb' ))[0 ]
656656 eb = get_easyblock_instance (ec )
657657
658658 eb .fetch_patches ()
@@ -698,7 +698,7 @@ def test_obtain_file(self):
698698 mkdir (tmpdir_subdir , parents = True )
699699 del os .environ ['EASYBUILD_SOURCEPATH' ] # defined by setUp
700700
701- ec = process_easyconfig (os .path .join (testdir , 'easyconfigs' , 'toy-0.0.eb' ))[0 ]
701+ ec = process_easyconfig (os .path .join (testdir , 'easyconfigs' , 'test_ecs' , 't' , 'toy' , ' toy-0.0.eb' ))[0 ]
702702 eb = EasyBlock (ec ['ec' ])
703703
704704 # 'downloading' a file to (first) sourcepath works
@@ -752,7 +752,8 @@ def test_check_readiness(self):
752752
753753 # check that check_readiness step works (adding dependencies, etc.)
754754 ec_file = 'OpenMPI-1.6.4-GCC-4.6.4.eb'
755- ec_path = os .path .join (os .path .dirname (os .path .abspath (__file__ )), 'easyconfigs' , ec_file )
755+ topdir = os .path .dirname (os .path .abspath (__file__ ))
756+ ec_path = os .path .join (topdir , 'easyconfigs' , 'test_ecs' , 'o' , 'OpenMPI' , ec_file )
756757 ec = EasyConfig (ec_path )
757758 eb = EasyBlock (ec )
758759 eb .check_readiness_step ()
@@ -780,7 +781,7 @@ def test_exclude_path_to_top_of_module_tree(self):
780781 w.r.t. not including any load statements for modules that build up the path to the top of the module tree.
781782 """
782783 self .orig_module_naming_scheme = config .get_module_naming_scheme ()
783- test_ecs_path = os .path .join (os .path .dirname (os .path .abspath (__file__ )), 'easyconfigs' )
784+ test_ecs_path = os .path .join (os .path .dirname (os .path .abspath (__file__ )), 'easyconfigs' , 'test_ecs' )
784785 all_stops = [x [0 ] for x in EasyBlock .get_steps ()]
785786 build_options = {
786787 'check_osdeps' : False ,
@@ -804,8 +805,8 @@ def test_exclude_path_to_top_of_module_tree(self):
804805 # since both icc/ifort and impi form the path to the top of the module tree
805806 iccifort_mods = ['icc' , 'ifort' , 'iccifort' ]
806807 tests = [
807- ('impi-4.1.3.049-iccifort-2013.5.192-GCC-4.8.3.eb' , impi_modfile_path , iccifort_mods ),
808- ('imkl-11.1.2.144-iimpi-5.5.3-GCC-4.8.3.eb' , imkl_modfile_path , iccifort_mods + ['iimpi' , 'impi' ]),
808+ ('i/impi/ impi-4.1.3.049-iccifort-2013.5.192-GCC-4.8.3.eb' , impi_modfile_path , iccifort_mods ),
809+ ('i/imkl/ imkl-11.1.2.144-iimpi-5.5.3-GCC-4.8.3.eb' , imkl_modfile_path , iccifort_mods + ['iimpi' , 'impi' ]),
809810 ]
810811 for ec_file , modfile_path , excluded_deps in tests :
811812 ec = EasyConfig (os .path .join (test_ecs_path , ec_file ))
@@ -839,8 +840,8 @@ def test_exclude_path_to_top_of_module_tree(self):
839840
840841 def test_patch_step (self ):
841842 """Test patch step."""
842- test_easyconfigs = os .path .join (os .path .abspath (os .path .dirname (__file__ )), 'easyconfigs' )
843- ec = process_easyconfig (os .path .join (test_easyconfigs , 'toy-0.0.eb' ))[0 ]
843+ test_easyconfigs = os .path .join (os .path .abspath (os .path .dirname (__file__ )), 'easyconfigs' , 'test_ecs' )
844+ ec = process_easyconfig (os .path .join (test_easyconfigs , 't' , 'toy' , ' toy-0.0.eb' ))[0 ]
844845 orig_sources = ec ['ec' ]['sources' ][:]
845846
846847 toy_patches = [
@@ -870,8 +871,8 @@ def test_patch_step(self):
870871
871872 def test_extensions_sanity_check (self ):
872873 """Test sanity check aspect of extensions."""
873- test_ecs_dir = os .path .join (os .path .abspath (os .path .dirname (__file__ )), 'easyconfigs' )
874- toy_ec = EasyConfig (os .path .join (test_ecs_dir , 'toy-0.0-gompi-1.3.12-test.eb' ))
874+ test_ecs_dir = os .path .join (os .path .abspath (os .path .dirname (__file__ )), 'easyconfigs' , 'test_ecs' )
875+ toy_ec = EasyConfig (os .path .join (test_ecs_dir , 't' , 'toy' , ' toy-0.0-gompi-1.3.12-test.eb' ))
875876
876877 # purposely put sanity check command in place that breaks the build,
877878 # to check whether sanity check is only run once;
@@ -886,7 +887,8 @@ def test_extensions_sanity_check(self):
886887
887888 def test_parallel (self ):
888889 """Test defining of parallellism."""
889- toy_ec = os .path .join (os .path .abspath (os .path .dirname (__file__ )), 'easyconfigs' , 'toy-0.0.eb' )
890+ topdir = os .path .abspath (os .path .dirname (__file__ ))
891+ toy_ec = os .path .join (topdir , 'easyconfigs' , 'test_ecs' , 't' , 'toy' , 'toy-0.0.eb' )
890892 toytxt = read_file (toy_ec )
891893
892894 handle , toy_ec1 = tempfile .mkstemp (prefix = 'easyblock_test_file_' , suffix = '.eb' )
@@ -930,8 +932,8 @@ def test_parallel(self):
930932
931933 def test_guess_start_dir (self ):
932934 """Test guessing the start dir."""
933- test_easyconfigs = os .path .join (os .path .abspath (os .path .dirname (__file__ )), 'easyconfigs' )
934- ec = process_easyconfig (os .path .join (test_easyconfigs , 'toy-0.0.eb' ))[0 ]
935+ test_easyconfigs = os .path .join (os .path .abspath (os .path .dirname (__file__ )), 'easyconfigs' , 'test_ecs' )
936+ ec = process_easyconfig (os .path .join (test_easyconfigs , 't' , 'toy' , ' toy-0.0.eb' ))[0 ]
935937
936938 def check_start_dir (expected_start_dir ):
937939 """Check start dir."""
@@ -960,8 +962,8 @@ def check_start_dir(expected_start_dir):
960962
961963 def test_prepare_step (self ):
962964 """Test prepare step (setting up build environment)."""
963- test_easyconfigs = os .path .join (os .path .abspath (os .path .dirname (__file__ )), 'easyconfigs' )
964- ec = process_easyconfig (os .path .join (test_easyconfigs , 'toy-0.0.eb' ))[0 ]
965+ test_easyconfigs = os .path .join (os .path .abspath (os .path .dirname (__file__ )), 'easyconfigs' , 'test_ecs' )
966+ ec = process_easyconfig (os .path .join (test_easyconfigs , 't' , 'toy' , ' toy-0.0.eb' ))[0 ]
965967
966968 mkdir (os .path .join (self .test_buildpath , 'toy' , '0.0' , 'dummy-dummy' ), parents = True )
967969 eb = EasyBlock (ec ['ec' ])
0 commit comments