# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.main import SpackCommand
arch = SpackCommand('arch')
[docs]def test_arch():
"""Sanity check ``spack arch`` to make sure it works."""
arch()
arch('-f')
arch('--frontend')
arch('-b')
arch('--backend')
[docs]def test_arch_operating_system():
"""Sanity check ``spack arch --operating-system`` to make sure it works."""
arch('-o')
arch('--operating-system')
arch('-f', '-o')
arch('-b', '-o')
[docs]def test_arch_target():
"""Sanity check ``spack arch --target`` to make sure it works."""
arch('-t')
arch('--target')
arch('-f', '-t')
arch('-b', '-t')
[docs]def test_display_targets():
arch('--known-targets')