Skip to content

Commit ea562b8

Browse files
committed
fix broken tests
1 parent e91dbfa commit ea562b8

File tree

3 files changed

+26
-26
lines changed

3 files changed

+26
-26
lines changed

test/framework/filetools.py

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2290,7 +2290,7 @@ def test_extract_file(self):
22902290

22912291
self.assertTrue(os.path.samefile(path, self.test_prefix))
22922292
self.assertNotExists(os.path.join(self.test_prefix, 'toy-0.0'))
2293-
self.assertTrue(re.search('running command "tar xzf .*/toy-0.0.tar.gz"', txt))
2293+
self.assertTrue(re.search('running shell command "tar xzf .*/toy-0.0.tar.gz"', txt))
22942294

22952295
with self.mocked_stdout_stderr():
22962296
path = ft.extract_file(toy_tarball, self.test_prefix, forced=True, change_into_dir=False)
@@ -2314,7 +2314,7 @@ def test_extract_file(self):
23142314
self.assertTrue(os.path.samefile(path, self.test_prefix))
23152315
self.assertTrue(os.path.samefile(os.getcwd(), self.test_prefix))
23162316
self.assertFalse(stderr)
2317-
self.assertTrue("running command" in stdout)
2317+
self.assertTrue("running shell command" in stdout)
23182318

23192319
# check whether disabling trace output works
23202320
with self.mocked_stdout_stderr():
@@ -2800,38 +2800,38 @@ def run_check():
28002800
}
28012801
git_repo = {'git_repo': '[email protected]:easybuilders/testrepository.git'} # Just to make the below shorter
28022802
expected = '\n'.join([
2803-
r' running command "git clone --depth 1 --branch tag_for_tests %(git_repo)s"',
2803+
r' running shell command "git clone --depth 1 --branch tag_for_tests %(git_repo)s"',
28042804
r" \(in /.*\)",
2805-
r' running command "tar cfvz .*/target/test.tar.gz --exclude .git testrepository"',
2805+
r' running shell command "tar cfvz .*/target/test.tar.gz --exclude .git testrepository"',
28062806
r" \(in /.*\)",
28072807
]) % git_repo
28082808
run_check()
28092809

28102810
git_config['clone_into'] = 'test123'
28112811
expected = '\n'.join([
2812-
r' running command "git clone --depth 1 --branch tag_for_tests %(git_repo)s test123"',
2812+
r' running shell command "git clone --depth 1 --branch tag_for_tests %(git_repo)s test123"',
28132813
r" \(in /.*\)",
2814-
r' running command "tar cfvz .*/target/test.tar.gz --exclude .git test123"',
2814+
r' running shell command "tar cfvz .*/target/test.tar.gz --exclude .git test123"',
28152815
r" \(in /.*\)",
28162816
]) % git_repo
28172817
run_check()
28182818
del git_config['clone_into']
28192819

28202820
git_config['recursive'] = True
28212821
expected = '\n'.join([
2822-
r' running command "git clone --depth 1 --branch tag_for_tests --recursive %(git_repo)s"',
2822+
r' running shell command "git clone --depth 1 --branch tag_for_tests --recursive %(git_repo)s"',
28232823
r" \(in /.*\)",
2824-
r' running command "tar cfvz .*/target/test.tar.gz --exclude .git testrepository"',
2824+
r' running shell command "tar cfvz .*/target/test.tar.gz --exclude .git testrepository"',
28252825
r" \(in /.*\)",
28262826
]) % git_repo
28272827
run_check()
28282828

28292829
git_config['recurse_submodules'] = ['!vcflib', '!sdsl-lite']
28302830
expected = '\n'.join([
2831-
' running command "git clone --depth 1 --branch tag_for_tests --recursive'
2831+
' running shell command "git clone --depth 1 --branch tag_for_tests --recursive'
28322832
+ ' --recurse-submodules=\'!vcflib\' --recurse-submodules=\'!sdsl-lite\' %(git_repo)s"',
28332833
r" \(in .*/tmp.*\)",
2834-
r' running command "tar cfvz .*/target/test.tar.gz --exclude .git testrepository"',
2834+
r' running shell command "tar cfvz .*/target/test.tar.gz --exclude .git testrepository"',
28352835
r" \(in .*/tmp.*\)",
28362836
]) % git_repo
28372837
run_check()
@@ -2841,11 +2841,11 @@ def run_check():
28412841
'submodule."sha1".active=false',
28422842
]
28432843
expected = '\n'.join([
2844-
' running command "git -c submodule."fastahack".active=false -c submodule."sha1".active=false'
2844+
' running shell command "git -c submodule."fastahack".active=false -c submodule."sha1".active=false'
28452845
+ ' clone --depth 1 --branch tag_for_tests --recursive'
28462846
+ ' --recurse-submodules=\'!vcflib\' --recurse-submodules=\'!sdsl-lite\' %(git_repo)s"',
28472847
r" \(in .*/tmp.*\)",
2848-
r' running command "tar cfvz .*/target/test.tar.gz --exclude .git testrepository"',
2848+
r' running shell command "tar cfvz .*/target/test.tar.gz --exclude .git testrepository"',
28492849
r" \(in .*/tmp.*\)",
28502850
]) % git_repo
28512851
run_check()
@@ -2854,9 +2854,9 @@ def run_check():
28542854

28552855
git_config['keep_git_dir'] = True
28562856
expected = '\n'.join([
2857-
r' running command "git clone --branch tag_for_tests --recursive %(git_repo)s"',
2857+
r' running shell command "git clone --branch tag_for_tests --recursive %(git_repo)s"',
28582858
r" \(in /.*\)",
2859-
r' running command "tar cfvz .*/target/test.tar.gz testrepository"',
2859+
r' running shell command "tar cfvz .*/target/test.tar.gz testrepository"',
28602860
r" \(in /.*\)",
28612861
]) % git_repo
28622862
run_check()
@@ -2865,35 +2865,35 @@ def run_check():
28652865
del git_config['tag']
28662866
git_config['commit'] = '8456f86'
28672867
expected = '\n'.join([
2868-
r' running command "git clone --no-checkout %(git_repo)s"',
2868+
r' running shell command "git clone --no-checkout %(git_repo)s"',
28692869
r" \(in /.*\)",
2870-
r' running command "git checkout 8456f86 && git submodule update --init --recursive"',
2870+
r' running shell command "git checkout 8456f86 && git submodule update --init --recursive"',
28712871
r" \(in /.*/testrepository\)",
2872-
r' running command "tar cfvz .*/target/test.tar.gz --exclude .git testrepository"',
2872+
r' running shell command "tar cfvz .*/target/test.tar.gz --exclude .git testrepository"',
28732873
r" \(in /.*\)",
28742874
]) % git_repo
28752875
run_check()
28762876

28772877
git_config['recurse_submodules'] = ['!vcflib', '!sdsl-lite']
28782878
expected = '\n'.join([
2879-
r' running command "git clone --no-checkout %(git_repo)s"',
2879+
r' running shell command "git clone --no-checkout %(git_repo)s"',
28802880
r" \(in .*/tmp.*\)",
2881-
' running command "git checkout 8456f86 && git submodule update --init --recursive'
2881+
' running shell command "git checkout 8456f86 && git submodule update --init --recursive'
28822882
+ ' --recurse-submodules=\'!vcflib\' --recurse-submodules=\'!sdsl-lite\'"',
28832883
r" \(in /.*/testrepository\)",
2884-
r' running command "tar cfvz .*/target/test.tar.gz --exclude .git testrepository"',
2884+
r' running shell command "tar cfvz .*/target/test.tar.gz --exclude .git testrepository"',
28852885
r" \(in .*/tmp.*\)",
28862886
]) % git_repo
28872887
run_check()
28882888

28892889
del git_config['recursive']
28902890
del git_config['recurse_submodules']
28912891
expected = '\n'.join([
2892-
r' running command "git clone --no-checkout %(git_repo)s"',
2892+
r' running shell command "git clone --no-checkout %(git_repo)s"',
28932893
r" \(in /.*\)",
2894-
r' running command "git checkout 8456f86"',
2894+
r' running shell command "git checkout 8456f86"',
28952895
r" \(in /.*/testrepository\)",
2896-
r' running command "tar cfvz .*/target/test.tar.gz --exclude .git testrepository"',
2896+
r' running shell command "tar cfvz .*/target/test.tar.gz --exclude .git testrepository"',
28972897
r" \(in /.*\)",
28982898
]) % git_repo
28992899
run_check()

test/framework/run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1273,7 +1273,7 @@ def test_run_shell_cmd_async(self):
12731273
os.environ['TEST'] = 'test123'
12741274
env = os.environ.copy()
12751275

1276-
test_cmd = "echo 'sleeping...'; sleep 2; echo $TEST"
1276+
test_cmd = "echo 'sleeping...'; sleep 3; echo $TEST"
12771277
task = thread_pool.submit(run_shell_cmd, test_cmd, hidden=True, asynchronous=True, env=env)
12781278

12791279
# change value of $TEST to check that command is completed with correct environment

test/framework/toy_build.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2975,11 +2975,11 @@ def test_toy_build_trace(self):
29752975
r"^== fetching files\.\.\.\n >> sources:\n >> .*/toy-0\.0\.tar\.gz \[SHA256: 44332000.*\]$",
29762976
r"^ >> applying patch toy-0\.0_fix-silly-typo-in-printf-statement\.patch$",
29772977
r'\n'.join([
2978-
r"^ >> running command:",
2978+
r"^ >> running shell command:",
2979+
r"\tgcc toy.c -o toy\n"
29792980
r"\t\[started at: .*\]",
29802981
r"\t\[working dir: .*\]",
29812982
r"\t\[output saved to .*\]",
2982-
r"\tgcc toy.c -o toy\n"
29832983
r'',
29842984
]),
29852985
r" >> command completed: exit 0, ran in .*",

0 commit comments

Comments
 (0)