Skip to content

Converted test.sh bash script to Javascript #200

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

Closed
wants to merge 3 commits into from

Conversation

sastava007
Copy link
Contributor

What this PR does
This PR converts the test.sh bash script file to javascript making it the platform agnostic. This PR is part of a series of PRs trying to solve issue #174

Changes you made
Converted the bash commands into it's closely equivalent JS commands using shellJS package.

Screenshot/ CodeSnippet
Not required

Test Configuration:
Tried to test locally for various codegens by running npm test <codegen-name> and comparing the result obtained with that generated from the similar bash script.

Follow up
Not required

Thanks for contributing! ❤️

@sastava007
Copy link
Contributor Author

@umeshp7 Please review.

@sastava007
Copy link
Contributor Author

@umeshp7 @shreys7 Can you please restart the build for this PR, as it failed because of some internal issue with shellJS which I think can be passed by trying for one more time.

@shreys7
Copy link
Member

shreys7 commented Mar 9, 2020

I tried running it twice, but it failed with the same errors @sastava007

@sastava007
Copy link
Contributor Author

@shreys7 Any hint, on what I might be doing wrong?
I'm not able to figure out.

@umeshp7
Copy link
Contributor

umeshp7 commented Mar 15, 2020

@sastava007 You could try removing shell.config.fatal=true; This is preventing from the console.log(commandOut.stderr) to be printed.
Once you do that you will know what is the error.

Warning: Could not find any test files matching pattern: ./test/codegen/structure.test.js
Warning: Could not find any test files matching pattern: curl

@umeshp7
Copy link
Contributor

umeshp7 commented Mar 17, 2020

@sastava007
I have tried running this locally. There are issues while running npm run test.
Can you address them?

@sastava007
Copy link
Contributor Author

@umeshp7 Okay, I'll try to fix them once I complete the draft for my proposal.

@someshkoli
Copy link
Contributor

someshkoli commented May 6, 2020

@shreys7 Any hint, on what I might be doing wrong?
I'm not able to figure out.

This might be a problem with shelljs. Checkout this. Try updating to shelljs 0.8.2 or above, currently latest stable release is 0.8.4. @sastava007

@sastava007
Copy link
Contributor Author

This might be a problem with shelljs. Checkout this. Try updating to shelljs 0.8.2 or above, currently latest stable release is 0.8.4. @sastava007

@someshkoli Yeah, I've figured it out. I will update and submit by weekend.

@webholik webholik requested a review from umeshp7 October 19, 2020 14:47
@umeshp7
Copy link
Contributor

umeshp7 commented Sep 25, 2024

Stale

@umeshp7 umeshp7 closed this Sep 25, 2024
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

Successfully merging this pull request may close these issues.

5 participants