# 使用 Homebrew, apk, MacPorts, Nix, apt, dnf 安装 atf

查看 atf 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:atf
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install atf
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install atf
```

  证据: MacPorts ports tree: devel/atf/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add atf
```

  证据: Alpine Linux edge package indexes: atf from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz

- Nix (92%):

```sh
nix profile install nixpkgs#atf
```

  证据: nixpkgs package indexes: pkgs/by-name/at/atf/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- Debian apt (92%):

```sh
sudo apt install atf-sh
```

  证据: Debian stable package indexes: atf-sh from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install atf-tests
```

  证据: Fedora Rawhide package metadata: atf-tests from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst

## 软件包事实

- **软件包键:** brew:atf
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/atf>
- **版本:** 0.23
- **来源摘要:** Automated testing framework
- **主页:** <https://github.com/freebsd/atf>
- **仓库:** <https://github.com/freebsd/atf>
- **许可证:** BSD-2-Clause
- **源码归档:** <https://github.com/freebsd/atf/releases/download/atf-0.23/atf-0.23.tar.gz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- atf-sh (cli)
- atf-sh (别名)

## 构建依赖

- autoconf
- automake
- libtool

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 0.23
- 本地数据: OK
- 上游仓库: https://github.com/freebsd/atf
- 信息: No package-manager update timestamp was available.
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

ATF, the Automated Testing Framework, is a small but historically important Unix testing framework for writing test programs in C, C++, and POSIX shell. Its value is less about being a fashionable standalone test runner and more about providing a consistent test-program API and command-line interface for base-system and ports/package test suites.

### 项目历史

The official README describes ATF as libraries for C, C++, and POSIX shell, with ATF-based tests relying on an external execution engine rather than shipping one itself. The same README identifies Kyua as the preferred execution engine, which reflects ATF's later role as the test-definition layer inside a larger BSD testing stack.

The NEWS file records a major 2014 transition: version 0.19 moved project hosting from Google Code, where ATF had been a Kyua subproject, to GitHub as a first-class project. That release also separated deprecated tools such as atf-run and atf-report from the maintained libraries, foreshadowing the modern split where Kyua handles execution.

### 采用历史

ATF is strongly associated with BSD operating-system testing. The README explicitly recommends binary packages for FreeBSD, NetBSD/pkgsrc, OpenBSD, and Ubuntu, and the NEWS file calls out FreeBSD test-suite support in the 0.19 release. That made ATF familiar to package maintainers who care about base-system regression tests, portable shell tests, and tests shipped alongside system components.

Its package-manager footprint is broad for such a specialized tool: the input lists packages in Homebrew, MacPorts, pkgsrc-adjacent systems, Debian/Ubuntu, Fedora, Nix, and Alpine. That packaging spread matters because ATF tests are often consumed by downstream distributions rather than only by application developers.

### 使用方式

ATF is used to write test cases in C, C++, or shell that expose a consistent interface to humans and automation. In practice, users commonly install ATF alongside Kyua, write tests with atf-c, atf-c++, or atf-sh, and let Kyua discover and run them.

The Homebrew formula exposes at least the atf-sh executable, which is the part many command-line package users encounter first when running or authoring shell-based tests.

### 为什么软件包爱好者会关心

ATF is package-nerd infrastructure: it is not glamorous, but it sits in the plumbing between source trees, operating-system test suites, and downstream package validation. Its removal of the old runner tools in favor of Kyua is the sort of split that explains why different packages may depend on atf libraries, atf-sh, or Kyua separately.

The long quiet period between the 2014 0.21 release and later 2024/2025 releases is also notable for maintainers: old system-test tooling can remain relevant for a decade when it is embedded in OS and packaging workflows.

### 时间线

- 2014: ATF 0.19 moved from Google Code to GitHub and separated deprecated runner/reporting tools.
- 2014: ATF 0.20 removed the deprecated tools from the maintained release line.
- 2014: ATF 0.21 restored and refreshed manual-page documentation and improved FreeBSD-current compatibility.
- 2024: ATF 0.22 refreshed the codebase for modern C++ and build-system compatibility.
- 2025: ATF 0.23 fixed release tarball generation and other build/test issues.

### Related projects

- Kyua is the preferred execution engine for ATF-based tests.
- FreeBSD's test suite is a major downstream context for ATF.
- pkgsrc, OpenBSD ports, Debian/Ubuntu, and other package systems distribute ATF or ATF shell tooling.

### 来源

- <https://github.com/freebsd/atf#readme>
- <https://raw.githubusercontent.com/freebsd/atf/master/NEWS>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** atf
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## 其他软件包管理器记录

- Debian apt - atf-sh - 0.22-3: normalized package name match | Debian stable package indexes: atf-sh from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Automated Test Framework (shell library) | https://github.com/freebsd/atf
- Debian apt - libatf-c++-2 - 0.22-3: normalized package name match | Debian stable package indexes: libatf-c++-2 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Automated Test Framework (shared C++ library) | https://github.com/freebsd/atf
- Debian apt - libatf-c-1 - 0.22-3: normalized package name match | Debian stable package indexes: libatf-c-1 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Automated Test Framework (shared C library) | https://github.com/freebsd/atf
- Debian apt - libatf-dev - 0.22-3: normalized package name match | Debian stable package indexes: libatf-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Automated Test Framework (development files) | https://github.com/freebsd/atf
- Nix - atf: normalized package name match | nixpkgs package indexes: pkgs/by-name/at/atf/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - atf-sh - 0.21-6build4: normalized package name match | Ubuntu 24.04 LTS package indexes: atf-sh from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Automated Test Framework (shell library) | https://github.com/jmmv/atf
- Ubuntu apt - libatf-c++-2 - 0.21-6build4: normalized package name match | Ubuntu 24.04 LTS package indexes: libatf-c++-2 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Automated Test Framework (shared C library) | https://github.com/jmmv/atf
- Ubuntu apt - libatf-c-1 - 0.21-6build4: normalized package name match | Ubuntu 24.04 LTS package indexes: libatf-c-1 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Automated Test Framework (shared C++ library) | https://github.com/jmmv/atf
- Ubuntu apt - libatf-dev - 0.21-6build4: normalized package name match | Ubuntu 24.04 LTS package indexes: libatf-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Automated Test Framework (development files) | https://github.com/jmmv/atf
- apk - atf - 0.23-r0: normalized package name match | Alpine Linux edge package indexes: atf from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | libraries to write tests in C, C++ and shell | https://github.com/freebsd/atf
- apk - atf-dev - 0.23-r0: normalized package name match | Alpine Linux edge package indexes: atf-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | libraries to write tests in C, C++ and shell (development files) | https://github.com/freebsd/atf
- apk - atf-doc - 0.23-r0: normalized package name match | Alpine Linux edge package indexes: atf-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | libraries to write tests in C, C++ and shell (documentation) | https://github.com/freebsd/atf
- apk - atf-static - 0.23-r0: normalized package name match | Alpine Linux edge package indexes: atf-static from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | libraries to write tests in C, C++ and shell (static library) | https://github.com/freebsd/atf
- dnf - atf-tests - 0.23-5.fc45: normalized package name match | Fedora Rawhide package metadata: atf-tests from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Automated Testing Framework - Test suite | https://github.com/freebsd/atf
- dnf - libatf-c - 0.23-5.fc45: normalized package name match | Fedora Rawhide package metadata: libatf-c from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Automated Testing Framework - C bindings | https://github.com/freebsd/atf
- dnf - libatf-c++ - 0.23-5.fc45: normalized package name match | Fedora Rawhide package metadata: libatf-c++ from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Automated Testing Framework - C++ bindings | https://github.com/freebsd/atf


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://pkg.so/zh-hans/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [libtool](https://pkg.so/zh-hans/brew/libtool/) - Build dependency declared by Homebrew.
- [autoconf](https://pkg.so/zh-hans/brew/autoconf/) - Build dependency declared by Homebrew.
- [automake](https://pkg.so/zh-hans/brew/automake/) - Build dependency declared by Homebrew.
- [kyua](https://pkg.so/zh-hans/brew/kyua/) - Popular package that depends on this formula.
- [shellspec](https://pkg.so/zh-hans/brew/shellspec/) - Shares pkgdb curated category or tags: cli, developer-tools, shell, testing.
- [beakerlib](https://pkg.so/zh-hans/brew/beakerlib/) - Shares pkgdb curated category or tags: cli, developer-tools, shell, testing.
- [shelltestrunner](https://pkg.so/zh-hans/brew/shelltestrunner/) - Shares pkgdb curated category or tags: cli, developer-tools, shell, testing.
- [creduce](https://pkg.so/zh-hans/brew/creduce/) - Shares pkgdb curated category or tags: c, c-plus-plus, cli, developer-tools, testing.
- [lcov](https://pkg.so/zh-hans/brew/lcov/) - Shares pkgdb curated category or tags: cli, developer-tools, testing.
- [bats-core](https://pkg.so/zh-hans/brew/bats-core/) - Shares pkgdb curated category or tags: cli, developer-tools, testing.
- [allure](https://pkg.so/zh-hans/brew/allure/) - Shares pkgdb curated category or tags: cli, developer-tools, testing.
- [kcov](https://pkg.so/zh-hans/brew/kcov/) - Shares pkgdb curated category or tags: cli, developer-tools, testing.
- [cxxtest](https://pkg.so/zh-hans/brew/cxxtest/) - Local package facts share a topical domain. Shared terms: c-plus-plus, cli, developer, developer-tools, framework.

## Combined YAML source

View the package source record on GitHub. [combined/atf.yml](https://github.com/mxcl/pkgdb/blob/main/combined/atf.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
