@@ -5480,35 +5480,15 @@ def test_wrong_specsfile_structure(self):
54805480 # todo: put most complicated stuff in yaml
54815481 # todo: use only such EC that are present for testing
54825482 # tolerate no errors
5483- # every sw finds EC <=> success
54845483 def test_correctly_parsed_specsfile (self ):
54855484 """Test for --specsfile <specsfile.yaml> -> success case"""
54865485 topdir = os .path .dirname (os .path .abspath (__file__ ))
54875486 toy_specsfile = os .path .join (topdir , 'specsfiles' , 'test_specsfile_successful.yaml' )
5487+ args = ['--specsfile' , toy_specsfile , '--robot' , '--dry-run' ]
5488+ stdout , err = self .eb_main (args , do_build = True , return_error = True , testing = True )
54885489
5489- args = ['--specsfile' , toy_specsfile ]
5490-
5491- self .mock_stdout (True )
5492- self .mock_stderr (True )
5493- # todo co je to do_build= ? co je testing= ?
5494- self .eb_main (args , do_build = True , raise_error = True , testing = False )
5495- stdout = self .get_stdout ()
5496- self .mock_stdout (False )
5497- self .mock_stderr (False )
5498-
5499- print ("DENIS: " + str (stdout ))
5500-
5501- # msg_regexs = [
5502- # re.compile(r"^== Build succeeded for 1 out of 1", re.M),
5503- # re.compile(r"^\*\*\* DRY RUN using 'EB_FFTW' easyblock", re.M),
5504- # re.compile(r"^== building and installing FFTW/3.3.8-gompi-2018b\.\.\.", re.M),
5505- # re.compile(r"^building... \[DRY RUN\]", re.M),
5506- # re.compile(r"^== COMPLETED: Installation ended successfully \(took .* sec\)", re.M),
5507- # ]
5508-
5509- # for msg_regex in msg_regexs:
5510- # self.assertTrue(msg_regex.search(stdout), "Pattern '%s' found in: %s" % (msg_regex.pattern, stdout))
5511-
5490+ p = re .compile (r"[\S\s]*easybuild\/easybuild-framework\/test\/framework\/easyconfigs\/test_ecs\/g\/GCCcore\/GCCcore-4.9.3.eb \(module: GCCcore\/4.9.3\)$[\S\s]*easybuild\/easybuild-framework\/test\/framework\/easyconfigs\/test_ecs\/b\/binutils\/binutils-2.25-GCCcore-4.9.3.eb \(module: binutils\/2.25-GCCcore-4.9.3\)$[\S\s]*easybuild\/easybuild-framework\/test\/framework\/easyconfigs\/test_ecs\/b\/binutils\/binutils-2.26-GCCcore-4.9.3.eb \(module: binutils\/2.26-GCCcore-4.9.3\)$[\S\s]*easybuild\/easybuild-framework\/test\/framework\/easyconfigs\/test_ecs\/g\/GCC\/GCC-4.9.2.eb \(module: GCC\/4.9.2\)$[\S\s]*easybuild\/easybuild-framework\/test\/framework\/easyconfigs\/test_ecs\/g\/gzip\/gzip-1.6-GCC-4.9.2.eb \(module: gzip\/1.6-GCC-4.9.2\)$[\S\s]*easybuild\/easybuild-framework\/test\/framework\/easyconfigs\/test_ecs\/b\/bzip2\/bzip2-1.0.6-GCC-4.9.2.eb \(module: bzip2\/1.0.6-GCC-4.9.2\)$[\S\s]*" , re .MULTILINE )
5491+ self .assertTrue ( p .match (stdout ) is not None )
55125492
55135493
55145494def suite ():
0 commit comments