mirror of
				https://github.com/TheLocehiliosan/yadm
				synced 2025-06-13 13:03:58 +00:00 
			
		
		
		
	Add new alternates processing the cygwin copy testing
This commit is contained in:
		
							parent
							
								
									eeba216cfe
								
							
						
					
					
						commit
						36212cb752
					
				| @ -459,6 +459,8 @@ def ds1_dset(tst_sys, cygwin_sys): | ||||
|     dset.add_file(f'test alt/test alt##C.S.H.U') | ||||
|     dset.add_file(f'test_cygwin_copy##{tst_sys}') | ||||
|     dset.add_file(f'test_cygwin_copy##{cygwin_sys}') | ||||
|     dset.add_file(f'test_cygwin_copy##os.{tst_sys}') | ||||
|     dset.add_file(f'test_cygwin_copy##os.{cygwin_sys}') | ||||
|     dset.add_file('u1', tracked=False) | ||||
|     dset.add_file('d2/u2', tracked=False) | ||||
|     dset.add_file('.ssh/p1', tracked=False, private=True) | ||||
|  | ||||
| @ -37,7 +37,11 @@ def test_cygwin_copy( | ||||
|     if setting is not None: | ||||
|         os.system(' '.join(yadm_y('config', 'yadm.cygwin-copy', str(setting)))) | ||||
| 
 | ||||
|     expected_content = f'test_cygwin_copy##{tst_sys}' | ||||
|     if compatibility: | ||||
|         expected_content = f'test_cygwin_copy##{tst_sys}' | ||||
|     else: | ||||
|         expected_content = f'test_cygwin_copy##os.{tst_sys}' | ||||
| 
 | ||||
|     alt_path = paths.work.join('test_cygwin_copy') | ||||
|     if pre_existing == 'symlink': | ||||
|         alt_path.mklinkto(expected_content) | ||||
| @ -49,13 +53,14 @@ def test_cygwin_copy( | ||||
|         uname = uname_path.join('uname') | ||||
|         uname.write(f'#!/bin/sh\necho "{cygwin_sys}"\n') | ||||
|         uname.chmod(0o777) | ||||
|         expected_content = f'test_cygwin_copy##{cygwin_sys}' | ||||
|         if compatibility: | ||||
|             expected_content = f'test_cygwin_copy##{cygwin_sys}' | ||||
|         else: | ||||
|             expected_content = f'test_cygwin_copy##os.{cygwin_sys}' | ||||
|     env = os.environ.copy() | ||||
|     env['PATH'] = ':'.join([str(uname_path), env['PATH']]) | ||||
|     if compatibility: | ||||
|         env['YADM_COMPATIBILITY'] = '1' | ||||
|     else: | ||||
|         pytest.xfail('Alternates 2.0.0 has not been implemented.') | ||||
| 
 | ||||
|     run = runner(yadm_y('alt'), env=env) | ||||
|     assert run.success | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user