mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
6f3e689eeb
> increased the timeout for TCP tests because per @irungentoo the network on Travis-CI can be slow sometimes > allowed groupchats test to restart on error until timeout This had to be done because current groupchats are fundamentally broken and 3/5 times they'll 'net-split' on connect >> Drop group chat tests, add comment to the reason > added some debugging information to TCP tests, and a #define to force IPV6 (Travis-CI only uses IPv4 on their containers) and decreased the itr interval > Went crazy with timeouts for Tox network stuff on Travis. Tests on TCP will still randomly fail due to timeouts. I can't reproduce on any local system. So again per @irungentoo, Travis is slow, let's offer it a short bus.
50 lines
1.6 KiB
Markdown
50 lines
1.6 KiB
Markdown
This folder contains the input file (``tox.in.h``) that has to be used to generate the ``tox.h`` api with: https://github.com/iphydf/apidsl
|
|
|
|
# Minimal requirements
|
|
|
|
There are some minimal requirements to contribute to ``tox.h``:
|
|
* unix environment
|
|
* ``astyle`` ``>=2.03``
|
|
* [``apidsl``](https://github.com/iphydf/apidsl) (you can use provided service with curl instead)
|
|
|
|
## Quick way
|
|
|
|
If you want to do it quickly and you don't have time for anything other than copypasting commands, you should have ``curl`` installed.
|
|
|
|
|
|
1. Make sure that you have ``curl`` and ``>=astyle-2.03`` installed
|
|
2. Modify [``tox.in.h``](/other/apidsl/tox.in.h)
|
|
3. Run command below ↓
|
|
|
|
Command to run from ``toxcore`` directory (quick way, involves using curl):
|
|
```bash
|
|
rm toxcore/tox.h && \
|
|
( curl -X POST --data-binary @- https://apidsl.herokuapp.com/apidsl < ./other/apidsl/tox.in.h > ./toxcore/tox.h ) && \
|
|
astyle --options=./other/astyle/astylerc ./toxcore/tox.h
|
|
```
|
|
|
|
When formatting will be complete, you should see output like:
|
|
```
|
|
Formatted ./toxcore/tox.h
|
|
```
|
|
|
|
You may want to make sure with ``git diff`` that changes made in ``tox.h`` reflect changes in ``tox.in.h``.
|
|
|
|
And you're done.
|
|
|
|
|
|
## Manually
|
|
|
|
If you prefer to have more control over what is happening, there are steps below:
|
|
|
|
1. Install [``apidsl``](https://github.com/iphydf/apidsl)
|
|
2. Install ``astyle``, version 2.03 or later.
|
|
3. Modify [``tox.in.h``](/other/apidsl/tox.in.h)
|
|
4. Use ``apidsl`` ``??``
|
|
5. Parse generated ``tox.h`` with astyle, minimal command for it would be:
|
|
```bash
|
|
astyle --options=./other/astyle/astylerc ./toxcore/tox.h
|
|
```
|
|
|
|
**Always pass output from ``apidsl`` through astyle.**
|