openSUSE / obs-service-tar_scm

An OBS source service: fetches code from any SCM and archives it
GNU General Public License v2.0
31 stars 105 forks source link

test fail on Fedora 37 #459

Closed D4N closed 1 year ago

D4N commented 1 year ago

I have tried to update the package in Fedora, but unfortunately the testsuite fails in the rpmbuild as well as locally:

❯ make test3                                                                                                                                                                                                                                                                                                                                   [10/85]
: Running the test suite.  Please be patient - this takes a few minutes ...                                                                                                                                                                                                                                                                                          
TAR_SCM_TESTMODE=1 PYTHONPATH=. python3 tests/test.py 2>&1 | tee ./test3.log                                                                                                                                                                                                                                                                                         
...............................................................F                                                                                                                                                                                                                                                                                                     
Stderr:                                                                                                                                                                                                                                                                                                                                                              
Checking .... en_US.utf8                                                                                                                                                                                                                                                                                                                                             
Checking .... en_US.utf8                                                                                                                                                                                                                                                                                                                                             
Checking .... en_US.utf8                                                                                                                                                                                                                                                                                                                                             
Checking .... en_US.utf8                                                                                                                                                                                                                                                                                                                                             
Checking .... en_US.utf8                                                                                                                                                                                                                                                                                                                                             
Checking .... en_US.utf8                                                                                                                                                                                                                                                                                                                                             
Checking .... en_US.utf8                                                                 
Checking .... en_US.utf8                                                                 
Checking .... en_US.utf8                                                                 
Checking .... en_US.utf8                                                                 
Checking .... en_US.utf8                                                                 
Checking .... en_US.utf8                                                                 
.............................................................................................................................................................................
======================================================================
FAIL: test_find_valid_commit (tests.gittests.GitTests.test_find_valid_commit)
----------------------------------------------------------------------
Traceback (most recent call last):                                                       
  File "/home/dan/packages/github.com/openSUSE/obs-service-tar_scm/tests/gittests.py", line 557, in test_find_valid_commit
    self.assertEqual(rev, case[1])                                                       
AssertionError: None != '62368a6718a739b89d1d3831cb1305bfc0792a81'

Stdout:                                                                                  

======================================================================
test_find_valid_commit                                                                   
======================================================================

--v-v-- begin setUp for find_valid_commit --v-v--
GitFixtures: setting up fixtures                                                         
created repo /home/dan/packages/github.com/openSUSE/obs-service-tar_scm/tests/tmp/git/find_valid_commit/repo
Creating 2 commits ...                                                                   
cwd is /home/dan/packages/github.com/openSUSE/obs-service-tar_scm/tests/tmp/git/find_valid_commit/repo
Wrote 1 to a                                                                             
Wrote 1 to subdir/b                                                                      
cwd is /home/dan/packages/github.com/openSUSE/obs-service-tar_scm/tests/tmp/git/find_valid_commit/repo
Wrote 2 to a                                                                             
Wrote 2 to subdir/b                                                                      
 ****** wdir: /home/dan/packages/github.com/openSUSE/obs-service-tar_scm/tests/tmp/git/find_valid_commit/repo
Recorded rev 2: id tag2, timestamp 1234567890, SHA1 abb8d0463206c42ed2b0c8b55690ff62a4fb4db9 in /home/dan/packages/github.com/openSUSE/obs-service-tar_scm/tests/tmp/git/find_valid_commit/repo
Created 2 commits; now at 2                                                              
Starting find_valid_commit test                                                          
--^-^-- end   setUp for find_valid_commit --^-^--

Stderr:                                                                                  
Checking .... en_US.utf8                                                                 
Checking .... en_US.utf8                                                                 
Checking .... en_US.utf8                                                                 
Checking .... en_US.utf8                                                                 
Checking .... en_US.utf8                                                                 
Checking .... en_US.utf8                                                                 
Checking .... en_US.utf8                                                                 
Checking .... en_US.utf8                                                                 
Checking .... en_US.utf8                                                                 
Checking .... en_US.utf8                                                                 
Checking .... en_US.utf8                                                                 
Checking .... en_US.utf8                                                                 

----------------------------------------------------------------------
Ran 237 tests in 348.734s                                                                

FAILED (failures=1)                                                                      

Stdout:                                                                                  

======================================================================
test_find_valid_commit                                                                   
======================================================================

--v-v-- begin setUp for find_valid_commit --v-v--
GitFixtures: setting up fixtures
created repo /home/dan/packages/github.com/openSUSE/obs-service-tar_scm/tests/tmp/git/find_valid_commit/repo
Creating 2 commits ...
cwd is /home/dan/packages/github.com/openSUSE/obs-service-tar_scm/tests/tmp/git/find_valid_commit/repo
Wrote 1 to a
Wrote 1 to subdir/b
cwd is /home/dan/packages/github.com/openSUSE/obs-service-tar_scm/tests/tmp/git/find_valid_commit/repo
Wrote 2 to a
Wrote 2 to subdir/b
 ****** wdir: /home/dan/packages/github.com/openSUSE/obs-service-tar_scm/tests/tmp/git/find_valid_commit/repo
Recorded rev 2: id tag2, timestamp 1234567890, SHA1 abb8d0463206c42ed2b0c8b55690ff62a4fb4db9 in /home/dan/packages/github.com/openSUSE/obs-service-tar_scm/tests/tmp/git/find_valid_commit/repo
Created 2 commits; now at 2
Starting find_valid_commit test
--^-^-- end   setUp for find_valid_commit --^-^--
Left temporary files in /home/dan/packages/github.com/openSUSE/obs-service-tar_scm/tests/tmp
You should remove these prior to the next test run.
make: *** [GNUmakefile:133: test3] Error 1

I am really not that well versed in the internals of this package and have unfortunately not much of an idea what is going on here. Any ideas?

M0ses commented 1 year ago

should be fixed with version 0.10.37

https://build.opensuse.org/package/binaries/openSUSE:Tools/obs-service-tar_scm/Fedora_37

D4N commented 1 year ago

Unfortunately, the issue is still present in the 0.10.37 release. It does not appear on OBS, because the test flavor is not build for Fedora (see lines 32-40 in https://build.opensuse.org/package/view_file/openSUSE:Tools/obs-service-tar_scm/obs-service-tar_scm.spec?expand=1), hence the test are never run.

M0ses commented 1 year ago

I tested the test suite:

https://build.opensuse.org/package/live_build_log/openSUSE:Tools/obs-service-tar_scm:test/Fedora_37/x86_64

and found no problem.

I would guess that you are running the test suite in your "avarage daily user account" and have some special settings in your system or environment, e.g. gpg or git config. But thats only a wild guess.

D4N commented 10 months ago

Frank Schreiner @.***> writes:

I tested the test suite:

  • in a F37 VM manually.
  • in chroot while building manually with osc
  • in OBS building openSUSE:Tools/obs-service-tar_scm/Fedora_37

https://build.opensuse.org/package/live_build_log/openSUSE:Tools/obs-service-tar_scm:test/Fedora_37/x86_64

and found no problem.

I would guess that you are running the test suite in your "avarage daily user account" and have some special settings in your system or environment, e.g. gpg or git config. But thats only a wild guess.

I figured out that the problem was gnupg not being installed in the buildroot. Thanks a lot for your time double checking this, I wouldn't have figured this out without your hint that git or gpg are at fault here!