Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion easybuild/framework/easyblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -2368,7 +2368,7 @@ def guess_start_dir(self):
# make sure start_dir subdir exists (cfr. check below)
mkdir(os.path.join(topdir, start_dir), parents=True)

abs_start_dir = os.path.join(topdir, start_dir)
abs_start_dir = os.path.join(topdir, start_dir) if start_dir else topdir
if topdir.endswith(start_dir) and not os.path.exists(abs_start_dir):
self.cfg['start_dir'] = topdir
else:
Expand Down
2 changes: 2 additions & 0 deletions test/framework/easyblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -2845,6 +2845,8 @@ def check_start_dir(expected_start_dir):
abs_expected_start_dir = os.path.join(eb.builddir, expected_start_dir)
self.assertTrue(os.path.samefile(eb.cfg['start_dir'], abs_expected_start_dir))
self.assertTrue(os.path.samefile(os.getcwd(), abs_expected_start_dir))
self.assertTrue(eb.cfg['start_dir'].endswith(abs_expected_start_dir))
self.assertFalse(eb.cfg['start_dir'].endswith(os.path.sep))

# default (no start_dir specified): use unpacked dir as start dir
self.assertEqual(ec['ec']['start_dir'], None)
Expand Down
4 changes: 2 additions & 2 deletions test/framework/easyconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -1510,8 +1510,8 @@ def test_start_dir_template(self):
eb.run_all_steps(False)
logtxt = read_file(eb.logfile)
start_dir = os.path.join(eb.builddir, 'toy-0.0')
self.assertIn('start_dir in configure is %s/ &&' % start_dir, logtxt)
self.assertIn('start_dir in build is %s/ &&' % start_dir, logtxt)
self.assertIn('start_dir in configure is %s &&' % start_dir, logtxt)
self.assertIn('start_dir in build is %s &&' % start_dir, logtxt)
ext_start_dir = os.path.join(eb.builddir, 'bar', 'bar-0.0')
self.assertIn('start_dir in extension configure is %s &&' % ext_start_dir, logtxt)
self.assertIn('start_dir in extension build is %s &&' % ext_start_dir, logtxt)
Expand Down
Loading