Tags give the ability to mark specific points in history as being important
  • v0.8.2   Version 0.8.2 == Added == - Added `LinuxShell.run()` to run a command and interact with its stdio. - `Path.write_text()`, `Path.read_text()`, `Path.write_bytes()`, and `Path.read_bytes()`: Methods to easily manipulate remote files. - Added integration for U-Boot's test/py test-framework. See the ``uboot_testpy`` testcase fore more. - A connector for connection to a [conserver](https://www.conserver.com/) based serial console: `tbot_contrib.connector.conserver` - Testcases for timing the duration of an operation (`tbot_contrib.timing`). - A testcase to deploy an `swu`-file to [SWUpdate](https://github.com/sbabic/swupdate) (`tbot_contrib.swupdate`). - Machines now implement `==` and `hash()`. A machine which was cloned from another machine has the same hash, i.e. they can be treated as equal. - Added a U-Boot smoke-test: `tbot.tc.uboot.smoke_test()` or `uboot_smoke_test` - Added a `DistroToolchain` class to easily allow using pre-installed toolchains with tbot. - Added a Workdir which lives in ``$XDG_DATA_HOME`` and one living in ``$XDG_RUNTIME_DIR`` (``Workdir.xdg_home()`` and ``Workdir.xdg_runtime()``). - You can now specify the U-Boot revision to checkout: ``tbot uboot_checkout -prev=\"v2020.01\"`` - A ``boot_timeout`` parameter was added to U-Boot machines to limit the maximum time, U-Boot is allowed to take during boot. - Testcases for interacting with GPIOs (`tbot_contrib.gpio`). - ``tbot.Re``: A convenience wrapper around ``re.compile``. Whereever regex-patterns are needed (e.g. in channel-interaction), you can now use `tbot.Re` instead of `re.compile("...".encode())`. - A `Channel.readline()` and a `Channel.expect()` method to mimic pexpect. == Changed == - The default workdir for Linux shells is no longer `/tmp/tbot-wd`. It is now `$XDG_DATA_HOME/tbot` (usually `~/.local/share/tbot`). - `UBootBuilder` now points to the new U-Boot upstream (<https://gitlab.denx.de/u-boot/u-boot.git>) by default. - Fixed `linux.Bash`'s `.env()` implementation unnecessarily querying the variable after setting it. - ``selftest`` now uses a dedicated machine class which does not clobber the default workdir and instead stores data in a temporary directory. == Fixed == - Fixed tbot sometimes not displaying a message before entering interactive mode, thus leaving the user clueless what escape-sequence to use to exit. - Fixed `linux.Bash`, `linux.Ash`, and `board.UBootShell` allowing some bad characters in command invocations which would mess up the shell's state. - Fixed `tbot.flags` only being set _after_ loading the testcases which could lead to weird inconsistency errors. - Fixed ``Channel.sendcontrol()`` not actually allowing all C0 control characters.
    4a628227 · Release 0.8.2 ·
  • v0.8.1   Version 0.8.1 == Added == - Added `LinuxShell.glob()` method for easily using shell globs. - Added parameters to `LinuxShell.subshell()` which can be used to spawn custom subshells. - Added `linux.RedirBoth` to redirect both stdout and stderr to the same file. - Added `UBootShell.ram_base` property to learn the RAM base address in testcases. - Added a write blacklist to channels. This feature can be used to disallow tests sending certain control characters. - Added a `do_build()` step to `UBootBuilder` which can be used to customize the command used for building U-Boot. - Empty `tbot_contrib` module for the future :) == Changed == - Made `SSHConnector` based machine cloneable (if the underlying host is cloneable). - Made `tbot.testcase` also work as a context-manager. This can be used to define 'sub-tests' in a function. Example: ```python with tbot.testcase("my_sub_testcase"): ... ``` == Fixed == - Fixed U-Boot and board-Linux not saving the bootlog to the log-event. - Fixed tbot happily printing special characters as part of a command which was sent (in the log). - Fixed selftests failing in some rare circumstances because a subprocess is not properly terminated or when bash is slow. - Removed use of the deprecated `time.clock()` function. - Properly check stdout encoding. - Fixed `read_iter` sometimes passing negative timeout values to the underlying channel IO. - Fixed tbot hanging on zero-byte `Channel.send()` call. - Fixed `lnx.env()` behaving incorrectly when an environment variable has a value which looks like an `echo`-option. - Fixed a bug caused by passing `"\n^"` as a parameter (bash interprets this as a kind of history expansion). - Fixed `UBootShell` not properly escaping `\` and `'`. - Fixed `ub.env()` failing on environment variables with weird values.
    5b0378fd · Release 0.8.1 ·
  • v0.8.0   Version 0.8.0 The machine interface was completely overhauled. Please read the [migration guide](https://tbot.tools/migration.html) for more info. == Added == - `@tbot.with_lab`, `@tbot.with_uboot`, and `@tbot.with_linux` decorators to make writing testcase much simpler - `linux.RedirStdout(f)` & `linux.RedirStderr(f)`: Redirect stdout and stderr symbols - `Machine.init()` hook to call custom code after the machine was initialized. This can be used, for example, to init network manually in U-Boot. - `tc.shell.check_for_tool()` testcase - `tbot.skip()`: Skip a testcase - `Machine.clone()`: Attempt creating a copy of a machine. The two copies allow parallel interaction with the same host. == Changed == - `linux.BuildMachine` is now a mixin called `linux.Builder` - `linux.LabHost` is now a mixin called `linux.Lab` - `linux.LinuxMachine` should be replaced by `linux.LinuxShell` - `LabHost.new_channel()` was removed in favor of `LinuxShell.open_channel()`. `open_channel()` consumes the machine it is called on which means the equivalent to `new_channel()` now is: with mach.clone() as cl: chan = cl.open_channel("telnet", "192.0.2.1") == Removed == - `exec0(stdout=f)`: Redirection should be done using `RedirStdout`. - `linux.Env(var)`: Environment-Variable substitution is hard to control. It is much easier to just use `mach.env(var)`. == Fixed == - `Path.__fspath__()` erroneously returning a result, even though the contract that is assumed with this method cannot be upheld by tbot.
    c3e0a012 · Release 0.8.0 ·
  • v0.7.1   Version 0.7.1 == Added == - `tbot.acquire_local()`: Quick access to a localhost machine - `LinuxMachine.home`: Path to the current user's home - `LocalLabHost.tbotdir`: tbot's current working directory on the localhost (either from where you ran `tbot` or the path given with `-C`) - `tbot.tc.kconfig`: Testcases for modifying a kernel config file - `login_delay`: Time to wait before logging in on the board. This should allow working with boards that clobber the console a lot during boot. == Changed == - Unknown parameters are now ignored if running multiple testcases so you can specify parameters that are just relevant to a single one. - `SSHMachine`s now use `NoneAuthenticator` by default. == Fixed == - `selftest`s sometimes failing if dropbear does not start fast enough - `SSHMachine`s using the local user's home dir instead of the one on the lab-host. - Local channels now correctly end the session which fixes weird bugs like picocom not being able to reaquire the shell.
    cb0af554 · Release 0.7.1 ·
  • v0.7.0   Version 0.7.0 == Added == - Read commandline arguments from files: You can now specify a file using @filename and each line from that file will be interpreted as a commandline argument. - A man-page: doc/tbot.1! - tbot.named_testcase: Define testcases with a different name in log-files than the function name. The motivation is to reduce name ambiguity (e.g. `uboot.build` and `linux.build` would both be called `build` in the log). This also affects the testcases name when calling it from the commandline (you have to use the new name). == Changed == - The U-Boot build testcase has been completely rewritten. You will need to adapt you board config to work with the new version: * The build-info no longer exists, instead you define a `UBootBuilder`. Take a look at the docs to see available options. * The build attribute of your U-Boot machine must now be an **instance** of your `UBootBuilder`, **not** the class itself. Example of the new config: from tbot.machine import board from tbot.tc import uboot class MyUBootBuilder(uboot.UBootBuilder): name = "my-builder" defconfig = "my_defconfig" toolchain = "generic-armv7a-hf" class MyUBootMachine(board.UBootMachine): ... build = MyUBootBuilder() == Fixed == - `boot_to_shell` is no longer a public method of BoardLinux machines.
    04c95dec · Release 0.7.0 ·
  • v0.6.6   Version 0.6.6 == Added == - Graphviz `dot` diagram generator - New and improved documentation! - `LinuxMachine.fsroot`: A little convenience helper: You can now write `mach.fsroot / "proc/version"` instead of `linux.Path(mach, "/proc/version")` == Changed == - tbot no longer automatically creates a log file. If you want the previous behavior, use `--log-auto`. `--log=<file>` will still behave as before. - `generators/generate_htmllog.py` -> `generators/htmllog.py` - `generators/debug_messages.py` -> `generators/messages.py` - `UBootMachine.env()` now also accepts `board.Special`s. == Fixed == - Duplication warning when star-importing another testcase-file.
    8e6a2993 · Release 0.6.6 ·
  • v0.6.5   Version 0.6.5 == Added == - `Machine.lh`: You can access the lab-host from every machine now. The idea behind this is to allow access to lab-specific configuration in a much easier way. - `mach.env()` can now be used to set environment variables as well: `env("name", "value")` - `-p` for setting testcase parameters. Provided values are parsed using `eval`, so be careful ... Example: ```bash $ tbot -p int_param=42 -p boolean=True -p string=\'str\' ``` == Changed == - You can now use `--log=` to suppress the creation of a log file. == Fixed == - `selftest_path_stat` assuming the existence of `/dev/sda`, which makes it fail on systems without this block device. - tbot will now only color its output if appropriate. It honors [CLICOLOR](https://bixense.com/clicolors/).
    5f745406 · Release 0.6.5 ·
  • v0.6.4   Version 0.6.4
    981af89e · Release 0.6.4 ·
  • v0.6.3   Version 0.6.3
    2f0c0030 · Release 0.6.3 ·
  • v0.6.2   Version 0.6.2
    465a4e68 · Release 0.6.2 ·
  • v0.6.1   Version 0.6.1
    14873e39 · Release 0.6.1 ·
  • v0.6.0   Version 0.6.0
    60f2699c · Release 0.6.0 ·
    Release v0.6.0

    Version 0.6.0 is finally here! It is a complete rewrite so none of the old stuff is relevant any more. The changelog below is not everything that was changed, but the changes since the last prerelease (0.6.0-pre08).

    Added

    • mach.test() to just check the return code of a command
    • linux.F, board.F: Formatter with TBot support
    • max parameter for Channel.recv()
    • recv_n method for Channel to read exactly N bytes
    • ignore_hostkey in SSHLabHost
    • console_check hook to prevent racey board connections from multiple developers
    • LinuxWithUBootMachine.do_boot for a more flexible boot_commands definition

    Changed

    • Improved testrun end handling
    • Made SSHMachine more userfriendly; now shows ssh errors in log
    • Made shell mandatory for BoardLinux machines

    Fixed

    • shell.copy sometimes not respecting ignore_hostkey flag
    • shell.copy relying on an ugly hack that breaks on some python versions
    • Verbosity being in the wrong format in log events
  • v0.6.0-pre08   Version 0.6.0-pre08
    66d20d14 · Prerelease 0.6.0-pre08 ·
    Release v0.6.0-pre08

    Added

    • Selftest that fails intentionally

    Changed

    • Internal: Board no longer manages the boot-logevent as that breaks when no BoardMachine follows up

    Fixed

    • HTMLLog generater producing bad HTML because of some log issues
  • v0.6.0-pre07   Version 0.6.0-pre07
    d9642240 · Prerelease 0.6.0-pre07 ·
    Release v0.6.0-pre07

    Added

    • Password support in shell.copy
    • Recipes in documentation
    • Board.cleanup, Channel.register_cleanup, ability to register a hook for cleaning a channel. Might help if some lockfiles are kept when TBot just kills a connection.
    • Support for copying from LocalLabHost() to SSHLabHost() and the other way around.
    • GitRepository.symbolic_head to get current branch name

    Changed

    • GitRepository.bisect now ensures that the good revision is actually good and the current revision is actually bad.

    Fixed

    • Fix failures not leading to error return code
    • Better error message if a board/lab was not found
    • Stdout showing password prompt late
    • Remove some escape sequences from log output to keep it tidy
  • v0.6.0-pre06   Version 0.6.0-pre06
    c8357a2d · Prerelease 0.6.0-pre06 ·
    Release v0.6.0-pre06

    Added

    • Reimplemented Logging. The following generators have been updated:
      • htmllog
      • junit
    • Support for password authentication on SSH machines. I strongly reccomend not using this!

    Changed

    • Updated documentation

    Fixed

    • Fixed pre-commit selftest hook creating log files

    Removed

    • Unnecessary files from pre 0.6 versions
  • v0.6.0-pre05   Version 0.6.0-pre05
    16067425 · Prerelease 0.6.0-pre05 ·
    Release v0.6.0-pre05

    Added

    • verbosity parameter for log.message
    • ignore_hostkey flag for SSHMachines

    Changed

    • More robust completions

    Fixed

    • Program name in help and version message was wrong
    • Better error messages when a testcase file can't be loaded
    • Selftests failing because sshd host key changes
    • GitRepository failing to reset in __init__
  • v0.6.0-pre04   Version 0.6.0-pre04
    7bde6a8a · Prerelease 0.6.0-pre04 ·
    Release v0.6.0-pre04

    Added

    • GitRepository.head: Get the current position of HEAD
    • GitRepository.bisect: Bisect the git repo to find the commit which introduced a bug.
    • Show durations of testcase runs.

    Changed

    • Moved package metadata into __about__.py
    • Always show long version in documentation
    • shell.copy can now copy from and to SSHMachines.
  • v0.6.0-pre03   Version 0.6.0-pre03
    1d80ea89 · Release 0.6.0-pre03 ·
  • v0.6.0-pre02   Version 0.6.0-pre02
    3ffd6c07 · Prerelease v0.6.0-pre02 ·
  • v0.6.0-pre01   Version 0.6.0-pre01
    5c2fc684 · Add documentation ·