Skip to content
  1. Feb 13, 2024
  2. Feb 12, 2024
  3. Feb 07, 2024
  4. Feb 02, 2024
    • Luca Fancellu's avatar
      cam-service/test: Increment delay before trying to connect · ab582651
      Luca Fancellu authored
      
      
      A spurious error is happening where the connect function inside
      test_socket_single_client is failing with error code 111
      (connection refused), it means that the server is not ready yet
      to accept connections, so increase the delay before connecting.
      
      While there, implement also a retry mechanism to improve the
      robustness of the test.
      
      Signed-off-by: Luca Fancellu's avatarLuca Fancellu <luca.fancellu@arm.com>
      ab582651
    • Luca Fancellu's avatar
      cam-service/test: Wrap socket functions with utility macro · 8993d7ff
      Luca Fancellu authored
      
      
      Currently the function that are used with sockets (connect,
      send, recv) are not giving any hint on the type of failure
      when they don't succeed, debugging why the issue happened
      can be difficult.
      
      So introduce an helper macro that wraps the call and in case
      of failure prints also the error inside errno variable.
      
      Wrap every connect, send, recv with the macro.
      
      Add some words to the dictionary to please the spellchecker.
      
      Signed-off-by: Luca Fancellu's avatarLuca Fancellu <luca.fancellu@arm.com>
      8993d7ff
  5. Jan 31, 2024
    • Luca Fancellu's avatar
      test: Use different UUID when running multiple applications · e3625a98
      Luca Fancellu authored
      
      
      Modify the test case "test_cam_app_multiple_application" in order
      to use different UUID and so different configuration files for
      each application.
      
      To do that, add configuration files used during the test under
      "test/fixture" and modify the test to deploy these files and
      use a different uuid and number of streams.
      Increase also the processing count to make the execution last
      longer and maximize the concurrent execution of the applications.
      
      Add a new entry in the dictionary to please the spell checker.
      
      Signed-off-by: Luca Fancellu's avatarLuca Fancellu <luca.fancellu@arm.com>
      e3625a98
    • Luca Fancellu's avatar
      ci: Increase maximum number of function args · 2d510335
      Luca Fancellu authored
      
      
      Some part of the repository, like the pytest tests needs
      more than 4 function arguments so they can't be refactored,
      hence increase the threshold for the argument count for
      the structure code-climate checker.
      
      Signed-off-by: Luca Fancellu's avatarLuca Fancellu <luca.fancellu@arm.com>
      2d510335
  6. Jan 29, 2024
    • Luca Fancellu's avatar
      test: Test cam-service with multiple application · 0b028dbf
      Luca Fancellu authored
      
      
      Test the cam-service with two cam-app-example application
      running concurrently, implement the test in test_static_config.py.
      
      To do that, some changes needs to be made to the CAMComponent
      and the pytest fixture functions, so add a new fixture function
      to pass a second instance of the cam-app-example and modify
      the CAMComponent to allow a change in the log name and to return
      the process exit code through the stop method.
      
      Signed-off-by: Luca Fancellu's avatarLuca Fancellu <luca.fancellu@arm.com>
      0b028dbf
    • Luca Fancellu's avatar
      test/conftest: Generalize the component fixture · 0ff0e641
      Luca Fancellu authored
      
      
      The fixture function creating the CAMComponent can be
      generalized and perform the same operations without
      issues, so use a generic function to retrieve and use
      the CAMComponent and call that function from the
      fixture functions.
      
      Signed-off-by: Luca Fancellu's avatarLuca Fancellu <luca.fancellu@arm.com>
      0ff0e641
    • Luca Fancellu's avatar
      test: Save a log from each running component · 82ac703d
      Luca Fancellu authored
      
      
      Currently the pytest tests don't save any log from the running
      components, leading to an harder debug of it later.
      
      So modify the CAMComponent class and the pytest fixture to save
      each time one component runs, a log file, which will be placed
      on a folder specific for each test.
      
      Add missing word to the dictionary to please the spell checker
      and modify the header to update the year of the changes.
      
      Signed-off-by: Luca Fancellu's avatarLuca Fancellu <luca.fancellu@arm.com>
      82ac703d
    • Luca Fancellu's avatar
      test: Improve CAMComponent stop method and fixture · 56894ae0
      Luca Fancellu authored
      
      
      Improve the CAMComponent stop() method by checking if the
      process is running and using wait() after sending the
      termination signal, because it is not guaranteed that the
      process will stop after that.
      Use kill() as last resort if the application is still
      running.
      
      While there, improve the conftest.py fixture function,
      there is no need to specify an autouse function to stop
      the server, while we can use the yield in its fixture
      function as explained in the docs.
      
      Signed-off-by: Luca Fancellu's avatarLuca Fancellu <luca.fancellu@arm.com>
      56894ae0
  7. Jan 26, 2024
  8. Jan 25, 2024
    • Luca Fancellu's avatar
      test: Use tmp_path_factory pytest fixture · fa85bf2e
      Luca Fancellu authored
      
      
      Currently the tests are creating and deleting a temporary folder in
      the same path of the test, it is not a common practice to perform
      write operation from the test environment on the test source
      structure and it is a limitation for example when the tests are
      read from a readonly filesystem.
      
      To overcome this issue, pytest exposes a special framework called
      'tmp_path_factory' which is used to create and manage temporary
      folders, the framework also keeps 3 history copies of them and
      manages the rotation. More info about that in the pytest docs.
      
      So use tmp_path_factory in a test fixture that exposes a variable
      called 'test_dir' that generates a folder named after the test,
      use such variable in the tests that needs to write on a temporary
      folder and while there, remove unused import and list them
      alphabetically.
      
      Signed-off-by: Luca Fancellu's avatarLuca Fancellu <luca.fancellu@arm.com>
      fa85bf2e
  9. Jan 19, 2024
  10. Jan 09, 2024
    • Luca Fancellu's avatar
      cam-app-example: Set failure exit code when stream fail · 6890907a
      Luca Fancellu authored
      
      
      Currently the cam-app-example doesn't set a failure exit code
      when one of the stream fails, fix that setting a proper failure
      code.
      
      Fixing this bug revealed that the test
      'test_cam_app_invalid_event_logic' that is supposed to trigger an
      error on the stream was using the wrong logic to test the app exit
      code, update it to assert that the app fails.
      
      Signed-off-by: Luca Fancellu's avatarLuca Fancellu <luca.fancellu@arm.com>
      6890907a
  11. Nov 24, 2023
  12. Nov 20, 2023
  13. Nov 15, 2023
  14. Nov 13, 2023
  15. Nov 08, 2023
  16. Nov 07, 2023
  17. Nov 06, 2023
  18. Nov 01, 2023
  19. Oct 30, 2023
Loading