Commit Graph

2760 Commits

Author SHA1 Message Date
Augustin Cavalier
581cd2a22d Nuke COMPILE_FOR_R5.
Not used in $long_time, almost certainly broken, so it's just cruft.
2017-11-15 17:52:27 +01:00
Andrew Lindesay
3d528c4a60 HaikuDepot: Change communication mechanism with server for repos
(last commit with same title only included new files - added those now)

Previously the desktop application would make a number of JSON-RPC calls
over HTTP to get the repositories.  Now it will make a single call to get
the repositories and cache the result.  This uses standard HTTP cache
signalling techniques and allows the server-side the ability to cache
the generated data as well.  Note that the model classes and parse-
related classes are generated and may not be code-style compliant.  They
are generated from JSON schema files in the server-side project.
Information about this as well as the python files used to generate the
C++ classes and headers are included in the server-side project.
2017-11-03 20:10:01 +01:00
Andrew Lindesay
e457080a4a HaikuDepot: Change communication mechanism with server for repos
Previously the desktop application would make a number of JSON-RPC calls
over HTTP to get the repositories.  Now it will make a single call to get
the repositories and cache the result.  This uses standard HTTP cache
signalling techniques and allows the server-side the ability to cache
the generated data as well.  Note that the model classes and parse-
related classes are generated and may not be code-style compliant.  They
are generated from JSON schema files in the server-side project.
Information about this as well as the python files used to generate the
C++ classes and headers are included in the server-side project.
2017-10-20 22:33:10 +02:00
Jérôme Duval
a295d3f46e wait4(): retrieve dead team entries usage information.
* This adds a parameter to the wait_for_child syscall. I extended the test case
to show the actual retrieved information.
* fix #13546
2017-10-10 17:20:46 +02:00
Augustin Cavalier
6aff37d1c7 Move SHA256 class to libroot instead of linking libshared into libroot.
Discussed with PulkoMandy and on the haiku-commits mailing list.

Thanks to @jessicah for compile-testing and fixing 2 small issues I missed.
2017-10-03 20:18:26 -04:00
Jérôme Duval
ccd42320c4 libroot: add posix_spawn(). 2017-09-12 19:42:57 +02:00
Akshay Agarwal
ed3f47fe2e BDateFormatTest: Add tests for day and month names for all format syles.
Signed-off-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
2017-08-31 10:27:26 +12:00
Adrien Destugues
62abb67d6e Cleanup my mess.
Repeatedly applying the wrong patch won't work.

When do we switch to Gerrit? :'(
2017-08-30 20:29:58 +02:00
Akshay Agarwal
f2c460497c BDurationFormatTest: Add test cases for abbreviated format style.
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2017-08-30 20:15:30 +02:00
Akshay Agarwal
dadffbdbff BDurationFormatTest: Add test cases for abbreviated format style.
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2017-08-30 19:32:48 +02:00
Akshay Agarwal
b73f6bf1c9 BDurationFormatTest: Add test cases for abbreviated format style.
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2017-08-26 15:48:24 +02:00
Akshay Agarwal
ffdbd12882 Fix BDateFormatTest: Consider timezone in test cases.
* Issue: A time_t value of say '12345678' results into different timestamps
in different timezones. So the expected output will not match the result of
BDateFormat::Format() if the calendar's timezone is different from the
timezone of the expected output, and the tests 'TestFormat' and
'TestCustomFormat' will fail.

* Fix: Add timezone information in the test cases and pass the timezone
while calling BDateFormat::Format() in order to set the calendar's
timezone same as that of the expected output.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2017-08-26 12:19:59 +02:00
Akshay Agarwal
cf91123041 Add unit tests for BRelativeDateTimeFormat.
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2017-08-26 09:02:52 +02:00
Adrien Destugues
dd582ff9d5 Add a test for #13664
Interaction between ConstrainClippingRegion and transforms leads to
button frames and background not being drawn at all.

Also shows another problem with rounded corner buttons when mixed with
transforms.
2017-08-20 14:59:21 +02:00
Andrew Lindesay
a1c3daa638 HaikuDepot : Streaming Icon Meta-Data Parser
More background work for later performance improvements.
This change generalizes the parsing of meta-data from
JSON streams as similarly structured meta-data is
anticipated to be carried in other payloads.  Unit tests
have also been implemented to provide coverage on this
new functionality.
2017-08-01 23:19:27 +02:00
Philippe Houdoin
12b5c184b2 kernel: add fifo polling test from #7859 2017-08-01 18:50:36 +00:00
Philippe Houdoin
17f88a29db Fix x86_64 build 2017-08-01 18:37:39 +00:00
Adrien Destugues
01c1bb6223 Remove more Locale Kit cruft.
BNumberFormat is the way to go for all of this. This code was not even
compiled in.
2017-07-30 19:25:16 +02:00
Jérôme Duval
cffce774dd Add a test for wait4(). 2017-06-19 18:33:15 +02:00
Adrien Destugues
3ec7701779 NaturalCompare: implement using locale kit
The non-locale aware version is kept in src/build/libshared for use on
the host system and in packagefs (kernel add-on). In both cases, ICU is
not available.

Fixes #8192
2017-05-29 14:04:44 +02:00
Adrien Destugues
a19a18f553 Rework BCollator API
- Strength is now set once, instead of at each comparison, to improve
  performance and fix potential locking issues
- Add a way to enable "numeric" collation (aka "natural order")
2017-05-29 08:52:43 +02:00
Andrew Lindesay
0c28e8e5a0 Implementation of JSON Streaming Parser
Fix warnings related to x86_64 tests' compilation.
2017-05-14 10:44:03 +12:00
Jérôme Duval
221b77b6ac JsonToMessageTest: fix build on x86_64. 2017-05-13 13:31:50 +02:00
Andrew Lindesay
1f6b57a5d2 Implementation of JSON Streaming Parser
This change will introduce a streaming parser capability to Haiku.  The
existing functionality of writing the JSON data to a BMessage in-memory
model is retained.  The new parser implements a SAX-style listener based
interface where the listener accepts parse events.  Unit tests have been
supplied for the JSON parser as well.
2017-05-13 18:50:39 +12:00
Augustin Cavalier
c72855f6c0 libMicro: Remove from tree.
Upstream libMicro builds and runs on Haiku with minimal changes now
(no recipe as it does not have an INSTALL mechanism). I submitted
a pull request with those to upstream, but for now you can get them
from https://github.com/waddlesplash/libMicro.
2017-05-12 17:20:29 -04:00
Axel Dörfler
655aae6a79 KPathTest: Fix build for GCC 5.
* Also fixed a warning in KPath.
* Sorry, again!
2017-04-30 18:17:51 +02:00
Axel Dörfler
e9843da357 KPath: Added LAZY_ALLOC flag.
* This allows KPath to not allocate a buffer when initialized
  without path.
* Added test cases for this.
* Added test for LockBuffer().
* Enhanced tests to allow building them in debug mode.
* Moved calling vfs_normalize_path() into own private method.
* Improved error codes; B_NO_MEMORY is now only returned if the
  allocation actually failed.
* If used with LAZY_ALLOC, Path() and LockBuffer() are now allowed
  to return a NULL path.
2017-04-30 17:14:45 +02:00
Axel Dörfler
f94671c33d KPath.Adopt(): Fixed path length.
* Issue was hidden due to inappropriate test values; changed test
  to uncover it.
2017-04-30 17:13:45 +02:00
Axel Dörfler
e1b4aed0cb KPath: Fixed Normalize() return code, changed Leaf().
* Normalize() now returns the error code that vfs_normalize_path()
  returns.
* Leaf() now returns "" instead of "/" for the root. It's not used
  outside of KPath.
* Adapted RemoveLeaf() to deal with this correctly.
* "KPath = string" no longer changes the buffer size.
* Added missing operator tests for =, ==, and !=.
2017-04-30 17:13:33 +02:00
Axel Dörfler
afd07b5621 KPathTest: Fixed build with gcc 5. 2017-04-29 21:55:23 +02:00
Axel Dörfler
663b800476 Added unit tests for KPath.
* There are a few oddities, and at least one bug.
2017-04-29 19:02:14 +02:00
Dario Casalinuovo
4263f2570d media_client: Fix Jamfiles to build correctly 2017-04-28 02:13:51 +02:00
Dario Casalinuovo
dda3a9c309 Move media_client to bin 2017-04-28 02:13:51 +02:00
Dario Casalinuovo
0d25cdf031 Remove play* commands from bin 2017-04-28 02:13:51 +02:00
Dario Casalinuovo
ada4f9788f MediaClient: Add play and test options 2017-04-28 02:13:51 +02:00
Augustin Cavalier
3f2162c629 tests/kits/net: Remove old version of the DialUpPreflet.
Hopefully there aren't any more copies of this hiding in the tree....
2017-04-25 10:56:42 -04:00
Augustin Cavalier
5495e4f674 netperf: Remove from tree.
Not actively used and there is a recipe available.
2017-04-25 10:55:29 -04:00
Augustin Cavalier
15d60d5e45 stickit_BJoystick: Remove unused .proj file. 2017-04-18 16:02:49 -04:00
Adrien Destugues
a4834579f8 Add test for BNetworkAddress::Equals
Shows that #12247 is invalid.
2017-03-25 15:49:44 +01:00
John Scipione
dc0b0016ad StringSearchTest: Add unit tests for new methods 2017-02-21 18:03:03 -08:00
John Scipione
17a4134733 StringSearchTest: automatic whitespace cleanup 2017-02-21 18:03:03 -08:00
Augustin Cavalier
b6f76ebe71 s/OpenBeOS License/MIT License/ universally, as they're the same thing.
Fixes #8681.
2017-02-09 22:09:56 -05:00
Freeman Lou
aa3083e086 Style fixes to various parts of the system.
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

This patch was never applied after GSoC 2012. Rebase the parts that
still apply so we can close the ticket.

Fixes #9490.
2017-01-29 22:47:28 +01:00
Andrew Aldridge
f31b1a2faf Implement scrypt-based password hashing
Signed-off-by: Axel Dörfler <axeld@pinc-software.de>
2017-01-17 23:09:04 +01:00
Dario Casalinuovo
7561d9ac5d Populate media/experimental with future media_kit classes
* Node implementations headers are move into src/kits/media.
2017-01-16 23:04:14 +01:00
Dario Casalinuovo
fdfd8a502e General MediaClient cleanup
* Avoid setting fRunning in different places.
* Fix SimpleMediaOutput kind mismatch.
* Other minor fixes.
2017-01-15 19:28:14 +01:00
Adrien Destugues
bdd02e0d9d BString: rename SetCharAt to SetByteAt
Makes it clear that it operates on bytes, not unicode codepoints.
Thanks to mmlr for remembering me of this subtlety.
2017-01-12 22:03:51 +01:00
Adrien Destugues
7556ae845b Fix unit tests for BString API change. 2017-01-11 21:54:31 +01:00
Dmytro Shynkevych
0e0f49e799 libroot: Implemented pthread barriers
This is an implementation of pthread barriers pursuant to the relevant specification.

Barriers are essentially a special case of conditional variables,
such that all threads waiting on one are woken up when the number of
waiters reaches a number provided at the initialization of the barrier.
In view of that, this implementation mimics the implementation of pthread_cond,
except it is more specialized and self-contained.

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2016-12-30 11:32:04 +01:00
Jérôme Duval
9969137ced fork(): Follow-up fix to 17b2a3cfc.
* Ingo rightly noticed that the defer_signals counter is reinitialized on
  thread's user area creation. Setting the flag THREAD_CREATION_FLAG_DEFER_SIGNALS
  indeed gives the expected behavior, deferring signals until undefer_signals() is
  called in the child thread. Thanks for the review and fix suggestion.
* Added a simple test showing the values of the defer_signals counter after fork().
2016-12-18 09:44:03 +01:00