Commit Graph

2723 Commits

Author SHA1 Message Date
Julian Harnath
e3d7394869 app_server: fix test-app_server for launch_daemon changes
* Make test-app_server work again in a launch_daemon environment

* test_registrar gets a separate signature and port name again so the
  host system can distinguish it from the system registrar

* AppServer is normally a BServer now, however, there can't be two
  BApplications in one team. A class TestServerLoopAdapter is added,
  which becomes the base class of AppServer instead of BServer when
  compiling for libbe_test. It's an adapter class which looks towards
  AppServer as it if was a BServer, but internally it is derived from
  MessageLooper (like the old AppServer before the transition to
  BServer).

  This way, AppServer can stay a BServer in normal builds and it also
  avoids having to use too many #ifdefs to distinguish the two
  versions.
2015-08-23 01:00:32 +02:00
Michael Lotz
5d4501aa01 Assorted whitespace cleanup and typo fixes. 2015-08-20 21:54:41 +02:00
Julian Harnath
2a58d5432d Merge branch 'master' into app_server 2015-08-15 11:12:35 +02:00
Stefano Ceccherini
a361dc5a17 Update ChannelSliderTest to add limit labels for individual channels 2015-08-01 15:00:36 +02:00
Fredrik Holmqvist
0cd38980a3 Add unit tests specific for #12208. Pass depends on network.
NetworkAddressTest passes (most) tests when you have network.
When no network interface (ie -net none in QEMU) tests take forever and
more tests fail.
When network interface exists but is disabled in Haiku, tests are fast but
more tests fail.
2015-07-28 22:13:23 +02:00
Alexander von Gluck IV
89de782660 test/kits/net: Fix build of cookie_test 2015-07-26 09:55:45 -05:00
Alexander von Gluck IV
eef1c442a3 test/kits/net: Fix build of NetEndpointTest 2015-07-26 09:47:50 -05:00
Julian Harnath
551438b9be app_server: add new BView layers API
* Add new methods
    BView::BeginLayer(uint8 opacity)
    BView::EndLayer()

* All drawing between begin and end of a layer is redirected onto an
  intermediate bitmap. When ending the layer, this bitmap is
  composited onto the view with the opacity given when the layer was
  started.

* Layers can be nested arbitrarily and will be blended onto each
  other in order. There can also be any arbitrary interleaving of
  layer begin/end and drawing operations.

* Internally, drawing commands are redirected into a BPicture between
  BeginLayer and EndLayer (but client code need not know or care
  about this). Client code can also start/end other BPictures while
  inside a layer.

* Uses the PictureBoundingBoxPlayer to determine the size of the
  layer bitmap before allocating and drawing into it, so it does not
  allocate more memory than necessary and -- more importantly -- it
  will not alpha-composite more pixels than necessary.

* Drawing mode is always set to B_OP_ALPHA, blend mode to
  (B_PIXEL_ALPHA, B_ALPHA_COMPOSITE) while inside layers. This is
  necessary for (a) correct compositing output and (b) for
  redirection of drawing into the intermediate bitmap, which uses the
  renderer_region offset (in B_OP_COPY, the Painter does not use the
  AGG renderer methods, it directly accesses the pixel data. This
  would access out-of-bounds without the offset, so B_OP_COPY cannot
  be allowed.)
  To ensure these modes aren't changed, BView::SetDrawingMode()
  and BView::SetBlendingMode() are ignored while inside a layer.

* The main motivation behind this new API is WebKit, which internally
  expects such a layers functionality to be present. A performant and
  reusable implementation of this functionality can only be done
  server-side in app_server.
2015-07-25 16:35:52 +02:00
Julian Harnath
8511f6ac9b app_server: fix ServerPicture::SyncState pen size
* Should use the unscaled pen size here because we also write down
  the current scale, and we don't want to scale the pen twice.
2015-07-25 16:31:20 +02:00
Julian Harnath
ad53a0d999 app_server: add unit test add-on, test for SimpleTransform
* app_server currently does not have any real unit tests, making
  changes more difficult and riskier. A new directory unit_tests with
  a test add-on is added in app_server's tetsts directory to hold
  future unit tests.

* Add test for SimpleTransform class
2015-07-25 16:31:19 +02:00
Julian Harnath
ab1bd2fd07 app_server: rename DrawingContext to Canvas
* Better reflects the purpose of the class: an interface for things
  in which we can draw (e.g. a View)

* Accordingly rename OffscreenContext to OffscreenCanvas
2015-07-25 16:30:29 +02:00
Axel Dörfler
d54bb194d7 launch_daemon: Empty conditions are now NULL.
* Instead of an empty and-condition.
2015-07-22 20:45:06 +02:00
Axel Dörfler
95d93d2ea9 launch_daemon: Fixed empty on/if parsing.
* An extra empty message was mistakenly created.
2015-07-22 20:45:02 +02:00
Axel Dörfler
5a76694819 launch_daemon: Added events parsing.
* Including tests, also for the environment parsing.
2015-07-22 20:44:34 +02:00
Axel Dörfler
3888dd6e73 launch_daemon: Fixed condition tests build.
* ConditionContext changed.
2015-07-22 20:44:30 +02:00
Axel Dörfler
e0fc09b439 launch_daemon: Conditions now know if they are constant.
* This allows to remove a job in the init phase already, if its
  condition is not only constant, but also failing.
* Also removed the special Job::LaunchInSafeMode() method; this is now
  done using the conditions (the config option no_safemode remains,
  though).
2015-07-22 20:43:13 +02:00
Axel Dörfler
004cd6709d launch_daemon: Added run directive.
* Allows to conditionally (or unconditionally) launch targets.
* Including tests for the settings parser.
* FirstBootPrompt is now launched when deemed necessary (as in
  the Bootscript).
2015-07-22 20:43:08 +02:00
Axel Dörfler
0e347cb203 launch_daemon: Added condition tests. 2015-07-22 20:42:54 +02:00
Axel Dörfler
1e9c987102 launch_daemon: Added basic support for conditions.
* Admittedly not very well thought out, but it should be good
  enough for now; it doesn't really make sense to initialize jobs
  that is never run due to failed conditions.
* Job, and Target now have a common base class BaseJob that deals
  with the conditions.
2015-07-22 20:42:41 +02:00
Axel Dörfler
f7cf381a14 launch_daemon: Completed condition parser. 2015-07-22 20:42:36 +02:00
Axel Dörfler
e73c936699 launch_daemon: Started working on condition parsing.
* Moved related test code from DriverSettingsMessageAdapterTest to the
  SettingsParser class.
* Added SettingsParserTest class -- most tests already succeed, but not
  all; support for the flattened "not" is not working yet.
2015-07-22 20:42:32 +02:00
Axel Dörfler
c4b6278c02 DriverSettingsMessageAdapter: added "wildcard" support.
* You can now add arbitrarily named fields to the message as well,
  without having them all specified in the template.
* Also added a missing converter method that is called when there
  are no values to add, and implemented all methods in the base
  class, so that you only have to implement the methods you actually
  need.
2015-07-22 20:42:22 +02:00
Axel Dörfler
4bf862e368 syslog_daemon: Converted to BServer.
* Instead of letting the kernel search for the syslog port, the
  daemon now registers itself with the kernel (which even solves
  a TODO).
* A port is created for the actual log messages from the launch_daemon,
  and used on start.
* However, the SyslogTest does not yet work, due to the BMessage <->
  KMessage communication problems.
2015-07-22 20:40:47 +02:00
Dario Casalinuovo
fb6c8a0479 NodeTest: Add GetNodeAttributesFor test 2015-07-13 18:13:48 +02:00
Dario Casalinuovo
5720dfd49a MediaKit: Update NodeTest
* Update it to actual API and restore build.
* Add SyncToNode test.
2015-07-10 18:46:18 +02:00
Philippe Saint-Pierre
cdec47c927 Workaround timing issues in Chart
When run on a VM (VBox, vmware), the timing calculations done were giving weird
results (< 1ms), messing with the logic (div by zero introduced).

Should take care of ticket #89.
2015-07-02 16:12:32 -04:00
Augustin Cavalier
26de45da21 posixtestsuite: Delete from tree.
The Open POSIX Testsuite can now be found at
https://github.com/haiku/open_posix_testsuite - most of the patches
can be found in "master", and the full Git history of this directory
can be found in the "from_haiku_trunk" branch (the patches there
should eventually be merged to "master", whenever someone has time
to look at it.)
2015-06-29 16:46:10 -04:00
Augustin Cavalier
53711093fa BeServed: delete from tree.
Nobody did anything significant with it, so it now lives over at
https://github.com/HaikuArchives/BeServed.
2015-06-23 16:54:48 -04:00
Augustin Cavalier
4fe78e3499 tests: Convert a lot of RSRCs to RDEFs. 2015-06-22 15:39:47 -04:00
Adrien Destugues
a558d18527 Revert "filesystems: we aren't BeOS, so we can safely use -O2(+)."
This reverts commit ae495ca8fe.

My system volume was mysteriously corrupted while booting or shutting down today,
enough to make it unbootable and KDL on attempt to mount it. I'm assuming our gcc2
still isn't safe with regard to -O2 optimization of filesystems, and revert this,
until proven wrong (eg. by running test suites and FS stress tests and finding no
issues.

Axel comented on the commit saying it probably was not a good idea, but no action was
taken. Should we setup a better commit review system?
2015-06-22 18:51:03 +02:00
Augustin Cavalier
ae495ca8fe filesystems: we aren't BeOS, so we can safely use -O2(+). 2015-05-08 13:28:01 -04:00
Michael Lotz
ffba66060b UserlandFS: Make 64 bit clean and enable build for x86_64.
I did not bother to fix the BeOS kernel emulation, so this part is
still left out of the x86_64 build.
2015-03-29 16:25:17 +02:00
Jérôme Duval
9f543f8044 Fix unittests build. 2015-03-27 20:37:23 +01:00
Axel Dörfler
d044457531 BNetworkAddress::IsEmpty() now detects empty ipv4/6.
* Until now, only AF_UNSPEC addresses could be empty.
* Now, the unspecified IPV4/IPv6 address is considered empty, too.
* This corresponds to how the kernel modules handles this.
2015-03-27 13:25:29 +01:00
Axel Dörfler
687d0bc272 DriverSettingsMessageAdapter: fixed converter signature.
* The ConvertFromDriverSettings() method missed the current value
  index.
* Completed unit tests, and enabled them all.
2015-03-27 13:25:28 +01:00
Axel Dörfler
9f218b4e2d DriverSettingsMessageAdapter: fixed various issues.
* _AddParameter() would ignore all BMessage::Add*() errors.
* _ConvertFromDriverParameter() would ignore most intermediate error,
  but would fail badly over some incorrect settings file.
* Also, it checked for the parent value for each parameter, which
  doesn't make any sense, but would add as often as there are
  parameters -- which also may be none, in which case the value
  got ignored.
2015-03-27 13:25:28 +01:00
Michael Lotz
d0f53f151d StickIt: Don't close the app when closing a JoystickWindow.
Since it now actually works to open multiple windows for different
devices, don't close the app when closing the device window.
2015-02-15 10:07:08 +01:00
Michael Lotz
e2d7e6c4be StickIt: Construct a new BJoystick object to pass to the window.
Previously the same BJoystick object was reused when opening a new
window, which caused all windows to show the data of the same device.
2015-02-15 10:07:05 +01:00
Alexander von Gluck IV
1c646c0bcd tests/posix: Drop bonnie++, recipe exists and not api test 2015-02-02 18:24:01 +00:00
Alexander von Gluck IV
3b8ca9ebdf tests: math_test, use std:isnan vs isnan
* As far as I can tell, you're not supposed to
  use cmath isnan from cpp as the std namespace
  includes it
* libroot Tests now build again.
2015-02-02 18:06:13 +00:00
Alexander von Gluck IV
048ffc1b1e tests: Fix wording of echo. No func change 2015-02-02 16:51:59 +00:00
Alexander von Gluck IV
4a961136b7 tests: add cstring to math_test for str funcs 2015-02-02 16:47:20 +00:00
Alexander von Gluck IV
ad91a99198 tests: The wchar header actually looks for _GNU_SOURCE
* We we are pretty mixed here. See #11818
2015-02-02 16:30:23 +00:00
Alexander von Gluck IV
fc8aebca3b tests: fix signal_in_allocator_test printf type 2015-02-02 16:18:05 +00:00
Alexander von Gluck IV
f6faff8960 tests: check for _USE_GNU and define sighandler_t is not (matching signal.h logic) 2015-02-02 16:17:42 +00:00
Alexander von Gluck IV
2ea35f1cb3 tests: Skip setjmp_test2.S test on non-x86 platforms
* We'll need to rewrite this for each arch..
2015-02-02 15:55:10 +00:00
Alexander von Gluck IV
0d5cfeec92 tests: We can no longer open /bin/sh r/w due to PM for flock
* Use /etc/passwd
2015-02-02 15:47:23 +00:00
Alexander von Gluck IV
b8be4f7268 tests: Fix libroot flock pointer size on non-32bit platforms 2015-02-02 15:43:16 +00:00
Adrien Destugues
ed00de38d9 Midi test1: style fixes. 2015-02-02 08:56:38 +01:00
Adrien Destugues
3b520fdcd4 Fix missing include in NetworkInterfaceTest. 2015-01-21 11:18:55 +01:00
Axel Dörfler
7fb1396861 BFS B+tree test: use set to ensure string uniqueness.
* The previous solution was rather slow, and also could produce
  duplicates under some circumstance.
2015-01-15 20:30:50 +01:00
Axel Dörfler
758cfd808a BFS B+tree test: style cleanup. 2015-01-15 20:30:45 +01:00
Axel Dörfler
f982c9ed88 BFS btreeTest: fixed DEBUG build. 2015-01-15 20:30:43 +01:00
Adrien Destugues
a7d444d145 Remove old block cache implementation
This was not used anywhere except the tests written for it (which is
also removed).
2015-01-13 15:48:59 +01:00
Adrien Destugues
ace74964f1 Remove khash from the sources.
Fixes #9552.
2015-01-13 15:48:58 +01:00
Jérôme Duval
1d766e9dd3 mixerToy: fix build on gcc4 2015-01-08 21:21:42 +01:00
Axel Dörfler
c1f779e350 IMAP: FetchMessageEntriesCommand now also works without UIDs
* This will be used to solve the TODO in CheckMailboxesCommand::Process()
  when the initial message sizes/flags are retrieved.
* Also fixed imap_tester build.
2015-01-06 15:26:33 +01:00
Axel Dörfler
3302df142e imap: WIP of getting fetching headers to work.
* Changed the FetchListener mechanism quite a bit.
* Doesn't seem to work correctly yet, although most pieces are in
  place now.
2015-01-06 15:25:33 +01:00
Axel Dörfler
9234fd439e imap: Implemented encoding RFC3501 strings.
* Was completely missing so far.
* Fixed bug in decoding that handled the "&-" sequence incorrectly.
* Added small test application that should easily be convertible to
  a unit test.
2015-01-06 15:25:28 +01:00
Axel Dörfler
82f27de238 imap_tester: Fixed build after Protocol.GetFolders() changes. 2015-01-06 15:25:19 +01:00
Axel Dörfler
bfe83adcb2 imap_tester: Fixed SSL build. 2015-01-06 15:25:00 +01:00
Axel Dörfler
077338a9b8 Completed literal handling.
* LiteralHandler commands now receive the literal data as intended.
* The 'fetch' command in the imap_tester now uses this to print the literal
  to stdout.
2015-01-06 15:21:03 +01:00
Axel Dörfler
1704480100 Read some more specs, cleaned Protocol a bit.
* Added some TODO comments based on the various IMAP specs and extensions.
* Removed SelectMailbox() functionality from the Protocol class; it's not
  really useful to have it there.
* Removed some other methods that don't belong into the Protocol class.
2015-01-06 15:20:25 +01:00
Axel Dörfler
db0a4f2c00 More work in progress of the IMAP rework.
* Implemented FetchCommand, and some more.
* Improved and extended the imap_tester.
* The base to implement the new InboundProtocol on is now mostly done, at least
  for a start.
2015-01-06 15:20:20 +01:00
Axel Dörfler
37d26ae5e2 Work in progress of rewrite; IMAP doesn't even compile at this point. 2015-01-06 15:20:11 +01:00
Adrien Destugues
4c0fbf2e52 linprog test: fix build. 2014-12-24 11:52:01 +01:00
Alexander von Gluck IV
e2523ea3f2 tests/egl: Add egl test code.
* Early EGL support has been pushed into mesa
  thanks to the GCI work of Adrián Arroyo Calle.
* No, this isn't hardware rendering :-)
2014-12-23 15:42:02 -05:00
Adrien Destugues
459b8e9796 Cleanup midi tests directory
* synth_file_reader: TList to BObjectList.
* delete two old prototypes of MidiPlayer and the README noting that
they should be removed
* delete reference to PatchBay which was moved to src/apps in 2013.

Fixes #7027.
2014-12-22 13:00:17 +01:00
Adrien Destugues
216f305cea TeamMonitorTest: fix build, exit on window close. 2014-12-19 13:38:46 +01:00
Adrien Destugues
524288065b Test for #3970.
* This shows the problem in Haiku, it is not easily possible to change the
color of BStringItem.
* It also shows that the BeOS implementation doesn't restore the view
state after drawing items, so the last item in the list also draws
green, and selecting the first also makes it green.
2014-12-10 13:30:10 +01:00
Adrien Destugues
dca4966cd6 ScreenTest: style fixes. 2014-12-09 15:17:20 +01:00
Adrien Destugues
dab42bf05b MixerToy: do an initialisation run on the mixer
The Interpolating mixer has internal state which must be setup by a
previous frame (we assume 0 for the first frame). Since we work on
exactly a period of the wave here, sending the same data twice works as
it should.
2014-12-08 18:51:47 +01:00
Adrien Destugues
258fbe371b MixerToy: app for testing mixer resamplers.
* Shows a source wave (black), a sampled version of it (red), and a
resampled version of that using the mixer (green).
* Debugging tool for #9438. Shows that the drop/repeat resampler is
working ok, but interpolate is quite broken.
2014-12-08 18:10:31 +01:00
Adrien Destugues
96bac1b30b Add a test for #2945. 2014-12-05 14:51:47 +01:00
Theodore Kokkoris
249a4944c3 Removed dead code (CID: 1255314) 2014-12-03 21:14:24 +01:00
Adrien Destugues
1f8b3fdb7e Storage Kit tests: apply relevant parts of #7025
Patch by Karvjorm. Picked only the code changes as it seems the Jamfile
changes were not needed or already done.
* Use BObjectList instead of BList
* Add some more directory constants to FindDirectory tests.
2014-11-21 17:44:11 +01:00
Adrien Destugues
da8f008d15 Add a amfile to build cdda for userlandfs.
It crashes early after mounting in get_vnode, but the UserlandFS won't
build in DEBUG=1 (see #8422), making this not very helpful...
2014-11-17 17:36:53 +01:00
Adrien Destugues
e8ceef7357 Fix typo in getaddrinfo test. 2014-11-06 18:32:23 +01:00
Adrien Destugues
bca1813626 Add test for getaddrinfo on empty host.
* This should fail immediately, but it timeouts after 22 seconds when
the network interfaces are not configured properly.
2014-11-06 15:02:00 +01:00
Michael Lotz
f00353a519 posixtestsuite: Normalize line endings. 2014-11-01 15:43:43 +01:00
Adrien Destugues
1508dc5c41 network prefs: fix jamfiles and include into image.
* There are some rough edges, but the functions from the existing
preflet are all available now.
2014-10-30 15:49:08 +01:00
Adrien Destugues
a0c8a64b47 Move the new network preflet at the right place. 2014-10-30 15:49:07 +01:00
Adrien Destugues
446094bcb3 Implement saving DNS server list.
This makes the preflet good enough for replacing the current one.
2014-10-30 15:49:05 +01:00
Adrien Destugues
824404e31f NetworkSetup: add the Services tab
* UI still needs some tweaking
* The Services tab has a list of services. This currently include DNS
and will soon also include the services listed in xinetd.
* The DNS tab allows to manage DNS servers (settings can't be saved yet)
2014-10-30 11:27:38 +01:00
Michael Lotz
00460996cf btreeTest: Change include for debug helpers.
Including BPlusTree.h pulls in the common versions of the debug macros
(via the Debug.h from BFS) and therefore avoids redefinition warnings.
2014-10-30 00:42:50 +01:00
Michael Lotz
64bb360b8c btreeTest: Remove equal sign from preinclude argument.
No separator at all (no space and no equal sign) seems to be the only
version that is accepted by both GCC versions.
2014-10-30 00:42:50 +01:00
Michael Lotz
488289a4a9 btreeTest: Fix build with gcc2. 2014-10-29 23:47:37 +01:00
Adrien Destugues
524709ea2b Avoid space after -include.
This seems to make cpp unhappy. Note that other fixes seems to be needed
to get the build running with gcc2 (missing includes and the like.)
2014-10-29 23:19:49 +01:00
Adrien Destugues
de6278fec1 NetworkSetup: move renegociate and disable buttons to HardwareView
The idea is making the interface list a generic list to add some stuff
that are not interfaces there (ie services: DNS, FTP, SSH, ...)
2014-10-29 22:22:16 +01:00
Adrien Destugues
afc5d438a7 Add an app server test for stack&tile
Should help with debugging #8569.
2014-10-29 22:22:15 +01:00
Adrien Destugues
5d5ec05b1d B*Format: make immutable and remove locking
The language and formatting conventions can now only be set when
creating the objects. This removed the needs for locking them when
formatting to avoid some other thread changing the format while it's
being used.

Adjust tests and DeskBar TimeView to the API changes.
2014-10-27 14:08:42 +01:00
Adrien Destugues
96dbc7d533 Remove the workaround for #11018 in two other places.
The bug is fixed, the workaround can be removed.
2014-10-23 09:10:57 +02:00
Adrien Destugues
b137575c46 AreaTest: 64bit fix. 2014-10-22 19:36:05 +02:00
Adrien Destugues
5dbd0f48cc gcc4 fix. 2014-10-22 18:58:37 +02:00
Adrien Destugues
72d4735712 Register media add-ons on BMediaFormat::GetFormatFor().
* Fixes #11018.
* In this case the FormatManager format list is accessed without going
throught the AddOnManager, so we must tell the AddOnManager to register
the add-ons (as this is what populates the FormatManager format list).
* Remove now unneeded workaround in mp3_decoder_test.
2014-10-22 15:25:06 +02:00
Adrien Destugues
2d88b1bd33 convert mediaDescriptions test to cppunit. 2014-10-22 14:30:19 +02:00
Adrien Destugues
ce299207f8 Convert SizeofTest to cppunit. 2014-10-22 11:34:14 +02:00
Adrien Destugues
2521f8ea39 Convert BufferTest to cppunit. 2014-10-22 11:11:55 +02:00
Adrien Destugues
55935df47d Convert AreaTest to cppunit. 2014-10-22 10:26:37 +02:00
Adrien Destugues
d21b5a07e6 AreaTest: style fixes. 2014-10-22 10:12:24 +02:00