1. 19 Sep, 2021 1 commit
    • Simon Glass's avatar
      test: Add a way to skip console checking until a string matches · 9aee0183
      Simon Glass authored
      
      
      Some tests produce a lot of output that does not need to be individually
      checked by an assertion. Add a macro to handle this.
      
      Series-to: u-boot
      Series-links: 258653
      Series-version: 2
      Cover-letter:
      sandbox: Minor fixes and improvements
      This series collects a few patches that correct and improve sandbox and
      sandbox_spl:
      
      - Fix a bug in --rm-memory works
      - Support an MMC backing file for MMC emulator, to allow filesystems to be
        used without needing the 'host' filesystem
      - Allow skipping console output when checking verbose commands
      - Suppress unwanted filesystem warnings when probing partitions
      - Tidy up a few comments
      END
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Change-Id: I44fcf34ce986e97cb281a70e4fc04caed4c26045
      9aee0183
  2. 08 Jun, 2021 3 commits
  3. 12 Mar, 2021 1 commit
  4. 02 Feb, 2021 1 commit
    • Simon Glass's avatar
      common: Drop asm/global_data.h from common header · 401d1c4f
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      
      Move this out of the common header and include it only where needed.  In
      a number of cases this requires adding "struct udevice;" to avoid adding
      another large header or in other cases replacing / adding missing header
      files that had been pulled in, very indirectly.   Finally, we have a few
      cases where we did not need to include <asm/global_data.h> at all, so
      remove that include.
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Signed-off-by: Tom Rini's avatarTom Rini <trini@konsulko.com>
      401d1c4f
  5. 16 Jan, 2021 1 commit
  6. 08 Aug, 2020 1 commit
    • Simon Glass's avatar
      test: Add a way to check part of a console line or skip it · 33d7edfd
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      
      Some lines of the output are not worth testing, or not worth testing in
      their entirety. For example, when checking a hex dump we know that the
      hex-dump routine can display ASCII so we only need to check the hex bytes,
      not the ASCII dump. Add a new test macros which can check only part of
      a console line.
      
      Sometimes it is useful to skip a line altogether, so add a macro for that
      also.
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      33d7edfd
  7. 06 Feb, 2020 1 commit
    • Simon Glass's avatar
      test: Add a way to check each line of console output · 400175b0
      Simon Glass authored
      
      
      When writing tests to check the output from commands it is useful to be
      able to check the output line by line using an assertion. Add helper
      macros to support this and to check that there is no unexpected trailing
      data.
      
      Also some commands produce a dump using print_buffer(). Add a way to check
      that the correct number of bytes are dumped (ignoring the actual
      contents).
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      400175b0
  8. 07 Jan, 2020 1 commit
  9. 07 May, 2018 1 commit
    • Tom Rini's avatar
      SPDX: Convert all of our single license tags to Linux Kernel style · 83d290c5
      Tom Rini authored
      
      
      When U-Boot started using SPDX tags we were among the early adopters and
      there weren't a lot of other examples to borrow from.  So we picked the
      area of the file that usually had a full license text and replaced it
      with an appropriate SPDX-License-Identifier: entry.  Since then, the
      Linux Kernel has adopted SPDX tags and they place it as the very first
      line in a file (except where shebangs are used, then it's second line)
      and with slightly different comment styles than us.
      
      In part due to community overlap, in part due to better tag visibility
      and in part for other minor reasons, switch over to that style.
      
      This commit changes all instances where we have a single declared
      license in the tag as both the before and after are identical in tag
      contents.  There's also a few places where I found we did not have a tag
      and have introduced one.
      Signed-off-by: Tom Rini's avatarTom Rini <trini@konsulko.com>
      83d290c5
  10. 20 Nov, 2015 1 commit
  11. 21 May, 2015 1 commit
  12. 04 Mar, 2014 1 commit
    • Simon Glass's avatar
      dm: Add basic tests · 2e7d35d2
      Simon Glass authored
      
      
      Add some tests of driver model functionality. Coverage includes:
      
      - basic init
      - binding of drivers to devices using platform_data
      - automatic probing of devices when referenced
      - availability of platform data to devices
      - lifecycle from bind to probe to remove to unbind
      - renumbering within a uclass when devices are probed/removed
      - calling driver-defined operations
      - deactivation of drivers when removed
      - memory leak across creation and destruction of drivers/uclasses
      - uclass init/destroy methods
      - automatic probe/remove of children/parents when needed
      
      This function is enabled for sandbox, using CONFIG_DM_TEST.
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      2e7d35d2