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

[C] Update build-and-test.bash #4055

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ once compile, you can run it with ``` ./main ```

Note: You dont need to specify includes for models and include folder seperately as they are path linked. You just have to import the api.h file in your code, the include linking will work.

## Test petstore sample
Copy link
Member

@wing328 wing328 Oct 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zhemant thanks for the PR but I don't think we should add petstore specified instruction in the template as the spec provided by the user may have nothing to do with Petstore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I understand, Then I will modify the README to guide how to compile the user code with the generated code. That was the reason I referenced how it will happen in petstore. I will push another commit

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closing this as there's no update for a while. Please open a new one when you've time.

In CMakeLists.txt, uncomment line 67 to 90 inorder to compile and generate the executables for manual tests. Once the tests are generated, execute then with ./{testname}
## Author

{{#apiInfo}}{{#apis}}{{^hasMore}}{{infoEmail}}
Expand Down
7 changes: 4 additions & 3 deletions samples/client/petstore/c/build-and-test.bash
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ cmake .

make

./unit-manual-PetAPI
./unit-manual-UserAPI
./unit-manual-StoreAPI
if [ -f unit-manual-PetAPI ]; then ./unit-manual-PetAPI; fi
if [ -f unit-manual-UserAPI ]; then ./unit-manual-UserAPI; fi
if [ -f unit-manual-StoreAPI ]; then ./unit-manual-StoreAPI; fi