File: test.bats

package info (click to toggle)
charliecloud 0.43-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 3,084 kB
  • sloc: python: 6,021; sh: 4,284; ansic: 3,863; makefile: 598
file content (31 lines) | stat: -rw-r--r-- 863 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
CH_TEST_TAG=$ch_test_tag
load "${CHTEST_DIR}/common.bash"

setup() {
    scope full
    prerequisites_ok spack
    export PATH=/spack/bin:$PATH
}

@test "${ch_tag}/version" {
    # Spack likes to write to $HOME/.spack; thus, we bind it.
    ch-run --home "$ch_img" -- spack --version
}

@test "${ch_tag}/compilers" {
    echo "spack compiler list"
    ch-run --home "$ch_img" -- spack compiler list
    echo "spack compiler list --scope=system"
    ch-run --home "$ch_img" -- spack compiler list --scope=system
    echo "spack compiler list --scope=user"
    ch-run --home "$ch_img" -- spack compiler list --scope=user
    echo "spack compilers"
    ch-run --home "$ch_img" -- spack compilers
}

@test "${ch_tag}/find" {
    run ch-run --home "$ch_img" -- spack find charliecloud
    echo "$output"
    [[ $status -eq 0 ]]
    [[ $output = *'charliecloud@'* ]]
}