Open jtojnar opened 6 years ago
Hmm odd, it looks like bogus regex matching failures:
++ ls -al err.txt
-rw-r--r-- 1 root root 54 May 18 23:54 err.txt
++ sed -e 's/^/# /'
# error: Invalid ref name origin:main
++ fatal 'File '\''err.txt'\'' doesn'\''t match regexp '\''error: Invalid ref name origin:main'\'''
++ echo File ''\''err.txt'\''' 'doesn'\''t' match regexp ''\''error:' Invalid ref name 'origin:main'\'''
File 'err.txt' doesn't match regexp 'error: Invalid ref name origin:main'
++ exit 1
Running test: flatpak/test-remote-add.sh.test
I wonder if it's related to:
/nix/store/bm8fxl3vjfx1062mw9y65j3ym37sgap2-ostree-2018.5-installedTests/libexec/installed-tests/flatpak/tests/libtest-core.sh: line 43: warning: setlocale: LC_ALL: cannot change locale (C.utf8): No such file or directory
Maybe try setting TEST_SKIP_CLEANUP=1
and inspecting the txt file and playing around with grep?
One issue with the tests is that they use C.utf8
locale even when it does not exist
$ locale -a | grep C.utf8
en_SC.utf8
es_EC.utf8
I fixed the locale issue in #1611 but the tests are still failing.
Apparently, the issue is caused by escape codes:
++ assert_file_has_content err.txt 'error: Invalid ref name origin:main'
++ fpath=err.txt
++ shift
++ for re in "$@"
++ grep -q -e 'error: Invalid ref name origin:main' err.txt
++ hexdump --canonical err.txt
00000000 1b 5b 33 31 6d 1b 5b 31 6d 65 72 72 6f 72 3a 1b |.[31m.[1merror:.|
00000010 5b 30 6d 1b 5b 32 32 6d 20 49 6e 76 61 6c 69 64 |[0m.[22m Invalid|
00000020 20 72 65 66 20 6e 61 6d 65 20 6f 72 69 67 69 6e | ref name origin|
00000030 3a 6d 61 69 6e 0a |:main.|
00000036
(full log)
Hmm...is your build process providing a pseudoterminal? OK I see, it's because we're only detecting if stdout is a tty, which in your case it will be.
Probably the most robust fix is to add >/dev/null
to all of the calls that are doing 2>err.txt
, although I wonder if at the same time we should add a helper function for this, something like:
assert_fails_with 'error: Invalid ref name origin:main' ostree --repo=mirrorrepo-local pull-local otherrepo
or so.
Apparently, test-gpg-verify-result.test
is a separate issue, opened https://github.com/ostreedev/ostree/issues/1634
@cgwalters The installed tests are run using gnome-desktop-testing-runner
not sure if it runs under pseudo-terminal.
And apparently, test-fsck-collections.sh
installed test, which passed in 2018.5, fails on current master (cc5254ac34219e187e6963314248308e4a396152):
Bisecting it points to 8fbf19c9f54ba34ae7ebbc540b08566b8dd18848
But it looks like the same issue as this one, only with a different file name.
I am trying to make installed tests pass on NixOS but cannot move any further with the following five:
See the detailed logs for more information.
Build details