Sort order in directory globs #135

Merged
merged 1 commit into from Apr 3, 2012

Conversation

Projects
None yet
3 participants
@tddium

tddium commented Apr 3, 2012

Hello,

The order in which Jasmine headless webkit loads files specified on jasmine.yml is file system dependent.
On MacOS X, HFS+ guarantees that directory entries are read in sorted order (http://developer.apple.com/legacy/mac/library/#technotes/tn/tn1150.html). This is not the case with other Unix filesystems such as ext2/ext3/ext4 under Linux. The inconsistency in load order results in a test suite that works in one place (e.g. on a Mac) but the same suite fails due to load order problems in another (e.g. on a Linux box). In fact, the results can differ from one copy of a suite to another on the same Linux box depending on the sequence of file create, remove, etc. calls in each copy. A simple solution is to sort the results of expanding a directory glob so that the results are consistent across platforms.

@recurser

This comment has been minimized.

Show comment Hide comment
@recurser

recurser Apr 3, 2012

+1

recurser commented Apr 3, 2012

+1

johnbintz added a commit that referenced this pull request Apr 3, 2012

Merge pull request #135 from tddium/master
Sort order in directory globs

@johnbintz johnbintz merged commit 724541a into johnbintz:master Apr 3, 2012

@johnbintz

This comment has been minimized.

Show comment Hide comment
@johnbintz

johnbintz Apr 3, 2012

Owner

Thanks!

Owner

johnbintz commented Apr 3, 2012

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment