Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

any way to *exclude* features? #146

Closed
ljharb opened this issue Apr 11, 2022 · 12 comments
Closed

any way to *exclude* features? #146

ljharb opened this issue Apr 11, 2022 · 12 comments

Comments

@ljharb
Copy link

ljharb commented Apr 11, 2022

For example, I want to run all the Array.prototype tests, but I want to skip any TypedArray or Symbol.unscopables tests. How would I do this?

@ljharb
Copy link
Author

ljharb commented Apr 12, 2022

I hacked something with a preprocessor, but it'd be great if i could provide it as a command-line option directly.

@ljharb
Copy link
Author

ljharb commented Jun 2, 2022

awesome, thanks!

@rwaldron
Copy link
Collaborator

rwaldron commented Jun 2, 2022

No problem! sorry for the delay

@rwaldron
Copy link
Collaborator

rwaldron commented Jun 2, 2022

@ljharb
Copy link
Author

ljharb commented Jun 2, 2022

hmm, i'm trying it in my project, but it doesn't seem to be working:

test262-harness -t "$(node -pe 'os.cpus().length - 1')" --prelude=./browser.js --host-args='--unhandled-rejections=none' --features-exclude='resizable-arraybuffer,regexp-unicode-property-escapes,regexp-named-groups,cross-realm,TypedArray,Temporal,Atomics,ShadowRealm,Proxy,FinalizationRegistry,WeakRef' --preprocessor=./test/preprocessor.js --test262-dir=node_modules/test262 'node_modules/test262/test/built-ins/**/*.js'

@rwaldron
Copy link
Collaborator

rwaldron commented Jun 2, 2022

@ljharb I'll take a look first thing tomorrow.

@rwaldron
Copy link
Collaborator

rwaldron commented Jun 2, 2022

A quick check right now:

~/clonez/test262-harness master
λ ./bin/run.js -t "$(node -pe 'os.cpus().length - 1')" --features-exclude='Atomics' --host-type=d8 --host-path=$(which v8) "$TEST262_DIR/test/built-ins/Atomics/**/*.js"
Ran 0 tests
0 passed
0 failed

~/clonez/test262-harness master
λ ./bin/run.js -t "$(node -pe 'os.cpus().length - 1')" --features-exclude='BigInt' --host-type=d8 --host-path=$(which v8) "$TEST262_DIR/test/built-ins/Atomics/**/*.js"
FAIL ../test262/test/built-ins/Atomics/wait/cannot-suspend-throws.js (default)
  `Atomics.wait(i32a, 0, 0, 0)` throws TypeError Expected a TypeError to be thrown but no exception was thrown at all

FAIL ../test262/test/built-ins/Atomics/wait/cannot-suspend-throws.js (strict mode)
  `Atomics.wait(i32a, 0, 0, 0)` throws TypeError Expected a TypeError to be thrown but no exception was thrown at all

Ran 536 tests
534 passed
2 failed
./bin/run.js -t "$(node -pe 'os.cpus().length - 1')"  --host-type=d8    18.94s user 12.45s system 269% cpu 11.661 total

~/clonez/test262-harness master 11s
λ ./bin/run.js -t "$(node -pe 'os.cpus().length - 1')" --host-type=d8 --host-path=$(which v8) "$TEST262_DIR/test/built-ins/Atomics/**/*.js"
FAIL ../test262/test/built-ins/Atomics/wait/cannot-suspend-throws.js (strict mode)
  `Atomics.wait(i32a, 0, 0, 0)` throws TypeError Expected a TypeError to be thrown but no exception was thrown at all

FAIL ../test262/test/built-ins/Atomics/wait/cannot-suspend-throws.js (default)
  `Atomics.wait(i32a, 0, 0, 0)` throws TypeError Expected a TypeError to be thrown but no exception was thrown at all

FAIL ../test262/test/built-ins/Atomics/wait/bigint/cannot-suspend-throws.js (default)
  `Atomics.wait(i64a, 0, 0n, 0)` throws TypeError Expected a TypeError to be thrown but no exception was thrown at all

FAIL ../test262/test/built-ins/Atomics/wait/bigint/cannot-suspend-throws.js (strict mode)
  `Atomics.wait(i64a, 0, 0n, 0)` throws TypeError Expected a TypeError to be thrown but no exception was thrown at all

Ran 740 tests
736 passed
4 failed
./bin/run.js -t "$(node -pe 'os.cpus().length - 1')" --host-type=d8    27.99s user 18.52s system 267% cpu 17.370 total

This all looks correct, but like I said: I will dig deeper tomorrow morning 👍

@ljharb
Copy link
Author

ljharb commented Jun 2, 2022

Thanks. All of your examples have a single feature, so maybe the issue is with multiples?

@rwaldron
Copy link
Collaborator

rwaldron commented Jun 2, 2022

Maybe? I wrote tests that used multiples, but maybe the tests are wrong. Will find out tomorrow 😄

@rwaldron
Copy link
Collaborator

rwaldron commented Jun 2, 2022

@ljharb give 9.2.0 a try please

@ljharb
Copy link
Author

ljharb commented Jun 2, 2022

that seems to be working :-D thanks!

@rwaldron
Copy link
Collaborator

rwaldron commented Jun 2, 2022

No problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants