1. 07 Apr, 2020 1 commit
  2. 01 Apr, 2020 5 commits
  3. 31 Mar, 2020 1 commit
  4. 27 Mar, 2020 8 commits
    • Marco Trevisan's avatar
      tests/fprintd: Add checks for delete enrolled fingers permissions · 90298134
      Marco Trevisan authored
      The test doesn't need any assertion because we're calling DeleteEnrolledFingers
      and in case it fails a net.reactivated.Fprint.Error.PermissionDenied error
      would be thrown, and thus an exception would be raised at python level, making
      the test to fail.
    • Bastien Nocera's avatar
    • Bastien Nocera's avatar
      file_storage: Handle STATE_DIRECTORY containing multiple paths · fd733e55
      Bastien Nocera authored
      As per systemd's documentation:
      If multiple directories are set, then in the environment variable the
      paths are concatenated with colon (":").
      Handle that case by splitting the paths if there's a ":" in the
      Closes: #50
    • Bastien Nocera's avatar
      tests/fprintd: Fix claim_from_other_client_is_released_when_vanished on CI · 6a1fffae
      Bastien Nocera authored
      test_claim_from_other_client_is_released_when_vanished would fail on
      the CI but work on a local system because we wouldn't want long enough
      for the "vanished" code path to be taken into account. Add a small
      timeout to make sure it works on the CI as well.
    • Bastien Nocera's avatar
      tests/fprintd: Fix test_enroll_invalid_storage_dir test · 47bd3f7f
      Bastien Nocera authored
      enroll_image() was always waiting for enroll-completed rather than for
      what the caller expected as the result.
      FAIL: test_enroll_invalid_storage_dir (__main__.FPrintdVirtualDeviceClaimedTest)
      Traceback (most recent call last):
        File "/home/hadess/Projects/jhbuild/fprintd/tests/fprintd.py", line 661, in test_enroll_invalid_storage_dir
          self.enroll_image('whorl', expected_result='enroll-failed')
        File "/home/hadess/Projects/jhbuild/fprintd/tests/fprintd.py", line 384, in enroll_image
        File "/home/hadess/Projects/jhbuild/fprintd/tests/fprintd.py", line 373, in wait_for_result
          self.assertEqual(self._last_result, expected)
      AssertionError: 'enroll-failed' != 'enroll-completed'
      - enroll-failed
      + enroll-completed
    • Marco Trevisan's avatar
      build: List single unit python tests allowing to run them separately · 4f3589c0
      Marco Trevisan authored
      We run a certain number of tests right now, without being able to easily
      run them separated or to check which one failed.
      So add a script to inspect all the available unittests per each python
      script and use it to figure out the tests we can run in meson.
      As per this, define a global 'python_tests' variable in meson that allows
      to register new python tests easily without having to repeat the settings
      for all the tests.
      For each test we have, we check if we can fetch a list of unit tests, and
      if possible we create a meson test for each one.
      Otherwise we just fallback to normal behavior.
      This is something that can be hopefully implemented into upstream meson [1].
      [1] https://github.com/mesonbuild/meson/issues/6851
    • Marco Trevisan's avatar
      tests/fprintd: Add missing implementation of list_tests · eccd790d
      Marco Trevisan authored
      Use unittest_inspector that we provide for meson tests inspection as well
    • Marco Trevisan's avatar
      tests: Add a tool to inspect the single python unit tests · bc29114a
      Marco Trevisan authored
      The unit tests files are provided as python files, adding a tool that
      allows to list them in order to be able to run them easily via
        python3 -m unittest module.Class.test_method
  5. 24 Mar, 2020 3 commits
  6. 23 Mar, 2020 2 commits
    • Timothy Gu's avatar
      tests/fprintd: Increase allowed timeout · d7fec03f
      Timothy Gu authored
      On my laptop it takes 48 seconds to run.
    • Timothy Gu's avatar
      tests/fprintd: Allow tests to run even when virtual device is not available · 4a3ae5cc
      Timothy Gu authored
      The test file calls self.daemon_start() in order to start fprintd and
      locate the virtual image device that's needed for the test to run.
      However, since the virtual image driver is not available on all
      libfprint installations, the test should be skipped if the driver is not
      The skipping mechanism used to work, by checking if self.device is None.
      This is based on the assumption that self.device would be set to None in
      cases where the driver is not available. However, even in the past
      self.device is only set to None in the tearDown method and not in setUp,
      so presumably in edge cases it didn't entirely work.
      However, since 0fb4f3b0 which
      consistently removes the self.device attribute rather than setting it to
      None, the "self.device is None" check no longer works. In particular,
      the following error message is shown:
          test_manager_get_default_device (__main__.FPrintdManagerTests) ...
          Did not find virtual device! Probably libfprint was build without
          the corresponding driver!
      After this patch, the following is shown:
          test_manager_get_default_device (__main__.FPrintdManagerTests) ...
          Did not find virtual device! Probably libfprint was build without
          the corresponding driver!
          skipped 'Need virtual_image device to run the test'
      We fix this bug by consistently setting self.device to None, in both the
      setUp method before daemon_start gets called, and in tearDown. We also
      make the same change to self.manager for consistency.
      The issue was not caught on CI, as the CI configuration always installs
      a libfprint version that has the virtual_image device explicitly enabled
      in the preparation phase.
  7. 20 Mar, 2020 1 commit
  8. 17 Mar, 2020 19 commits