bids-validator icon indicating copy to clipboard operation
bids-validator copied to clipboard

[SCHEMA] Validator Fails In Unique Ways on Mac

Open bendhouseart opened this issue 2 years ago • 2 comments
trafficstars

Running Deno tests on osx produces failing tests that pass elsewhere, namely:

hasMatch and missingLabel

System:

macOS Monterey Version 12.6.3

deno --version
deno 1.31.1 (release, aarch64-apple-darwin)
v8 11.0.226.13
typescript 4.9.4

To reproduce:

git checkout 059caf33c4ea0c2844269c9273d27873c51c1ca4
git submodule update --init --recursive
git submodule update --recursive --remote
cd bids-validator
deno test --allow-all src/

Expected Results (only three of these should fail):

 FAILURES 

validate bids-examples => ./src/tests/local/bids_examples.test.ts:32:6
empty_files dataset => ./src/tests/local/empty_files.test.ts:12:6
validate schema expression tests => ./src/tests/schema-expression-language.test.ts:11:6

Actual Results:

2 additional failures: hasMatch and missingLabel

 FAILURES 

validate bids-examples => ./src/tests/local/bids_examples.test.ts:32:6
empty_files dataset => ./src/tests/local/empty_files.test.ts:12:6
validate schema expression tests => ./src/tests/schema-expression-language.test.ts:11:6
test hasMatch => ./src/validators/filenameIdentify.test.ts:68:6
test missingLabel => ./src/validators/filenameValidate.test.ts:16:6

FAILED | 21 passed (225 steps) | 5 failed (127 steps) (28s)

error: Test failed

bendhouseart avatar Mar 23 '23 19:03 bendhouseart

File with underscore and no hyphens errors out. ... FAILED (6ms) error: NotFound: No such file or directory (os error 2): stat '/tmp/folders' this.#fileInfo = Deno.lstatSync(this._getPath())

No match ... FAILED (5ms) error: NotFound: No such file or directory (os error 2): stat '/tmp/folders' this.#fileInfo = Deno.lstatSync(this._getPath())

rwblair avatar Mar 27 '23 15:03 rwblair

Looks like we hard-code /tmp in a couple places. Should use mkdtemp which seems to exist in both node and deno.

effigies avatar Mar 27 '23 15:03 effigies

I believe this has been done. Please reopen if not.

effigies avatar Aug 07 '24 01:08 effigies