Adding test for inplace upgrade of running python https://bugzilla.redhat.com/show_bug.cgi?id=233385
19 lines
378 B
Python
19 lines
378 B
Python
import time
|
|
from pathlib import Path
|
|
|
|
|
|
flag_file = Path('/tmp/runtime')
|
|
status_file = Path('/tmp/runtime_status')
|
|
assert not flag_file.exists()
|
|
|
|
print(f'Started - touch {flag_file} when ready')
|
|
print(f'Status in {status_file}')
|
|
status_file.write_text('running')
|
|
|
|
while not flag_file.exists():
|
|
time.sleep(2)
|
|
|
|
import email.parser
|
|
print('DONE')
|
|
status_file.write_text('PASS')
|
|
|