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

Cut down test262 suite size in half #444

Closed
szegedi opened this issue May 23, 2018 · 2 comments
Closed

Cut down test262 suite size in half #444

szegedi opened this issue May 23, 2018 · 2 comments

Comments

@szegedi
Copy link
Contributor

szegedi commented May 23, 2018

We could probably cut down the test suite size of test262 by a factor of 2: for every test case, there's both a …-s.js and a …gs.js file. Their logic seems identical, so running both seems unnecessary. The -s ones use the "assert" function while the gs ones basically inline it (so they run even when "assert" is not defined). We should stick with one set instead of running both.

@sainaen
Copy link
Contributor

sainaen commented May 24, 2018

Hm, your “factor of 2” might be a bit too optimistic. :)

Right now I see 119 pairs of *-s.js and *gs.js tests (out of 29693 total *.js files in test directory) and we run only 7 of them. Here’s how I counted:

$ find test262/test -iname '*.js' -type f | sed 's/gs\.js$//;s/-s\.js$//' | sort | uniq -c | grep -v ' 1 ' | wc -l
  119

$ ./gradlew -Dtest.single=Test262SuiteTest test
$ grep 'test262Case\[' buildGradle/**/org.mozilla.javascript.tests.Test262SuiteTest.html | sed 's/gs\.js,//;s/-s\.js,//' | sort | uniq -c | grep -v ' 1 ' | wc -l
  21 # we run each test with opt={-1,0,9}, so 21/3 = 7

But also,

@szegedi
Copy link
Contributor Author

szegedi commented May 24, 2018

In this case, we should leave everything as-is, it's not worth spending time on it. On the other hand, thank you for your time looking into it and making a thorough analysis!

@szegedi szegedi closed this as completed May 24, 2018
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