-
-
Notifications
You must be signed in to change notification settings - Fork 140
Improvements to README and tests #1748
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
Conversation
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign the CLA at https://www.nativescript.org/cla. |
|
Retargeted to the |
|
Retargeted back to |
Previously, if these tests were to fail, they'd never call `done()` and so Jasmine would wait for the full timeout period before declaring the tests failed. (This would happen if you didn't have the NPM dependencies installed.)
The build file for SBG tests uses some properties, such as ns_default_asm_version, that are defined in the toplevel build file. This build file needs to import those properties.
One step for installing the jsparser tests dependencies. This also updates the lockfile if you do it with a recent version of NPM; speculatively including that in this commit in case it doesn't break anything else. Another step for setting the appropriate environment variables. They're already mentioned in the Android Studio instructions above, but you'll need to set them separately in your shell if building from the command line.
This JAR file, which contains the Java runtime classes, doesn't exist as a separate file ever since Java 9.x. Therefore this test can't work as it previously did. This removes the setup code that tries to read rt.jar, which always fails. It adds assertions for the results of generateBinding(), since in the current state of the test, without access to rt.jar, the generation fails and generateBinding() returns null.
Since we can no longer load lib/rt.jar, and system classes no longer exist in an actual JAR file, this introduces a small helper function to get a BCEL JavaClass for a system class, using ClassPath.SYSTEM_CLASS_PATH. (I'm not sure why this only came up in tests and not in runtime execution of the static binding generator, though.)
The Pack200 interface was removed in Java 11, so these interfaces no longer exist in modern Java. I believe they were only used as sample interfaces in the tests anyway, so just remove them from the test data.
"gradlew runtest" doesn't work because Gradle complains the name of the target is ambiguous.
Some of the paths need to be updated. The JSON file is now generated, not checked in to V8. So in order to edit the protocol we need to modify the PDL file, which is the source of the JSON file.
These files make it possible to run the test-app in Android Studio, then connect it to the devtools inspector with `ns debug android --start`. (The package.json lists a dependency, but there's no need to run `npm install` if you have the NativeScript CLI already installed globally.)
This consists of various fixes and improvements to the build instructions and tests that I came across when building for the first time. (Doesn't fix any specific issue number.) See the individual commit messages for more explanation, but here's a summary:
No new tests; the changes are either in the documentation, in the tests themselves, or fixes that enable the tests to complete successfully on my machine.