@@ -239,51 +239,6 @@ def test_whole_workflow(tmpdir):
239239 "--check" ,
240240 ]
241241 )
242- with open ("requirements.txt" , "w" ) as fd :
243- fd .write (f"{ str (bench_runner_checkout )} \n " )
244- subprocess .check_call (
245- [
246- str (binary ),
247- "workflow_bootstrap.py" ,
248- "python" ,
249- "main" ,
250- "linux-x86_64-linux" ,
251- "deltablue" ,
252- ",,," ,
253- "--_fast" ,
254- ]
255- )
256-
257-
258- @pytest .mark .long_running
259- def test_check_install_fail (tmpdir ):
260- repo = tmpdir / "repo"
261- venv_dir = repo / "outer_venv"
262- bench_runner_checkout = DATA_PATH .parents [1 ]
263- if sys .platform .startswith ("win" ):
264- binary = venv_dir / "Scripts" / "python.exe"
265- else :
266- binary = venv_dir / "bin" / "python"
267-
268- repo .mkdir ()
269-
270- with contextlib .chdir (repo ):
271- subprocess .check_call ([sys .executable , "-m" , "venv" , str (venv_dir )])
272- subprocess .check_call (
273- [
274- str (binary ),
275- "-m" ,
276- "pip" ,
277- "install" ,
278- "--upgrade" ,
279- "pip" ,
280- ]
281- )
282- subprocess .check_call (
283- [str (binary ), "-m" , "pip" , "install" , f"{ bench_runner_checkout } [test]" ]
284- )
285- subprocess .check_call ([str (binary ), "-m" , "bench_runner" , "install" ])
286-
287242 # Now edit one of the generated files to make the check fail
288243 with open ("workflow_bootstrap.py" , "a" ) as fd :
289244 fd .write ("# EXTRA CONTENT\n \n " )
@@ -299,41 +254,6 @@ def test_check_install_fail(tmpdir):
299254 ]
300255 )
301256
302-
303- @pytest .mark .long_running
304- @pytest .mark .skipif (not sys .platform .startswith ("linux" ), reason = "Linux only" )
305- def test_linux_perf (tmpdir ):
306- """
307- Tests the whole workflow from a clean benchmarking repo.
308- """
309- repo = tmpdir / "repo"
310- venv_dir = repo / "outer_venv"
311- bench_runner_checkout = DATA_PATH .parents [1 ]
312- if sys .platform .startswith ("win" ):
313- binary = venv_dir / "Scripts" / "python.exe"
314- else :
315- binary = venv_dir / "bin" / "python"
316- profiling_dir = Path (repo / "profiling" / "results" )
317-
318- repo .mkdir ()
319- Path (profiling_dir ).mkdir (parents = True )
320-
321- with contextlib .chdir (repo ):
322- subprocess .check_call ([sys .executable , "-m" , "venv" , str (venv_dir )])
323- subprocess .check_call (
324- [
325- str (binary ),
326- "-m" ,
327- "pip" ,
328- "install" ,
329- "--upgrade" ,
330- "pip" ,
331- ]
332- )
333- subprocess .check_call (
334- [str (binary ), "-m" , "pip" , "install" , f"{ bench_runner_checkout } [test]" ]
335- )
336- subprocess .check_call ([str (binary ), "-m" , "bench_runner" , "install" ])
337257 with open ("requirements.txt" , "w" ) as fd :
338258 fd .write (f"{ str (bench_runner_checkout )} \n " )
339259 subprocess .check_call (
@@ -346,17 +266,5 @@ def test_linux_perf(tmpdir):
346266 "deltablue" ,
347267 ",,," ,
348268 "--_fast" ,
349- "--perf" ,
350269 ]
351270 )
352-
353- csv_file = profiling_dir / "deltablue.perf.csv"
354- assert csv_file .is_file ()
355-
356- with open (csv_file , "r" ) as fd :
357- lines = iter (fd .readlines ())
358- first_line = next (lines )
359- assert first_line .strip () == "self,pid,command,shared_obj,symbol"
360- for line in fd .readlines ():
361- assert line .strip ().endswith ("_PyEval_EvalFrameDefault" )
362- break
0 commit comments