Clean make test?

I hope this is not a dumb question, but shouldn’t cloning the current master branch and running make test finish with a clean execution?

$ make test
(…)
could not read signature from exclusion tagfile "/tmp/restic-test-2777851804/CACHEDIR.TAG": unexpected EOF
(…)
FAIL    github.com/restic/restic/cmd/restic   16.096s
(…)
ok      github.com/restic/restic/internal/walker       (cached)
FAIL
make: *** [Makefile:12: test] Error 1

The tests run successfully in the Github CI. There might be some tests that don’t work on all systems though. But those should obviously be fixed.

That warning is unrelated to the failed test. I need the complete output to debug anything.

Here it is:

$ restic version
restic 0.16.5-dev (v0.16.5-823-gf4ecb9d61) compiled with go1.22.4 on linux/arm64

$ make test > /tmp/test-output-f4ecb9d61.txt 2>&1

The output file: test-output-f4ecb9d61.txt

Apparently there’s no python available on your system as the following call fails: python -c "import sys; sys.exit(0)". The reason we use python instead of e.g. bash is that it is also available on Windows in the Github CI.

Relevant section of the test logs:

--- FAIL: TestStdinFromCommand (0.05s)
[...]
    cmd_init_integration_test.go:18: repository initialized at /tmp/restic-test-2786232222/repo
    cmd_backup_integration_test.go:20: backing up [python -c import sys; print('something'); sys.exit(0)] in /tmp/restic-test-2786232222
    cmd_backup_integration_test.go:22: chdir to /tmp/restic-test-2786232222
    cmd_backup_integration_test.go:27: chdir back to [...]
    cmd_backup_integration_test.go:33: e[31mError while backing upe[39m
        
--- FAIL: TestStdinFromCommandNoOutput (0.07s)
[...]
    cmd_init_integration_test.go:18: repository initialized at /tmp/restic-test-3297515269/repo
    cmd_backup_integration_test.go:20: backing up [python -c import sys; sys.exit(0)] in /tmp/restic-test-3297515269
    cmd_backup_integration_test.go:22: chdir to /tmp/restic-test-3297515269
    cmd_backup_integration_test.go:27: chdir back to [...]
    cmd_backup_integration_test.go:589: e[31mNo data error expectede[39m
3 Likes

Indeed, I only had Python 3. Installed python-is-python3, and now make test runs with zero errors.

3 Likes