Skip to content

Commit bcf8edf

Browse files
committed
run.py: don't assume directory name
This fixes some test (if the repository dir is not named exactly native_client).
1 parent 0b72576 commit bcf8edf

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

run.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -637,20 +637,7 @@ def ReadELFInfo(f):
637637

638638

639639
def FindBaseDir():
640-
'''Crawl backwards, starting from the directory containing this script,
641-
until we find the native_client/ directory.
642-
'''
643-
644-
curdir = os.path.abspath(sys.argv[0])
645-
while os.path.basename(curdir) != 'native_client':
646-
curdir,subdir = os.path.split(curdir)
647-
if subdir == '':
648-
# We've hit the file system root
649-
break
650-
651-
if os.path.basename(curdir) != 'native_client':
652-
Fatal('Unable to find native_client directory!')
653-
return curdir
640+
return os.path.dirname(__file__)
654641

655642

656643
if __name__ == '__main__':

0 commit comments

Comments
 (0)