1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-12 18:59:50 +03:00

testing/asdf: reset PROJECT_DIR path

Redirect `PROJECT_DIR` to an existing path to resolve test error on the
edge builders.

```
--- FAIL: TestBatsTests (36.17s)
    --- FAIL: TestBatsTests/plugin_extension_command (0.95s)
        main_test.go:53: stdout: 1..6
            ok 1 asdf help shows plugin extension commands
            not ok 2 asdf help shows extension commands for plugin with hyphens in the name
            # (in test file /home/buildozer/aports/testing/asdf/src/asdf-0.18.0/test/plugin_extension_command.bats, line 33)
            #   `cd "$PROJECT_DIR"' failed
            # /home/buildozer/aports/testing/asdf/src/asdf-0.18.0/test/plugin_extension_command.bats: line 33: cd: null directory
            ok 3 asdf can execute plugin bin commands
            ok 4 asdf can execute plugin default command without arguments
            ok 5 asdf can execute plugin default command with arguments
            ok 6 asdf execute plugin default command unsets ASDF_INSTALL_TYPE ASDF_INSTALL_VERSION and ASDF_INSTALL_PATH env variables

        main_test.go:53: stderr:
        main_test.go:53: bats command failed to run test file successfully
FAIL
coverage: 0.0% of statements
FAIL	github.com/asdf-vm/asdf/cmd/asdf	36.179s
```
This commit is contained in:
mio 2025-07-10 02:04:31 +00:00
parent e13a72cd57
commit 2d8e440b62

View file

@ -21,7 +21,7 @@ build() {
}
check() {
SHELL=/bin/bash go test -buildmode=default -coverprofile=/tmp/coverage.out -bench= ./...
PROJECT_DIR="$builddir" SHELL=/bin/bash go test -buildmode=default -coverprofile="$builddir"/test/coverage.out -bench= ./...
}
package() {