Commit Graph

46 Commits

Author SHA1 Message Date
Fabien Chouteau 5a197cfbeb Migration to GNAT Community 2020 2020-05-29 18:56:37 +02:00
Fabien Chouteau 9f4384dacd Fix use of an anonymous access type allocator warnings 2019-04-08 19:11:21 +02:00
Fabien Chouteau 48a4f35c38 Optional style checks and warning as error switches
This patch makes style checks and warning as error switches controllable
with a scenario variable: ADL_BUILD_CHECKS (disabled by default).

With this we can enforce style checks on all contributions by enabling
ADL_BUILD_CHECKS in testsuite runs and CI builds.

On the other hand the checks are disabled by default which means it is
easier and more friendly to play with the library and the examples.

Part of #271
2018-09-03 20:00:01 +02:00
Fabien Chouteau 4d32971732 HAL.GPIO: Switch to a capability system
Instead of returning False when a configuration is not supported, users
can call a function beforehand to know if it is supported. The
capability is also now a precondition of the setup procedures.
2018-07-11 18:46:16 +02:00
Fabien Chouteau 32c4ab7145 Testsuite: Use new board project file 2018-04-27 21:16:41 +02:00
Fabien Chouteau 36f137ad18 Fix "use clause for has no effect" errors 2018-03-09 16:59:59 +01:00
Fabien Chouteau a694e2c684 Testsuite: Add tests for the new command line interpreter 2018-02-02 18:18:13 +01:00
Fabien Chouteau 2581d82d67 Monitor.Block_Drivers: Show data size 2017-09-19 00:11:46 +02:00
Fabien Chouteau 201f82f16d Testsuite: Add more checks in FAT write test 2017-09-16 21:33:35 +02:00
Fabien Chouteau bff6963a49 Testsuite: Add Block_Driver_Monitor test 2017-09-16 21:09:27 +02:00
Fabien Chouteau 3b618d415f Testsuite: Add hexdump test 2017-09-16 21:07:22 +02:00
Fabien Chouteau 1264de8c89 File_IO: Rename file modes 2017-09-15 18:47:55 +02:00
Fabien Chouteau 69f970ef88 File_Block_Driver: Add read/write only modes 2017-09-15 18:47:55 +02:00
Fabien Chouteau 1c0c15e1c6 Testsuite: Fix or remove filesystem tests
Some of the virtual filesystem are obsolete because of missing features
in the new implementation.
2017-09-15 18:47:55 +02:00
Fabien Chouteau ddb422adbd File_IO: Add Create_File function 2017-09-15 18:47:55 +02:00
Fabien Chouteau d2b93ca351 Filesystem: Create a "front-end" for file handling
in a package called File_IO. This hides some of the complexity of
dealing with access to handle and answers some of the questions
discussed in the issue #68.

The package also provides the mounting interface, taken from
Filesystem.VFS.
2017-09-15 18:47:55 +02:00
Fabien Chouteau af952cbf6b Testsuite: Improve FAT testing 2017-09-15 18:47:55 +02:00
Fabien Chouteau 480067dffb Filesystem: Merge the two filesystem interfaces
And update the native implementation.
2017-09-15 18:47:55 +02:00
Fabien Chouteau fb52c8241e Filesystem: Always use Status_Code as return value
as opposed to handles. And pass handles as out parameters.

File and directory handles will always be used for more than one
operation. Read/Write and Close at least, so it will require to declare
a variable for them.

   Handle : Any_File_Handle;
begin
   Open ("/my_file". Handle);
   Handle.Read (...)
   Handle.Close;

vs

  --  This is not practical because now I can't close the handle
  Open ("/my_file").Read (...);

On the other side, one might want to just check the status code of a
function without declaring a variable to do so.

if Open ("/my_file", Handle) /= OK then
   ...

vs

   Handle : Any_File_Handle;
   Status : Status_Code;
begin
   Handle := Open ("/my_file", Status);

   if Status /= OK then
      ...
2017-09-15 18:46:55 +02:00
Fabien Chouteau ac61981318 Filesystem: Change parameters from access to in out 2017-09-15 18:46:55 +02:00
Fabien Chouteau c807510532 Filesystem: Rename types according to ADL standard 2017-09-15 18:46:55 +02:00
Fabien Chouteau b142aa660a Test Utils/Compare_Files: Remove useless IO read 2017-09-15 18:46:55 +02:00
Fabien Chouteau dd2111032f Testsuite: Add one FAT test 2017-09-15 18:46:55 +02:00
Fabien Chouteau 3fc2ac8f7a Logging: Add Full and Empty functions
This can be useful for entry barrier when the logging packages are used
in a protected object.
2017-08-16 19:18:19 +02:00
Fabien Chouteau 9810f226d4 Merge pull request #211 from AdaCore/logging
Implement logging tools with priority and categories handling
2017-08-08 13:05:57 +02:00
Fabien Chouteau 6804cb4981 Logging: Change Pop from a function to a procedure 2017-08-08 11:01:50 +02:00
Fabien Chouteau dc3d144670 Implement logging tools with priority and categories handling 2017-07-28 15:03:17 +02:00
Fabien Chouteau 5165c901f3 Bitmap_File_Output: Avoid random output
This may break the test-suite in some cases.
2017-07-25 16:34:51 +02:00
Fabien Chouteau 3a7945c20a Use new GPRbuild attribute: Create_Missing_Dirs
And remove now useless .gitignore files and empty directories.
2017-06-27 15:58:10 +02:00
Fabien Chouteau a8997ad6c7 board_projects_generator.py: Move project files in corresponding board folder 2017-06-27 14:52:18 +02:00
Jerome Lambourg ca989ca16c Fix the testsuite after the changes in the config project 2017-06-26 18:18:59 +02:00
Jerome Lambourg 1f24e6e649 Fix the testsuite after the changes in config project. 2017-06-26 18:18:59 +02:00
Fabien Chouteau c10a6bada0 HAL.Bitmap: Simplify interface with notion of source color
There are two color formats in HAL.Bitmap, the Bitmap_Color (with Alpha,
Red, Green, Blue components) and the "native" raw value of the pixel.

In the current interface users select a color for each operations (Fill,
Draw_Line, Draw_Circle, etc.) which means each operation has to be
declared twice, one with a Bitmap_Color and one with native pixel value.

Inspired by the Cairo graphics library, this patch add a Set_Source
primitive which allows to specify the color that will be use. Each
drawing operation then uses this color for rendering.

This simplifies the interface since drawing operation only have to be
declared once. It may also allow for more advanced sources in the future
like gradients or textures.
2017-05-10 00:59:13 +02:00
Fabien Chouteau a8d47f02aa Fix Native.Filesystem after HAL type change 2017-02-13 21:30:25 +01:00
Fabien Chouteau f2534c336c Testsuite: Exit with error code in case of test failure 2017-02-12 21:37:18 +01:00
Fabien Chouteau dd3e71195d Testsuite: Add wire simulation package and associated test 2017-02-04 01:45:13 +01:00
Fabien Chouteau b849f72685 Testsuite: Refactor duplicated test code 2017-02-04 01:35:31 +01:00
Fabien Chouteau 69eeaf5149 testsuite/run.py: Improve output readability 2017-01-22 01:29:49 +01:00
Fabien Chouteau 1e31cb3bff Bitmap Drawing: Add a simple regression test 2017-01-22 01:29:01 +01:00
pat-rogers f4bdddad6f Unify access-to-classwide type names 2016-12-17 17:50:21 -06:00
Fabien Chouteau 501c6910a8 Testsuite: Trigger and error when there's no test to execute 2016-11-20 23:46:13 +01:00
Fabien Chouteau 455b8b0e26 Testsuite: Add verbose switch 2016-11-20 23:46:13 +01:00
Fabien Chouteau 17e2e104f1 Testsuite: Add a test for disk partitions utility 2016-11-13 21:22:01 +01:00
Pierre-Marie de Rodat a617049a3b Testsuite: switch the testsuite runner to Python2
... so it can run with the Python interpreters that the GNAT/GPS GPL
releases provide.
2016-11-01 11:28:07 +01:00
Pierre-Marie de Rodat 783352a17d Testsuite: add support to check memory issues with Valgrind 2016-11-01 11:28:07 +01:00
Pierre-Marie de Rodat 13e17bd3d4 Add the basis for an automated native testsuite...
... including a set of basic tests for the VFS engine.
2016-11-01 11:28:07 +01:00